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

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.

Sep 3 '07 #1
3 8216
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
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.

Sep 4 '07 #3
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

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,...
by: Dodo | last post by:
Is it possible to create a link that can post a value to an ASP page without java?
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...
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...
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...
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...
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....
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...
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...
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....
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...
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...
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
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...
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...
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
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...
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.