By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,968 Members | 1,588 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,968 IT Pros & Developers. It's quick & easy.

submitting a form without action parameter

P: n/a
Hi,
Is there a trick for submitting an HTML form without action parameter
pointing to the target file?

I am trying to reverse engineer an html form inside a jsp page. and
this is what I come across

<form method="POST" name="Userpasshidden" onsubmit='return true'><!--
action="../../login.jsp" -->
.....
<input id="bok" class="buttonAction" type="button" value="OK"
onclick="doLogin()">

--------

this is the doLogin function

function doLogin() {
document.forms.Userpasshidden.user.value =
doEncode(document.forms.Userpass.duser.value);
document.forms.Userpasshidden.pass.value =
doEncode(document.forms.Userpass.dpass.value);
if (document.all) document.all["bok"].disabled = true;
else document.getElementById("bok").disabled = true;
document.forms.Userpasshidden.submit();
}

Aug 4 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a

You have to be more specific on what you need. Forms, submit to action=
file, that's what submit is for, if you don't have an action, then,
there's nothing to submit, so, the absence of action= defeats by itself
any submission of any kind, I gather you mean, use form elements for other
processing, not making a server call with parameters.
Danny
--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
Aug 4 '05 #2

P: n/a
Danny said the following on 8/2/2005 1:09 AM:

You have to be more specific on what you need. Forms, submit to
action= file, that's what submit is for, if you don't have an action,
then, there's nothing to submit, so, the absence of action= defeats by
itself any submission of any kind, I gather you mean, use form elements
for other processing, not making a server call with parameters.


Ok, so, if I have no action then the form won't submit? In WHAT browser?
If no action is present, the form submits to itself. Had you tested that
before you posted, you would know that. But testing is beyond your
abilities evidently.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Aug 4 '05 #3

P: n/a
Tauqir wrote:
Is there a trick for submitting an HTML form without action parameter
pointing to the target file?


Depend on browser error correction? Most submit to the current URL, some
submit to action="./".

Leaving the action attribute off is very bad form (and it is *required* by
the spec).
--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
Aug 4 '05 #4

P: n/a
Guys, Thanks very much for your help. It was the case that the action=
nothing was posting to itself.

Aug 5 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.