Redirect into a new window?

Results 1 to 10 of 10

Thread: Redirect into a new window?

  1. #1
    John K Guest

    Default Redirect into a new window?

    Hi All!<BR> Does anyone know a way to spawn a new window in VB Script similar to the &#060;a href="" target="_blank"&#062;&#060;/a&#062; or better yet a pop-up window? I have an asp page that has buttons that redirect (response.redirect) the user but I want them to always have the main page open. Any ideas on how to accomplish this?<BR>Thanks in Advance,<BR>John

  2. #2
    Dave Beseke Guest

    Default RE: Redirect into a new window?

    Sounds like Window.Open("http://.....) should do what you want.

  3. #3
    John K Guest

    Default RE: Redirect into a new window?

    Hey Dave,<BR> I tried using Window.Open and I get this error:<BR><BR>Microsoft VBScript runtime error &#039;800a01a8&#039; <BR><BR>Object required: &#039;Window&#039; <BR><BR>/QuoteNow/quotetemp2.asp, line 44 <BR><BR>The code that gave me the error was:<BR><BR>Sub BtnQuote_onclick<BR>Window.Open("")<BR>End Sub<BR><BR>The code currently is:<BR><BR>Sub BtnQuote_onclick<BR>RecID=Request.QueryString ("id")<BR>Response.Redirect "view_pdf.asp?id="<BR>dim strRedirect<BR>strRedirect=("submit.asp?id="& RecID)<BR>Response.Redirect(strRedirect)<BR>End Sub<BR><BR>But it doesn&#039;t open a new window. Any other ideas or suggestions?<BR>I need for this page to be able to spawn 3 separate windows if possible.<BR>Thanks!<BR>John<BR>

  4. #4
    Join Date
    Dec 1969

    Default RE: Redirect into a new window?

    try window.navigate("http://")

  5. #5
    Heaven's Martini Guest

    Default you need dIRT

    hmm<BR><BR><BR><BR>find the javascript articles and look for one called<BR>popup window primer.<BR><BR>it will lead you to the promised land.<BR>as sure as the sun sets. and clients complain.

  6. #6
    John K Guest

    Default RE: you need dIRT- I need a little more than dIRT

    Thanks for the link, I have gone through all the information but I need to know how to do this in vbscript and not javascript. The article was more involved with writing javascript and HTML.<BR> What I am working with is an ASP page that has a DTC Button that on click gets the ID number out of the querystring and goes to the page that matches the querystring. Like so:<BR><BR>Sub BtnSpread_onclick<BR>RecID=Request.QueryString ("id")<BR>dim strRedirect<BR>strRedirect=("view_xls.asp?id="& RecID)<BR>Response.Redirect(strRedirect)<BR>End Sub<BR><BR>I just need to know how to get the (strRedirect) into a new window. Any thoughts or how-tos? Thanks again,<BR>John

  7. #7
    Heaven's Martini Guest

    Default RE: you need dIRT- I need a little more than dIRT

    mea culpa then<BR><BR>People usually say vbscript and they are thinking javascript.<BR><BR>why not use javascript, you are cross-browser then, if you care.<BR><BR>oh well, i tried.

  8. #8
    John K Guest

    Default RE: you need dIRT- I need a little more than dIRT

    Hey Martini,<BR> I have been trying to do this in javascript all morning within the response.write("&#060;script&#062;") scenario- such as:<BR><BR>Sub BtnQuote_onclick<BR>response.write("&#060;script&# 062;" & vbCrLf)<BR>response.write(" "","","height=600,width=560 ,scrollbars=no");")<BR>response.write("&#060;/script&#062;")<BR>end sub<BR><BR>It keeps giving me errors though. That&#039;s why I wanted to do it in vbscript (by that I mean ASP, not javascript). If you have any other information I&#039;d be more than willing to check it out- I am just banging my head with trial and error here.<BR>Thanks!<BR>John

  9. #9
    John K Guest

    Default Finally got it!!

    Hi All, <BR>Thanks for all the help I finally got it to work. If anyone needs the code here it is:<BR><BR>Sub BtnQuote_onclick<BR>RecID=Request.QueryString ("id")<BR>url = "pagename.asp?id="& RecID<BR>response.write("&#060;script&#062;" & vbCrLf)<BR>response.write(";"& url &"&#039;);")<BR>response.write("&#060;/script&#062;")<BR>End Sub<BR><BR>This is definitely going in my script library! <BR>Thanks again!<BR>John

  10. #10
    Heaven's Martini Guest

    Default RE: Finally got it!!

    Oh, you wanted it done that way.<BR><BR>should have said so. <BR><BR><BR>stupidity is one explanation short of understanding.

Posting Permissions

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