
Loading a Modal IE Page... HELP PLEASE!!!
Sub C104()
Dim gblCube
gblCube="104"
window.showModalDialog("empresults.asp?cube=" & gblCube)
End Sub
--
Michael Harris
MVP Scripting
Ahh... it is starting to become clear. Sorry... my thick head gets me in trouble sometimes. This is what I did...
Sub C104()
Dim gblCube
gblCube="104"
window.showModalDialog("empresults.asp?cube=gblCube")
End Sub
This now opens the modal window and passes gblCube to that window, but since it's a numeric value it's not displaying properly. For instance:
if i set gblCube="Test" then it displays Test is the modal window. However when done as above, it shows nothing in the window.
here is the code in the results page:
<%
MyVariable = Request.QueryString("cube")
Response.Write MyVariable
%>
Is there something special about numeric values that I need to keep in mind???
Thanks for your help.
What Michael meant was that you can use the window.showModalDialog(...) directly in your script, not having to create the "IE.App" object, at all. (Since a browser IS an IE.App.)
I have a diagram of my office, on which there are hot clickable spots on each cubicle. Each hot spot references a routine, that sets a variable and I want to pass that variable to a new modal html dialog box. That modal box will then reference a database based on the variable that is passed to it, and return information about who sits at a particular cubicle.
can you think of an easier way to do this?
thanks,
b/
As an ActiveX component, the InternetExplorer.Application object is not marked as safe for scripting, the same as the FileSystemObject and a multitude of others.
What I don't understand is why you are doing this from an HTML page to call showModalDialog when from an HTML page you can simply call showModalDialog directly...
--
Michael Harris
MVP Scripting
The Create Object is indeed what is failing. Any ideas?
b./
What fails? Or should we guess...
My guess is that the CreateObject fails.
--
Michael Harris
MVP Scripting
Can anyone offer any insight as to what might be wrong with the following:
<!--
Sub Test1()
Cube="104"
Set IE = CreateObject("InternetExplorer.Application")
IE.navigate "about:blank"
IE.Document.Script.showModalDialog "testpage.htm",,"dialogHeight: 15"
End Sub
-->
I'm firing this event from an imagemap click... i need it to open a modal IE window with the testpage.htm file, passing the Cube variable to the new page.
Any ideas??? PLEASE!!!
brian