Passing data between windows

Results 1 to 2 of 2

Thread: Passing data between windows

  1. #1
    Join Date
    Dec 1969

    Default Passing data between windows

    Hi there!<BR> I am in the process of converting a VB product to ASP. In a form/window, when I click one button, that should invoke another window, and when the user closes the new window i just want to pass the values to the original/main window without refreshing. Is it possible in ASP? Please help. Your ideas/tips welcome.<BR>Thanks in advance.

  2. #2
    Sven Cipido Guest

    Default RE: Passing data between windows

    Hi,<BR><BR>I had the same problem. I have my main window, when I press a certain menufunction, I open a new window, where I can make my selection. I close this window, and the then I opens excel. Now in my main window, I also needed the info of the window. So here&#039;s the solution : You need to use the scripting.Dictionary method. Here&#039;s the code :<BR><BR>Main window :<BR> set ObjWin = CreateObject("Scripting.Dictionary")<BR> set ObjWin = window.ShowModalDialog("&#060;Your window&#062;", ObjWin ,"dialogwidth:230px;dialogheight:160px;status:no;c enter:yes;resizable:no;help:no;")<BR> <BR> sAction = obJWin.item("action")<BR><BR> If sAction="go" Then<BR> If objWin.item("structure") Then<BR> iStructure = 1<BR> Else<BR> iStructure = 0<BR> End If<BR> If objWin.item("clusterid") Then<BR> iClusterid = 1<BR> Else<BR> iClusterid = 0<BR> End If<BR> End If<BR><BR>The code in the window :<BR>&#060;script language="VBScript"&#062;<BR>&#039;-------------------------------------------------------<BR>&#039;LINK/BUTTON PRESSED in window to close window<BR>&#039;----------------------------------------------------- <BR><BR>private sub GoBack(selection) <BR> <BR>select case selection<BR> case "CANCELLED" <BR> Set Action = CreateObject("Scripting.Dictionary")<BR> Action.Add "action", "No"<BR> Action.Add "structure", "No"<BR> Action.Add "clusterid", "No"<BR> <BR> window.returnvalue = Action<BR> window.close()<BR> exit sub<BR> case "EXPORT" <BR> Set Action = CreateObject("Scripting.Dictionary")<BR> Action.Add "action", "go"<BR> Action.Add "structure", document.Excel.Structures.checked<BR> Action.Add "clusterid", document.Excel.ClusterId.checked<BR> <BR> window.returnvalue = Action<BR> window.close()<BR> exit sub <BR> msgbox document.Excel.Structures.checked<BR> end select <BR>end sub<BR><BR>I hope this helps you with the problem. Let me know ( if you have still problems.

Posting Permissions

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