473,382 Members | 1,424 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,382 software developers and data experts.

use client side code to trigger the load of page must use GET Protocol?

The following code is the drop down box, and when user changes the
selection, it will display the value of the selection automatically by the
onchange event. This code works fine with GET Protocol.

<html>
<body>
<form name="eventform" action="eventtest3.asp" method="GET">
<select name="id" onchange="location.href='eventtest3.asp?id='+this. value">
<option value="select">select</option>
<option value="1001">1001</option>
<option value="1002">1002</option>
<option value="1003">1003</option>
</select>
<%= Request.Querystring("id") %>
</form>
</body>
</html>

However, if I use POST protocol, it doesn't work anymore.

<html>
<body>
<form name="eventform" action="eventtest4.asp" method="POST">
<select name="id" onchange="location.href='eventtest4.asp'">
<option value="select">select</option>
<option value="1001">1001</option>
<option value="1002">1002</option>
<option value="1003">1003</option>
</select>
<%= Request.Form("id") %>
</form>
</body>
</html>

My question is: do we need to use GET protocol to trigger the reload of the
page?? Can I use POST protocol to accomplish the same task??
Please advise. Thanks!

Jul 19 '05 #1
1 1694

Even with the GET protocol ... you are not submitting the form in
either example.

You are not getting the GET one because of submission, you are getting
it because it is in the link ... that's all ... the form is not doing
anything.

what you want to do in EACH form is have ....

<select name="id" onchange="document.eventform.submit()">

placing this line in each sample should make both of them work. The
querystring for the first will be built by the form submission.

Brynn
www.coolpier.com
On Sat, 17 Jan 2004 19:29:14 -0800, "Matt" <ma*******@hotmail.com>
wrote:
The following code is the drop down box, and when user changes the
selection, it will display the value of the selection automatically by the
onchange event. This code works fine with GET Protocol.

<html>
<body>
<form name="eventform" action="eventtest3.asp" method="GET">
<select name="id" onchange="location.href='eventtest3.asp?id='+this. value">
<option value="select">select</option>
<option value="1001">1001</option>
<option value="1002">1002</option>
<option value="1003">1003</option>
</select>
<%= Request.Querystring("id") %>
</form>
</body>
</html>

However, if I use POST protocol, it doesn't work anymore.

<html>
<body>
<form name="eventform" action="eventtest4.asp" method="POST">
<select name="id" onchange="location.href='eventtest4.asp'">
<option value="select">select</option>
<option value="1001">1001</option>
<option value="1002">1002</option>
<option value="1003">1003</option>
</select>
<%= Request.Form("id") %>
</form>
</body>
</html>

My question is: do we need to use GET protocol to trigger the reload of the
page?? Can I use POST protocol to accomplish the same task??
Please advise. Thanks!


I participate in the group to help give examples of code. I do not guarantee the effects of any code posted. Test all code before use!

Brynn
www.coolpier.com
Jul 19 '05 #2

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

Similar topics

5
by: tmb | last post by:
Is there a way to use ASP to 'push' a new image to the client every 15 seconds or so? I guess the entire page will have to be 're-sent' to the client but I'm not sure. I'm trying to 'rotate'...
7
by: rdh | last post by:
Hi all, I am in process of developing a Server in C++ supporting multiple protocols. The server will be exposing various functionalities, and the clients can communicate over any of the...
5
by: KathyB | last post by:
If someone could just explain this to me...I just don't get it! I have an aspx page where I retrieve several session variables and use xmlDocument to transform xml file with xsl file into an...
4
by: Prince Kumar | last post by:
I joined a company recently and they have a java program which hangs (does nothing) after a while. This is no way consistent. It could succeed quite a few times and can fail a few other times....
2
by: Manu | last post by:
In my ASPX code I would like to open a new window, send a message box, create an alert window etc. The logic when to do the above is implemented in the server side, as it is depended upon Database...
8
by: Mike Fellows | last post by:
Ok, im not sure if this is at all possible and if it is how i go about it is beyond me i have a piece of client side code that requires a piece of data from the server side (an ID number in this...
6
by: adolf garlic | last post by:
A postback I'm doing takes ages to get the data which it then uses to populate a table. What I want to know is: How can I get the client side to fire a 'resize' event when the postback thing...
4
by: Michael | last post by:
I am trying to open a file on the client machine from an aspx page running server side. The design requirements of the page specify that the HtmlInputFile control is not to be used. Since the...
5
by: Alex Maghen | last post by:
I frequently find myself wanting to insert some basic client-side JavaScript functions in the page of an ASPX of mine. But I find it so frustrating that I have to actually contruct my JavaScript in...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.