Click to See Complete Forum and Search --> : popups


Bill Crawley
November 26th, 2003, 04:44 AM
Hi All,

I have the following VBScript in the Head section:

dim MyWindow
dim MyWindowBody
set MyWindow = window.createPopup
set MyWindowBody = MyWindow.Document.Body
MyWindowBody.style.backgroundcolor = "lightyellow"
MyWindowBody.style.border = "solid black 1px"
MyWindowBody.innerHTML = "<Input type=Radio name=cAgent value=""0"" checked>Current Agent<Input type=Radio name=cAgent value=""1"">All Agents"
MyWindow.show(100,100,180,25,MyWindowBody.body)

I have 3 Questions:

1. I receive a jScript runtime error exception was not handled??? (this is VBScript)

2. How do I return the selected value to the main form when the popup is closed.

3. How do I close the popup to return the values.

Thanks

Satishpp
November 26th, 2003, 01:07 PM
1)

have you specified the language in the script tag?

<script language='"vbscript>
.
.
.
</script>


2)
use this...
On click of a button in the popup, set the value of a field on the main form.

self.opener.document.SearchFrm.txtNameExpr.value = "abc"

Where SearchFrm is the name of the form and txtNameExpr is a input field on the main form.

3)
After sending the values back to the main form, as shown above, use window.close


Satish

Bill Crawley
November 27th, 2003, 03:36 AM
Hi Satishpp,

Yes, The Sub is wrapped in VBScript along with other routines. That's why I cant uderstand why I'm getting JScript error's.

Regards
Bill

AJMartin
November 28th, 2003, 01:22 AM
Originally posted by Bill Crawley
Hi Satishpp,

Yes, The Sub is wrapped in VBScript along with other routines. That's why I cant uderstand why I'm getting JScript error's.

Regards
Bill

This may sound silly, but are you using a non-Microsoft Internet Explorer browser? Only MSIE runs VBScript, AFAIK.