...

View Full Version : opening the website folder, why?



sparc
08-18-2005, 09:08 PM
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:


<!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.

iamabe666
08-19-2005, 12:19 AM
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=');
}



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum