modal Windows problem! 
Author Message
 modal Windows problem!

Hi,

I've a script that open's a modal window with a web page, and i would like
that the modal window has a script that could read a Javascript variable
that was defined in the fisrt page, something like this:

Page1:

var a = 'this is a var';

function a() {
  showModalDialog('Page2');

Quote:
}

...

Page2:

function onLoad() {
  (read the variable 'a' from Page1)   HERE'S MY PROBLEM...
  self.close();

Quote:
}

...

can someone help me?

Paulo.



Mon, 16 Dec 2002 03:00:00 GMT  
 modal Windows problem!

You have to pass variables as arguments (by value), and return any changes in the window.returnValue. If this won't work, you need to use a modeless dialog.

<html>
<head>
<script>
var a = 'this is a var';
function a1() {
  showModalDialog('Page2.htm', a);

Quote:
}

</script>
</head>
<body onload=a1()>

</body>
</html>

<html>
<head>
<script>
function go() {
alert(window.dialogArguments);

Quote:
}

</script>
</head>
<body onload=go()>

</body>
</html>
--
Mark L. Ferguson    Please reply in Newsgroup
marfer's notes for OE 5 > http://www.geocities.com/SiliconValley/Bay/6386/IE_ng_notes.htm

Quote:
> Hi,

> I've a script that open's a modal window with a web page, and i would like
> that the modal window has a script that could read a Javascript variable
> that was defined in the fisrt page, something like this:

> Page1:

> var a = 'this is a var';

> function a() {
>   showModalDialog('Page2');
> }
> ...

> Page2:

> function onLoad() {
>   (read the variable 'a' from Page1)   HERE'S MY PROBLEM...
>   self.close();
> }
> ...

> can someone help me?

> Paulo.

  page1.htm
< 1K Download

  page2.htm
< 1K Download


Mon, 16 Dec 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Modal dialog windows

2. OnBeforeUnload and Modal Windows

3. resizing modal windows

4. text size in modal windows

5. OnBeforeUnload and Modal Windows

6. Problems Installing Windows Script 5.0 and Windows Script Host 2.0 Beta on Windows NT 4.0

7. Problem with Modal Dialogs

8. Problem with modal dialog within HTA

9. Problem with modal dialog

10. Modal dialog problem

11. Problem when submit in a Modal Dialog.

12. window.open problem / windows problem

 

 
Powered by phpBB® Forum Software