473,785 Members | 2,576 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

submitting a form without action parameter

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="Userpassh idden" onsubmit='retur n true'><!--
action="../../login.jsp" -->
.....
<input id="bok" class="buttonAc tion" type="button" value="OK"
onclick="doLogi n()">

--------

this is the doLogin function

function doLogin() {
document.forms. Userpasshidden. user.value =
doEncode(docume nt.forms.Userpa ss.duser.value) ;
document.forms. Userpasshidden. pass.value =
doEncode(docume nt.forms.Userpa ss.dpass.value) ;
if (document.all) document.all["bok"].disabled = true;
else document.getEle mentById("bok") .disabled = true;
document.forms. Userpasshidden. submit();
}

Aug 4 '05 #1
4 11423

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
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.javas cript FAQ - http://jibbering.com/faq & newsgroup weekly
Aug 4 '05 #3
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
Guys, Thanks very much for your help. It was the case that the action=
nothing was posting to itself.

Aug 5 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
8768
by: Dave Martin | last post by:
I've successfully used CURL to maneuver around and through sites but a new site I've been trying to work with has got me stumped. To retrieve the data I'm trying to get a login is required. If you go to any page in the "member" area without logging in you get directed to a https connection and hit login.php (ie: you end up at https://www.domain.com/login.php). The problem, I believe, lies in the fact that the form on that page...
1
4196
by: Michael Brennan-White | last post by:
If I submit my for using a get action the resulting page loads . If I use a post action I get an error page saying "The page cannot be found". I am calling the originating page!!! This happens in IE as well as FireFox. This code has been tested on a Win2003 server, IIS6, PHP 5.0.3, mySQL 4.1.8 and it works fine. The problem server is a Win2k server, IIS5, PHP 5.0.4, mySQL 4.1.11.
5
4546
by: Bjorn | last post by:
Hi, I need to submit in the same page two forms to two different ASP-pages. I created two forms, each with hidden input and a submit button. But it doesn't work. Nothing happens with the second form. Does it exist a way to do that? Thanks bjorn
2
2222
by: Greg T | last post by:
Hi, I have a rather long form that I don't want people submitting unless they are absolutely sure they are ready. I figured the easiest way to prevent an accidental form submission by way of hitting of the enter key was to simply not have a submit button, instead going for a regular anchor which calls a javascript confirmation box and then submits the form.
5
1915
by: Don | last post by:
I have a need to submit a form, but don't need the user to click on a button. How do I do this? Is there some way, using JavaScript, to setup a <form> tag to do this? Thanks, Don ----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==---- http://www.newsfeeds.com The #1 Newsgroup Service in the World! >100,000 Newsgroups ---= East/West-Coast Server Farms - Total Privacy via Encryption =---
4
2302
by: Rick | last post by:
Hello, I'm having trouble with submitting my form when checking to see if data is present in the user-inputted fields. What I want to happen is for the user to input various pieces of data, submit the form, and then have a javascript function that checks to see if data is entered, and if not, have an alert window tell the user which field to enter data into and then revert back to that same page. If all data is entered, it would...
3
1570
by: veronicab | last post by:
Hi all, I have a page with a very large form. When user clicks on the button to submit the form, page "freezes" for several seconds, and then finally you notice it was not frozen but just submitting the lots of info, since it loads the form-action page. I can't change the form design. User wants the page organized in tabs, and the whole form submitted when user presses Save button. So the form size seems like something I cannot change. ...
1
1417
by: philguenet | last post by:
I have left my Web site out at my provider for a long while. Yesterday I tried changing quite a few things on it but it all ended in tears. None of the form submit button submit anymore. I am now wondering if the problem has to do with me using VS 2003 and .Net Framework v1.1 though I suspect that my provider has upgraded theirs.
6
4977
by: phpnewbie26 | last post by:
This has been confusing me for a while. I don't understand why it isn't working. In my original coding, I have an action called submitted.php and this is what is looks like: <?php $data=fopen("/home/vchan/ts2/writing.txt","r+"); while(!feof($data)){ $data2=fgets($data); $tmp=explode(",",$data2); $project=$tmp; $code=$tmp;
0
9647
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9485
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10356
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10098
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8986
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6743
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5523
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4058
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2890
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.