473,395 Members | 1,975 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 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 8303
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, address etc. I want these values to display in the...
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 using HTTP web request (POST, not GET) and be able...
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 and open display.asp in the current browser ...
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 http://weblogs.asp.net/jdennany/archive/2005/04/23/403971.aspx. When I use...
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 uses POST and is processed by an ASP.NET web...
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. Similar to the post body of a form that has a...
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 box: <asp:Textbox id="username" Columns="10"...
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 variables to their webforms through a form on my...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.