It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming JavaScript Forum

What's wrong with this code??

What's wrong with this code??

Postby Lexxi on Wed Apr 25, 2007 2:56 pm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
</head>

<body>

<script language="JavaScript" type="text/javascript">

var wishlistCookie = "";

if(document.cookie && document.cookie != ""){
process_cookie()

function process_cookie(){
var whole_cookie = unescape(document.cookie);
var each_cookie = whole_cookie.split(";");

for (i=0; i < each_cookie.length; i++){

if (each_cookie[i].indexOf("wishlist") > -1){wishlistCookie = each_cookie[i]}

}
}
}
</script>


<script>

if (document.cookie != ""){
wishlist = document.cookie
}

var A= unescape(wishlistCookie).split(/ *& */);
var L=A.length, tem,temp;

var panArray=[];
for(var i=0;i<L;i++){
tem=A[i].split(/ *\: */);
temp=tem[1].split(/ *\= */);
panArray.push(['<img src="images/' + tem[0] + '.jpg" alt="' + temp[0] + '">' + '<h3>' + temp[0] + '</h3><p><a href="' + temp[1] + '.htm"> Product Page</a><hr>'])
}

document.write(panArray[0] + '<br/>' + panArray[1]+ '<br/>' + panArray[2]+ '<br/>' + panArray[3])



</script>

</body>
</html>


It wont show in firefox, and in all the others, the first image wont show up.

Help??
Lexxi
 
Posts: 3
Joined: Sat Apr 21, 2007 7:44 pm

Who is online

Users browsing this forum: No registered users and 3 guests