Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I want a button on a webpage to open a popWindow..

Status
Not open for further replies.

plshelpme

Programmer
Nov 1, 2001
27
0
0
CA
and then I want a link on the popWindow to redirect the main page and close the popWindow.

Any ideas?
 
I could give you javascript for this:

<input type=button value=&quot;Pop goes the Window&quot; name=pop1 id=pop1 onClick=&quot;popIt();&quot;>

<script language=javascript>
function popIt(){
var url = 'popUp.htm';
var x = window.open(url,'popUpWindow');
}
</script>

and then on the popUp.htm:

<input type=button value=&quot;Close and Go to Main&quot; name=close1 id=close1 onClick=&quot;closeIt();&quot;>

<script language=javascript>
function closeIt(){
url = 'mainPage.htm';
window.opener.location = url;
window.close();
}
</script>

Hope that helps. I realize it's not vbScript, but hey... whatever works, right? ;-)

paul
penny.gif
penny.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top