Results 1 to 4 of 4

Thread: [RESOLVED] Passing on text to url

  1. #1

    Thread Starter
    Fanatic Member kregg's Avatar
    Join Date
    Feb 2006
    Location
    UK
    Posts
    524

    Resolved [RESOLVED] Passing on text to url

    For instance, lets say I had on my web page a text box, that was used for the search criteria. And there was a button called go to launch up a search engine (lets say yahoo) and then pastes the result into the yahoo bit. I got as far as MAKING the box and layout (yes I know, shoddy!), I just don't know how to copy the results and add it onto the address bar.

    For example, in VB, its like:

    VB Code:
    1. webbrowser1.navigate("http://uk.search.yahoo.com/search?ei=UTF-8&fr=sfp&p=" & text.text & "&meta=vc%3D")

    Any ideas pleeease? By the way this is my VERY FIRST shot at ASP.NET.

  2. #2
    Member
    Join Date
    Mar 2006
    Posts
    55

    Re: Passing on text to url

    I don't know about .Net, but in Classic ASP you'd use Response.Redirect and Request.Querystring to grab the info from your URL. Your probably better off waiting for someone who knows .Net, but if you're in a rush you could Google to check to see if .Net is different.

  3. #3
    Member
    Join Date
    Jan 2006
    Posts
    33

    Re: Passing on text to url

    Here is a html page that has a google search button when presses send to google to search for the value in the dummy text box:

    <HTML><body onload=go()><Form name=frm>
    <input type=text name=dummy value=search value>
    <input type=button name=google value=google>

    </form></body></html>
    <script language=vbscript>
    sub google_onclick()
    dim temp
    temp=replace(frm.dummy.value," ", "+")
    window.location="http://www.google.com/search?hl=en&q=" & temp & "&btnG=Google+Search"
    end sub
    </script>

    Hope this helps

  4. #4

    Thread Starter
    Fanatic Member kregg's Avatar
    Join Date
    Feb 2006
    Location
    UK
    Posts
    524

    Re: Passing on text to url

    brilliant. Thanks alot

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width