How do I retrieve the name of the text box that is getting submitted in a form in JavaScript? There is only one button and one text box on the form, the name is made in real time so i cant preset it....
How do I retrieve the name of the text box that is getting submitted in a form in JavaScript? There is only one button and one text box on the form, the name is made in real time so i cant preset it....
Use a hidden input and set its value to the name of the textbox at the same time you set the name itself.
Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!
Ah dam! Good idea! Thanks man... Im feeling like this | | big![]()
![]()
![]()
Just make sure you provide ample fallback for non-Javascript browsers. This doesn't sound like a very unobtrusive method you're using here.
Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!
Yeah, I dont think thats going to work. Im actually making a JSP page, I can show you some of the basic code if you want to see it. Thanks for trying to help me out
Javascript and Java are two very different things. JSP pages do not rely on Javascript to work.Im actually making a JSP page
Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!
Bookmarks