Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
Thread: Major Skills: using iframes
09-12-2007, 04:25 AM #1
- Join Date
- Sep 2007
- Thanked 0 Times in 0 Posts
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?
09-12-2007, 02:14 PM #2
- Join Date
- Mar 2007
- Thanked 19 Times in 19 Posts
While Request and Request.form are similar, they are not the same.Code:<iframe src="http://google.com/search?q=<%=Request.form("q") %>">
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>
Please, if you found my post helpful, pay it forward. Go and help someone else today.To say my fate is not tied to your fate is like saying, 'Your end of the boat is sinking.' -- Hugh Downs