Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Automatic Submit 1

Status
Not open for further replies.

faeton13

Programmer
Mar 7, 2005
9
0
0
CO
Hi, I'm new to JavaScript and I urgently need a way to force the submit event. What I need is that whenever the value in a dropdown list changes, the page sumits itself, just like if the user had clicked the submit button.
I already know how to capture the change event for the dropdown list, but I don't know how to tell it to make the submit by itself.

Any help would be really appreciated!

Thanks in advanced

Faeton 13
 
use the form's submit method:
Code:
<body>
<form id="blahForm" action="" method="post" onsubmit="">
   <select name="blahSelect" onchange="[!]document.getElementById('blahForm').submit()[/!]">
      <option value="1">1</option>
      <option value="2">2</option>
   </select>
</form>
</body>

-kaht

[small]How spicy would you like your chang sauce? Oh man... I have no idea what's goin' on right now...[/small]
[banghead]
 
Did this solve your problem?

-kaht

[small]How spicy would you like your chang sauce? Oh man... I have no idea what's goin' on right now...[/small]
[banghead]
 
Yes it did, thanks a lot.
I'm sorry I hadn't thank you before, but when I did, the tektip server went down or something cuz' it didn't write the reply.
Now I would like to know if there's a way to know the value of a textarea without sending the request. I already checked and there's no value attribute for this object, does that mean that there's impossible to know its value?

Thanks again

faeton13
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top