Closing an ASP Page and Refreshing the page that c

Results 1 to 4 of 4

Thread: Closing an ASP Page and Refreshing the page that c

  1. #1
    EssPee Guest

    Default Closing an ASP Page and Refreshing the page that c

    Can anyone point me in the direction of some code snippets that can help me. I have a main page that has links that open up a new window to allow editing of a record. I want to be able to click on the link on the main page, edit the info in the new window, close the new window by clicking a button to have the main window capture focus and get refreshed with the new data. I am trying to keep the main page open while editing in the new window. I have experimented with the javascript window commands but most of my code is in VBscript and I am having a hard time mixing the 2. If there is some code out there I could probably figure out a solution.<BR><BR>Thanx..

  2. #2
    Join Date
    Dec 1969

    Default Should not be that much difference...

    ...between JS and VBS, in terms of opening and closing windows, passing info between the windows, etc.<BR><BR>If you are desparate (and there *are* a very few things that VBS can&#039;t do that JS can), then you could consider having your VBS code call a JS function! That *is* allowed and it *does* work. Just remember: Function calls can&#039;t pass variables back and forth between the two languages except via calls. And forget using *can* convert a VBS array to JS usage, but it&#039;s a pain. And you can&#039;t really go the other way.<BR><BR>Can you point to something specific that doesn&#039;t seem to work for you? As it sits, your question is general enough one would need to write a book to answer all the possibilities.<BR><BR>

  3. #3
    EssPee Guest

    Default RE: Should not be that much difference...

    Basically I need to spawn a new window and capture the windowname of the window that spawned the new window. If you look at the code below I think I need to be able to open a new window using javascript because I need the new window to have a name(srepwindow) so that I can reference it later. My other option I believe is to call the function at the end of this post called opensalesrepform(). The problem is I need to call this javascript inside the server side vbscript code. Or is there a way to make the call in vbscript?<BR><BR>&#060;%@ Language=VBScript %&#062;<BR>&#060;!-- #include file="" --&#062;<BR>&#060;%<BR><BR> if rstAuthenticate("Password") = Request.Form("Password") then<BR> Response.Cookies("Authenticate")("SWS")=Request.Fo rm("Username")<BR> if rstAuthenticate("AdminAccount") = true then<BR><BR>win1 = open("http://sp1wood/sws/salesrep.asp","srepwindow","width=500,height=300,r esizable=yes");<BR> <BR>%&#062;<BR><BR>&#060;HTML&#062;<BR>&#060;HEAD& #062;<BR>&#060;META NAME="GENERATOR" Content="Microsoft FrontPage 4.0"&#062;<BR><BR>&#060;/HEAD&#062;<BR>&#060;BODY&#062;<BR><BR>&#060;script language="javascript"&#062;<BR> <BR> function opensalesrepform() {<BR>"http://sp1wood/sws/salesrep.asp","srepwindow","width=500,height=300,r esizable=yes");<BR> }<BR><BR>&#060;/script&#062;<BR><BR>&#060;/BODY&#062;<BR>&#060;/HTML&#062;

  4. #4
    EssPee Guest

    Default RE: Closing an ASP Page and Refreshing the page th

    I found the script posted below on this message board and it works fine for me. However I have one more question. Internet Explorer gives me a dialog box stating that the page cannot be refreshed without resending the data. Is it anyway to bypass this dialog box and automatically resend the data without asking for confirmation?<BR><BR><BR>if (String(window.opener.Refresh) != &#039;undefined&#039;){ <BR> window.opener.Refresh() <BR>}else{ <BR> opener.window.location.reload() <BR>} <BR>self.close(); <BR>

Posting Permissions

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