Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4

Thread: popup problems

  1. #1
    New to the CF scene
    Join Date
    Jul 2005
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    popup problems

    When I click the link with the popups I created, the page is white and isn't the size I want. So I'll show you the code. any pointers?

    Code:
    <html>
    <head>
    <title>ODD Parts Gallery</title>
    <script language="Javascript">
    var newwindow;
    function poptastic()
    {
    	newwindow=window.open();
    	if (window.focus) {newwindow.focus()}
    }
    </script>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    </head>
    <body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
    <table id="Table_01" width="600" height="800" border="0" cellpadding="0" cellspacing="0">
    	<tr>
    		<td colspan="9">
    			<img src="images/gallery_01.gif" width="600" height="18" alt="" border="0"></a></td>
    	</tr>
    
    	<tr>
    		<td rowspan="14">
    			<img src="images/gallery_02.gif" width="83" height="782" alt=""></td>
    		<td>
    			<a href="javascript:poptastic('bugatti_hub.html','bugatti','height=520,width=695,left=100,top=100,resizable=yes,scrollbars=no,toolbar=no,status=no');" border="0" ><img src="images/gallery_03.gif" width="103" height="103" alt="" border="0"></a></td>
    		<td rowspan="14">

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    You need to pass the variables some how to the popup, try this
    Code:
    function poptastic(url,name,features)
    {
    	newwindow=window.open(''+url+'',''+name+'',''+features+'');
    	if (window.focus) {newwindow.focus()}
    }

  • #3
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    10,968
    Thanks
    0
    Thanked 236 Times in 233 Posts
    Quote Originally Posted by _Aerospace_Eng_
    You need to pass the variables some how to the popup, try this
    Code:
    function poptastic(url,name,features)
    {
    	newwindow=window.open(''+url+'',''+name+'',''+features+'');
    	if (window.focus) {newwindow.focus()}
    }
    Why do you have that double single quotes?



    Code:
    function poptastic(url,name,features)
    {
    	var newwindow=window.open(url, name, features);
    	newwindow.focus();
    }

  • #4
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    @Glenn Thats the javascript noob in me. I started with no quotes, but wasn't sure if it would still work.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •