Skip to main content
Stack Overflow
  1. About
  2. For Teams

Timeline for Javascript and HTML function issue

Current License: CC BY-SA 3.0

8 events
when toggle format what by license comment
May 12, 2013 at 11:05 comment added Arjan @Chirs, now the alert part is within function confirmReview(formObj) (good, I guess), but function myState is also defined within function confirmReview(formObj), hence will no longer be found by onchange="myState(this.value);" Also note that confirmReview should return true or false. See Show me a Simple javascript onSubmit handler. PLEASE NOTE: by changing your question, you've also made imulsion's answer outdated. That's not nice. Note we're not a forum; please read About and FAQ.
May 12, 2013 at 9:38 comment added Arjan @Chirs, put the validation code (the code with the alert) in the myState function as well.
May 12, 2013 at 9:29 comment added Chirs Lim i cannot print out my statename example if i want to make some comparison for my postcode example if( statename == "Pinang"" ){ if( postcode < 10000 || postcode > 40000 ) alert( "Invalid postcode ! Re-enter" ); } when i load my html . when i run to that function then my HTML will auto refresh to all clear data . cnanot come out that alert. can someone tell me?
May 12, 2013 at 9:27 comment added Chirs Lim i cannot print out my statename example if i want to make some comparison for my postcode example
May 12, 2013 at 9:13 comment added Quentin @alex23 — If there are any such browsers, they are no longer in use. Browsers have defaulted to assuming JS forever and HTML 5 makes the attribute explicitly optional.
May 12, 2013 at 8:40 comment added imulsion @alex23 oops, sorry, forgot about that xD. Thanks for editing :)
May 12, 2013 at 8:39 history edited flavian CC BY-SA 3.0
added 23 characters in body
May 12, 2013 at 8:38 history answered imulsion CC BY-SA 3.0

AltStyle によって変換されたページ (->オリジナル) /