English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

Say I have some code like this






The thing is I don't know how to submit it by inlining javascript in the address bar. javascript:document.formname.submit(); would work, but the form doesn't have a name. javascript:document.forms[0].answer.submit(); doesn't work. neither does javascript:document.forms[0].elements[1].submit(); Assuming there's already something in the box when the page loads, how can I submit it automatically? Thanks.

2006-06-11 14:35:54 · 1 answers · asked by Anonymous in Computers & Internet Internet

1 answers

You need a name of the form like



And then you can use the javascript send:
javascript:document.submitForm.submit();

You shouldnt assign an input type to be "submit" cuz you are confusing the form. Normally you would assign "submit" to a button or a link so that it acts as the automatic form submit. You should assign a name to the tag instead.

2006-06-11 14:44:32 · answer #1 · answered by Sean I.T ? 7 · 0 0

fedest.com, questions and answers