472,328 Members | 1,990 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,328 software developers and data experts.

POST form data using Javascript in classic ASP

2
Hi everyone,

I'm really stuck in this problem. my problem is Im converting the existing project which is using querystring and I need to change it to POST.

At the moment when clicking on submit button it calls checkdataandredirect( ) method. in which the newURL is built and used top.main.window.location.replace(newurl); to redirect the page. Also it returns false at the end.

Now to use post method, I've changed my form method to POST, and have added "document.transaction.action=newurl;" in the javascript to set the action attribute. what else do I need to do to make it work as it doesnt work. when I click on the button it just stays on the same page and nothing happens.

your help and time is much appreciated guys.

Thanks
Sep 3 '07 #1
3 8216
markrawlingson
346 Expert 100+
Hi cheecs,

Could you post a sample of your code so we can see where you're going wrong?

Also, when you said "i click on the button but nothing happens" I'm assuming you're talking about the submit button?
Sep 3 '07 #2
jhardman
3,406 Expert 2GB
I echo what mark says, it would definitely be useful to see your code. However, I would venture a guess that the original form submit button does not actually submit the form, it just redirects to a new page and includes the form data in the url, right? To submit the form you should do one of two things:

1- if you don't need the javascript function to do anything, just change the submit button to type="submit" (it probably now is type="button")

2- if you still need the javascript function to do something, then the last line of the function should submit the form. The syntax should look something like this:
[html]document.all.formName.submit();[/html]Let me know if this helps.

Jared
Sep 4 '07 #3
cheecs
2
hi guys,

thanks for your help and time guys. I have solved it on the same day when I post my problem here. I was missing document.formname.submit( ) which is why when I press sumbit button it wasnt doing anything.

Thanks alot guys once again.
Sep 5 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: TG | last post by:
Dear PHP Group, I have two forms that are used to collect user information. The first one takes user inputted values such as fullname, city,...
4
by: Dodo | last post by:
Is it possible to create a link that can post a value to an ASP page without java?
3
by: Paul M | last post by:
Hi Sorry if this is posted in the wrong group but I'm brand new to this area. Basically I've got to post some XML documents to an external server...
2
by: Matt | last post by:
When we submit the form data to another page, we usually do the following: <form action="display.aspx" method="post"> will submit the form data...
0
by: WIWA | last post by:
Hi, I want to login to a password protected website and fetch the content of the page behind. I have based my code on...
13
by: Thom Little | last post by:
I have an HTML Form that uses GET and is processed by an ASP.NET 1.1 web application. Can you recommend a simple example of an HTML Form that...
10
by: eggie5 | last post by:
Is it possible to get a file without using a form post? I want to get the data (bytes) of a file, text or binary, and just save it to a variable....
12
by: Eric Layman | last post by:
Hi, What's the difference between a normal web element: <input type="text" id="txtname" name="txtname" runat="server"> vs webcontrol text...
56
by: UKuser | last post by:
Hi, I'm not sure if this can be done as I've searched the web and this forum. I am using an online merchant provider and I must post certain...
0
by: tammygombez | last post by:
Hey fellow JavaFX developers, I'm currently working on a project that involves using a ComboBox in JavaFX, and I've run into a bit of an issue....
0
better678
by: better678 | last post by:
Question: Discuss your understanding of the Java platform. Is the statement "Java is interpreted" correct? Answer: Java is an object-oriented...
0
by: teenabhardwaj | last post by:
How would one discover a valid source for learning news, comfort, and help for engineering designs? Covering through piles of books takes a lot of...
0
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
0
by: CD Tom | last post by:
This only shows up in access runtime. When a user select a report from my report menu when they close the report they get a menu I've called Add-ins...
0
jalbright99669
by: jalbright99669 | last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
1
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...

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.