Javascript onsubmit() doesn't fire WTF?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • GilBates
    New Member
    • May 2007
    • 1

    #1

    Javascript onsubmit() doesn't fire WTF?

    I was kind of expecting to see a "test" message pop up when I clicked the submit button, but NNNNOOOOOOOOOOO ! wtf gives?

    <form method="post" onsubmit="javas cript:window.al ert('test');" action="http://www.botworks.co m/local/BWIForm.pl" target=_blank name="BWIForm" >
    <input type=hidden name="BWI_last_ mode" value="review">
    <input type=hidden name="BWI_actio n" value="Search">
    <select name="BWI_table _name">
    <option value="book">bo ok
    <option value="Content" >Content
    ... lots more options here...
    <option value="UserClas s">UserClass
    <option value="Voluntee rProfile">Volun teerProfile
    </select>
    <input type=submit value="ReFORM&t rade;">
    </form>
  • iam_clint
    Recognized Expert Top Contributor
    • Jul 2006
    • 1207

    #2
    <form onbeforesubmit= "alert('test'); ">

    Comment

    • acoder
      Recognized Expert MVP
      • Nov 2006
      • 16032

      #3
      Originally posted by iam_clint
      <form onbeforesubmit= "alert('test'); ">
      Does onbeforesubmit exist? Or is it IE only?

      I think the onsubmit is fine too.
      Code:
      <form ... onsubmit="return test()">
      and test() would contain alert, etc.

      Comment

      Working...