[tw] Re: javascript code in HTML forms?
Thnaks Eric actually I tried that..and it still didnt work... but playing around I think the problem is from another problem. I am using this format (a HTML form to pass data to php file..and data saved as flat txt file)...so I have many such forms in the TW. The form I aked about..is in fact presented inside a popupand I noticed that even though the alrt didnt trigger (after inserting return false) I notice that the php response...showed up in a form (that was open in a sidebar panel) and not under the form in the popup panel. So...the cofusion is in the forms... I also have a problem that in some form using the script scriptvar form=place.lastChild.getElementsByTagName('form') [0];form.aluno.value=localStorage.username;. does not seem to place the data in the right part of the form. as I said...I have many html forms in the same TW I have tried htmlform name=something action=.. and also htmlform id=..but neither solved the problem what is the right way to label these forms so each is unique and hopefully resolve the confusion ??? Thanks in Advance Skye On 13 out, 19:15, Eric Shulman elsdes...@gmail.com wrote: if I check a condition and that have this javacript throgh an alert. I cant get to see it...even if the condition i triggered... the html processes the GET for example. why does not this stop when I input a crazy date into the date part of the form...? ...onclick=' ... if(year2012){alert (data se parece errada - antes de hoje!!);this.form.date.focus();return;} ... '/form . just cant get to see those alerts You need to explictly return a FALSE to prevent the form from being submitted (the GET processing)... not just: return; ...but: return false; That should prevent the FORM handling from continuing after the alert is triggered. -e -- You received this message because you are subscribed to the Google Groups TiddlyWiki group. To post to this group, send email to tiddlywiki@googlegroups.com. To unsubscribe from this group, send email to tiddlywiki+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/tiddlywiki?hl=en.
[tw] Re: javascript code in HTML forms?
Thanks Eric I did try that..and it didnt seem to work either...but I think my problem is elsewhere. I often use html forms to pass data to a server- ide tet fil...via a php GET. So the one TW has many such forms. The form I was asking about above, is actually accessed from a popup...and I noticed that while return false didnt show up the alert panelsthe php server-side response...showed up, not in the form in the popup, but rather in another form which was, by chance open in a sidebar panel. Sometimes the coding of scriptvar form=place.lastChild.getElementsByTagName('form') [0];form.aluno.value=localStorage.username; ... to place data into the form also doe not work.SO I am thinking I have confusion between the various form (in the TW) I have tried htmlform name=... and also htmlform id= but neither seem to resolve the issue How can I uniquely name or label each form, to avoid this confusion ??? Thanks in Advance Skye On 13 out, 19:15, Eric Shulman elsdes...@gmail.com wrote: if I check a condition and that have this javacript throgh an alert. I cant get to see it...even if the condition i triggered... the html processes the GET for example. why does not this stop when I input a crazy date into the date part of the form...? ...onclick=' ... if(year2012){alert (data se parece errada - antes de hoje!!);this.form.date.focus();return;} ... '/form . just cant get to see those alerts You need to explictly return a FALSE to prevent the form from being submitted (the GET processing)... not just: return; ...but: return false; That should prevent the FORM handling from continuing after the alert is triggered. -e -- You received this message because you are subscribed to the Google Groups TiddlyWiki group. To post to this group, send email to tiddlywiki@googlegroups.com. To unsubscribe from this group, send email to tiddlywiki+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/tiddlywiki?hl=en.
[tw] Re: javascript code in HTML forms?
Ooops...sorry about repeating that question...I thought the first response didnt get sent ! Skye On 14 out, 15:49, skye riquelme riquelme.s...@gmail.com wrote: Thanks Eric I did try that..and it didnt seem to work either...but I think my problem is elsewhere. I often use html forms to pass data to a server- ide tet fil...via a php GET. So the one TW has many such forms. The form I was asking about above, is actually accessed from a popup...and I noticed that while return false didnt show up the alert panelsthe php server-side response...showed up, not in the form in the popup, but rather in another form which was, by chance open in a sidebar panel. Sometimes the coding of scriptvar form=place.lastChild.getElementsByTagName('form') [0];form.aluno.value=localStorage.username; ... to place data into the form also doe not work.SO I am thinking I have confusion between the various form (in the TW) I have tried htmlform name=... and also htmlform id= but neither seem to resolve the issue How can I uniquely name or label each form, to avoid this confusion ??? Thanks in Advance Skye On 13 out, 19:15, Eric Shulman elsdes...@gmail.com wrote: if I check a condition and that have this javacript throgh an alert. I cant get to see it...even if the condition i triggered... the html processes the GET for example. why does not this stop when I input a crazy date into the date part of the form...? ...onclick=' ... if(year2012){alert (data se parece errada - antes de hoje!!);this.form.date.focus();return;} ... '/form . just cant get to see those alerts You need to explictly return a FALSE to prevent the form from being submitted (the GET processing)... not just: return; ...but: return false; That should prevent the FORM handling from continuing after the alert is triggered. -e -- You received this message because you are subscribed to the Google Groups TiddlyWiki group. To post to this group, send email to tiddlywiki@googlegroups.com. To unsubscribe from this group, send email to tiddlywiki+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/tiddlywiki?hl=en.
[tw] Re: javascript code in HTML forms?
if I check a condition and that have this javacript throgh an alert. I cant get to see it...even if the condition i triggered... the html processes the GET for example. why does not this stop when I input a crazy date into the date part of the form...? ...onclick=' ... if(year2012){alert (data se parece errada - antes de hoje!!);this.form.date.focus();return;} ... '/form . just cant get to see those alerts You need to explictly return a FALSE to prevent the form from being submitted (the GET processing)... not just: return; ...but: return false; That should prevent the FORM handling from continuing after the alert is triggered. -e -- You received this message because you are subscribed to the Google Groups TiddlyWiki group. To post to this group, send email to tiddlywiki@googlegroups.com. To unsubscribe from this group, send email to tiddlywiki+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/tiddlywiki?hl=en.