Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

When I request.queryString("address") I start losing values

Posted on 1999-10-07
12
Medium Priority
?
240 Views
Last Modified: 2012-06-27
Hi EE!

For example some body enters address in a text field:

2785 West 5 st apt 2h

When I request.querystring ("Address") I get just the first
word '2785' and the rest are lost.

Is there a solution to this problem ???
Thank you.
0
Comment
Question by:Info_user100
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 2
  • 2
  • +3
12 Comments
 
LVL 10

Expert Comment

by:rbr
ID: 2106894
How did you request your querystring?
0
 
LVL 4

Expert Comment

by:oubelkas
ID: 2107063
if you use an textfield you can do this :

<input type="text" name="address" size="20" onBlur="javascript:myfunction(address.value)">

address.value will have the string you need (you can use another event handler than onBlur)

J.
0
 
LVL 4

Expert Comment

by:oubelkas
ID: 2107093
In script it should look like this :

<html>
<head>
<title>tekst</title>
<script language="javascript">
function myfunction(myaddress){
  document.write("the address is :"+myaddress);
}
</script>

</head>
<body>
<input type="text" name="address" size="20" onBlur="javascript:myfunction(address.value)">
</body>
</html>

When you click outside the window, the onBlur event handler will call myfunction and the address is written to the document.

J.
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

Author Comment

by:Info_user100
ID: 2107171
Sorry, I didnt make myself clear.

-------------------------------------------------------
I execute first.asp and collect the values from an HTML form. After first.asp is done I then execute second.asp and pass collected values from an HTML to second.asp from the first.asp  In second.asp I use request.querystring to extract these params passed from first.asp, So when I look into "address" param in the second.asp I only get the first word.

Meanwhile I will try OnBlur. Hopefully it will help.
Thanks.  
0
 
LVL 25

Expert Comment

by:clockwatcher
ID: 2107295
Please post your code.  Without seeing it, I'd guess that you might want to use server.urlencode to encode your variables in first.asp before you pass them on, but that really depends upon how you're passing them to second.asp.
0
 

Author Comment

by:Info_user100
ID: 2107360
response.write "<form ACTION=..\michaelmarom\mckop-cgi\directpaycredit.asp?order-id=" & pinno & "&price=" & TEMP_TOT1 & "&card-number=" & Request.Form("CC") & "&card-exp=" & request.form("D17") & "/" & request.form("D18") & "&card-name=" & CC_Name & "&card-address=" & request.form("address") & "&card-city=" & request.form("city") & "&card-state=" & request.form("state") & "&card-zip=" & request.form("ZIP") & "&card-country=" & request.form("Country")  & "METHOD='POST' name='FrmConfirm' unsubmit = 'return(true);'>"

All values are passed ok. Address has blanks and thats
the problem.
I tried assigning the request.form("Adderess") to a var and
pass the var as a param to the asp. though same negative results.
0
 

Author Comment

by:Info_user100
ID: 2107409
Thats first.asp passing them on to second
0
 
LVL 6

Expert Comment

by:kschang
ID: 2107541
You'll have to URL encode the string, I guess...
0
 
LVL 25

Accepted Solution

by:
clockwatcher earned 40 total points
ID: 2107660
If you're going to include them within a form submission just set them up as hidden fields, then you don't have to do the urlencode; the browser will take care of it.

first.asp

<form ACTION="..\michaelmarom\mckop-cgi\directpaycredit.asp" method="GET">
<input type="hidden" name="order-id" value="<%=pinno%>">
<input type="hidden" name="price" value="<%=TEMP_TOT1%>">
<input type="hidden" name="card-number" value="<%=request.form("CC")%>">
<input type="hidden" name="card-exp" value="<%=request.form("D17") & "/" & request.form("D18") %>">
..
..
..
</FORM>

If you're not going to use a form, but simply want to use an anchor then you'll need to use server.urlencode.

response.write "<a href="myUrl.asp?order-id=" & server.urlencode(pinno) & "&price=" & server.urlencode(TEMP_TOT1) ... and so on">Confirm Order</a>
0
 

Author Comment

by:Info_user100
ID: 2110097
What does it mean to urlencode ???


I tried hidden, I tried server.urlencode("var"), I tried
printing 0ut response.requestquerystring Still doent work.


I found another solution. I update a table with address
and in the second.asp I retrieve it from the table and continue on.

Max.
0
 

Author Comment

by:Info_user100
ID: 2110129
What does it mean to urlencode ???


I tried hidden, I tried server.urlencode("var"), I tried
printing 0ut response.requestquerystring Still doent work.


I found another solution. I update a table with address
and in the second.asp I retrieve it from the table and continue on.

Max.
0
 
LVL 1

Expert Comment

by:Moondancer
ID: 6819774
This question was awarded, but never cleared due to the JSP-500 errors of that time.  It was "stuck" against userID -1 versus the intended expert whom you awarded.  This corrects that and the expert will now receive these points, all verified.
Moondancer
Moderator @ Experts Exchange
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question