Go Back   CodingForums.com > :: Server side development > ASP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 09-12-2007, 03:25 AM   PM User | #1
Celeste!
New Coder

 
Join Date: Sep 2007
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Celeste! is an unknown quantity at this point
Major Skills: using iframes

i'm having trouble passing search terms from a search box to an iframe.
when ever the quotation marks go around the search (with input text name=q) and are passed on to the iframe with <iframe src="http://google.com/search?q=<%=Request("q") %> i get a msg saying the page cannot be displayed.

i'm guessing since Request("q") already has quotation marks it won't allow the contents of 'q' to have quotation marks.

Is there any other way to request the text that was input so that the quotation marks are recognized by google in the iframe?
Celeste! is offline   Reply With Quote
Old 09-12-2007, 01:14 PM   PM User | #2
Daemonspyre
Regular Coder

 
Join Date: Mar 2007
Posts: 505
Thanks: 1
Thanked 19 Times in 19 Posts
Daemonspyre is on a distinguished road
Try:

Code:
<iframe src="http://google.com/search?q=<%=Request.form("q") %>">
While Request and Request.form are similar, they are not the same.

Here's some test code that does work so that you can have another example.

Code:
<body>
<form method="post" action="test.asp">
<input type="text" name="q" size="30" /><br />
<input type="submit" name="B1" value="Search Google!" /><br />
</form>
<iframe src="http://www.google.com/search?q=<%= request.form("q") %>" frameborder="0" width="98%" height="400"></iframe>
</body>
__________________
Quote:
To say my fate is not tied to your fate is like saying, 'Your end of the boat is sinking.' -- Hugh Downs
Please, if you found my post helpful, pay it forward. Go and help someone else today.
Daemonspyre is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 09:44 PM.


Advertisement
Log in to turn off these ads.