Results 1 to 4 of 4

Thread: Making 'virtual' links in a Web Browser window.

  1. #1
    aidan
    Guest

    Question Making 'virtual' links in a Web Browser window.

    I have a web browser form and I want to do the following.

    1) Put a virtual page into the window. I haven't done this step yet but it's covered in Sam Huggill's 'Insert HTML into an active web page in the Webbrowser control' tip. (This will display search results from a database). I only have the free version of IIS so I can't use ASP. (As far as I know).

    2) The page will have links on it, which I want to link to more virtual pages when the user clicks them, but I don't know how to do this.

    When someone clicks an Anchor tag on the HTML page in the WebBrowser window, I want it to trigger an event on the WebBrowser's form, so a new page can be generated. Is it possible to do this, possibly by some script on the page which would be triggered by the onclick property.

    Any ideas guys?

  2. #2
    Big D Danial's Avatar
    Join Date
    Jul 2000
    Location
    ASP.Net Forum
    Posts
    2,877

    Re: Making 'virtual' links in a Web Browser window.

    Originally posted by aidan
    I only have the free version of IIS so I can't use ASP. (As far as I know).
    Do you mean PWS, yes you can run ASP on PWS.
    [VBF RSS Feed]

    There is a great war coming. Are you sure you are on the right side? Atleast I have chosen a side.

    If I have been helpful, Please Rate my Post. Thanks.

    This post was powered by :

  3. #3
    aidan
    Guest
    The server is Win2000, which as far as I know runs IIS not PWS. PWS is for NT, 95 & 98.

    I just don't really want to use an ASP solution, because I'd have to do a lot in terms of setting up the ODBC source, installing the Web Server, learning how to do .asp templates etc. etc.

  4. #4
    Fanatic Member punkpie_uk's Avatar
    Join Date
    Sep 2001
    Location
    UK
    Posts
    645
    PWS is for Win9X. NT4 uses ISS, it comes with the optional pack.

    If you have ISS installed you can use ASP.
    Try something like this : -

    1/ Use the URL to pass a parameter eg http://domain.com/pagename.asp?list0 (everything after the ? is the paramter)

    2/ Use request.servervariables("QUERY_STRING") on the page to find out what the parameter is. In the example it shoudl return list0

    3/ Use an if statement to find out what to display

    if request.servervariables("QUERY_STRING")="list0" then
    'display list 0
    response.write "<a href=" & chr(34) & "http://domain.com/anewlink" & chr(34) & ">A New Link</a><br>" & vbcrlf
    end if
    if request.servervariables("QUERY_STRING")="list1" then
    'display list 1
    end if
    if request.servervariables("QUERY_STRING")="list2" then
    'display list 2
    end if

    4/ Set up some anchor tags to select what to display

    <a href="pagename.asp?list0">Load Page 0</a>
    <a href="pagename.asp?list1">Load Page 1</a>
    <a href="pagename.asp?list2">Load Page 2</a>

    All these do is call the page again with a different parameter.
    SPREAD THE WORD!!! Are You Lee McCormick? Because I Am



    Lee M McCormick
    [email protected]

    Lee McCormick.com - Live
    Dynamically Webbed.com - In development but live

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