Opening modal window and passing variable to it to use in ph
Posted: Wed Nov 19, 2003 7:21 pm
Let's say I'm generating a modal window with the following code:
and calling it with:
My question is: Is it possible to pass some variable to the new opened window (some number like ID for example) so that I can use this variable in the new opened page. (to run this number against MySQL database for example).
I know it can be done if I do something like index.php?id=1234, and then grab it with $_GET. But I'd rather have modal window. Can anybodu help?
Code: Select all
function doit(){
window.showModalDialog("index.php","","dialogHeight: 300px; dialogWidth: 300px; dialogTop: px; dialogLeft: px; edge: Raised; center: Yes; help: No; resizable: No; status: No;");
}Code: Select all
<button onclick="doit()">Test</button>I know it can be done if I do something like index.php?id=1234, and then grab it with $_GET. But I'd rather have modal window. Can anybodu help?