Results 1 to 3 of 3

Thread: Execute URL!

Hybrid View

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    May 2006
    Posts
    137

    Execute URL!

    Hello,

    I have 3 URLs I need to execute in script!

    Previously I have used response.redirect method where only 1 URL needed executin, but now there is 3 it wont be possible.

    How can I execute 3 URL's (in any order, no consecuvation required) in VB code?

    Thanks

  2. #2
    Fanatic Member Jumpercables's Avatar
    Join Date
    Jul 2005
    Location
    Colorado
    Posts
    592

    Re: Execute URL!

    VB Code:
    1. System.Diagnostics.Process.Start("http://www.vbforums.com/showthread.php?t=447650")

    C# - .NET 1.1 / .NET 2.0

    "Take everything I say with a grain of salt, sometimes I'm right, sometimes I'm wrong but in the end we've both learned something."
    _____________________
    Regular Expressions Library
    Connection String
    API Functions
    Database FAQ & Tutorial

  3. #3
    PowerPoster stanav's Avatar
    Join Date
    Jul 2006
    Location
    Providence, RI - USA
    Posts
    9,290

    Re: Execute URL!

    You'll have to open new window for each url... And it must be done on the client side...
    You simply do Response.Write(yourscript) then the client browser will execute the script when it receives the response. Somthing like this:
    VB Code:
    1. Dim URLs() As String = {"http://www.google.com", _
    2.                                 "http://www.yahoo.com", _
    3.                                 "http://www.msn.com"}
    4.         Dim jscript As String = "<script type='text/javascript'>"
    5.         For Each url As String In URLs
    6.             jscript &= "window.open('" & url & "');"
    7.         Next
    8.         jscript &= "</script>"
    9.         Response.Write(jscript)

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