modal window - need to close modal window AND redirect to another page

hi  - if you mouseover a thumb on this page:

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?
Who is Participating?
fsze88Connect With a Mentor Commented:
try this
<a href="#" onclick="window.parent.location.href='';">view larger</a>
like this?
<script type="text/javascript">
function openModal(){
var returnVal = window.showModalDialog('showModalDialog.html');
alert("returnVal : " + returnVal);
<a href="#" onclick="openModal();">openModal()</a>
modal window
<title>Modal Dialog</title>
      <body >
            <a href=""  onmousedown="window.returnValue = this.href;window.close();;">Click here</a>

Open in new window

phillystyle123Author Commented:
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 but in the modal window.

check it out here (click on either of the two links under the picture):

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 + "'>&lt/iframe>";;
<script type="text/javascript">
function openModal(){
var returnVal = window.showModalDialog('modal.php');
modal window:(modal.php)
<a href=""  onmousedown="window.returnValue = this.href;modalWindow.close();">view larger</a> | <a href=""  onmousedown="window.returnValue = this.href;modalWindow.close();">back to gallery</a>	

Open in new window

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.