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 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Aug 2005
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    opening the website folder, why?

    Ok so here's the deal. I made a Javascript that would open a popup with an image, it works wonderfully.
    Then I redo it because of changes in the website (and filenames) but it simply isn't woking. What he does when clicking an image is that instead of poping up the new window the opens the folder where the website is located.

    Here's the script:
    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html><!-- InstanceBegin template="/Templates/middletemplate.dwt" codeOutsideHTMLIsLocked="false" -->
    <head>
    
    <script language="JavaScript">
    
    function image1('') {
    	window.open('images\tshirts\image_001_large.jpg', 'popup', 'width=420, height=420, menubar=no, scrollbars=no, toolbar=no, location=no, resizable=no, top=, left=');
    	}
    function image2('') {
    	window.open('images\tshirts\image_002_large.jpg', 'popup', 'width=420, height=420, menubar=no, scrollbars=no, toolbar=no, location=no, resizable=no, top=, left=');
    	}
    </script>
    
    <!-- InstanceBeginEditable name="doctitle" -->
    <title>Untitled Document</title>
    <!-- InstanceEndEditable -->
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <!-- InstanceBeginEditable name="head" -->
    <!-- InstanceEndEditable -->
    </head>
    
    <body bgcolor="#000000" text="#FFFFFF" link="#FFFFFF" vlink="#FFFFFF" alink="#FFFFFF">
    <table width="100%" border="0">
      <tr>
        <td><!-- InstanceBeginEditable name="Edit this text" --> 
          <p>T-shirts and even more T-shirts to your enjoyment</p>
          <p>
    	<a href="" onclick="image1(''); return false;">
    	<img src="images/tshirts/image_001_small.jpg" width="100" height="100"></a><br>
            <strong>Name:</strong> White T-Shirt<br>
            <strong>Material:</strong> Wool<br>
            <strong>Price:</strong> ---sek</p>
    	<a href="" onclick="image2(''); return false;">
          <p><img src="images/tshirts/image_002_small.jpg" width="100" height="100"></a><br>
            <strong>Name:</strong> Black T-Shirt<br>
            <strong>Material:</strong> Wool<br>
            <strong>Price:</strong> ---sek</p>
          <!-- InstanceEndEditable --></td>
      </tr>
    </table>
    </body>
    <!-- InstanceEnd --></html>
    Not that I am about to clean up the code and sorry for it being so long just wanted to make sure that you got it all.
    Any help would be much appriciated.
    Last edited by sparc; 08-18-2005 at 08:15 PM.

  • #2
    New Coder
    Join Date
    Aug 2005
    Posts
    23
    Thanks
    0
    Thanked 0 Times in 0 Posts
    just a guess, try adding \'s here:

    function image1('') {
    window.open('\images\tshirts\image_001_large.jpg', 'popup', 'width=420, height=420, menubar=no, scrollbars=no, toolbar=no, location=no, resizable=no, top=, left=');
    }
    function image2('') {
    window.open('\images\tshirts\image_002_large.jpg', 'popup', 'width=420, height=420, menubar=no, scrollbars=no, toolbar=no, location=no, resizable=no, top=, left=');
    }


  •  

    Posting Permissions

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