Forum Moderators: open

Message Too Old, No Replies

php/javascript very wierd issue

         

msthac01

5:06 pm on Feb 12, 2008 (gmt 0)

10+ Year Member



I have a page that when the user clicks on the submit button a javascript is called that checks 2 dates, (one that was entered by the user on the form, and another that was stored in the database from a previous step in our process. The funny thing is that there are 2 submit buttons on the page due to it being a pretty large page. Well one button when you click the javascript runs properly, but the other button when clicked does nothing, yet the buttons have the exact same code calling the script and everything, any reason why something like this could happen? Need any more info, let me know thanks.

eelixduppy

6:26 pm on Feb 12, 2008 (gmt 0)



Check for any javascript errors that may come up after clicking on the second, non-working submit button. If there is something happening incorrectly, it should let you know there and you'd be able to fix it.

msthac01

8:27 pm on Feb 12, 2008 (gmt 0)

10+ Year Member



I don't see any errors thrown on the 2nd button click just runs like nothing is happening, I can't even get it to just output an alert or even a document.write(). As if its not hooked to the script but as I said previously the buttons are using the exact same code. I even copied the code for the working button over the code for the 2nd button and it still didn't work

mehh

5:06 pm on Feb 13, 2008 (gmt 0)

10+ Year Member



how are you assigning the onclick event. Are you useing the atribute or an unobtrusive method?