phillystyle123
asked on
modal window - need to close modal window AND redirect to another page
hi - if you mouseover a thumb on this page:
http://ctemps.cjehost.com/subgallery_4column_with.php
you'll see my modal window - underneath the artwork you'll see a link that says "view larger" - i need this to close the modal window AND redirect to another webpage on the site.
how can i accomplish this?
http://ctemps.cjehost.com/subgallery_4column_with.php
you'll see my modal window - underneath the artwork you'll see a link that says "view larger" - i need this to close the modal window AND redirect to another webpage on the site.
how can i accomplish this?
ASKER
wow - just using the example code you provided works but when i actually plug it into the real webpage the window.close part does not. so, it's going to google.com but in the modal window.
check it out here (click on either of the two links under the picture):
http://ctemps.cjehost.com/subgallery_4column_with_test.php
here's the code at the top of my main page & modal window:
check it out here (click on either of the two links under the picture):
http://ctemps.cjehost.com/subgallery_4column_with_test.php
here's the code at the top of my main page & modal window:
main page:
<script type="text/javascript" lang="javascript">
var openMyModal = function(source)
{
modalWindow.windowId = "myModal";
modalWindow.width = 575;
modalWindow.height = 500;
modalWindow.content = "<iframe width='575' height='500' frameborder='0' scrolling='no' allowtransparency='true' src='" + source + "'></iframe>";
modalWindow.open();
};
</script>
<script type="text/javascript">
function openModal(){
var returnVal = window.showModalDialog('modal.php');
window.location.href=returnVal;
}
</script>
modal window:(modal.php)
<a href="http://www.google.com" onmousedown="window.returnValue = this.href;modalWindow.close();">view larger</a> | <a href="http://www.google.com" onmousedown="window.returnValue = this.href;modalWindow.close();">back to gallery</a>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Open in new window