PDA

View Full Version : I.E Script working with other browsers



corofan
12-11-2010, 02:15 PM
1) Script Title: Jigsaw Puzzle

2) Script URL: http://www.dynamicdrive.com/dynamicindex4/jigsaw.htm

3) Describe problem:Is there any way to get this script to work accross most browsers. Works fine in IE, works ok in Firefox with the IE Add-on but will not work with other browsers. Heres my site if anyone can help.
http://www.carolsimstationary.co.uk/

I'm new to this forum so forgive me if this post is wrong or in the wrong place.
:)
Thanks in advance
Carol

vwphillips
12-11-2010, 03:13 PM
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN//3.2">
<HTML>
<HEAD>
<TITLE>Jigsaw Puzzle - Can you put this picture together ?</TITLE>
</HEAD>
<BODY>
<script type="text/javascript">
<!--

var temp,gotit;

function exch(e){
var obj=window.event?e.srcElement:e.target;
if(obj.nodeType==3){
obj=obj.parentNode;
}
if (obj.className=="drag"){
if (gotit==1){
gotit=0;
temp[0].src=obj.src;
obj.src=temp[1];
}
else {
gotit=1;
temp=[obj,obj.src];
}
}
}

document.onmousedown=function(e){
exch(e);
}
// -->
</SCRIPT>
<CENTER>
<NOSCRIPT>
To play this game, you need IE 4 or greater
</NOSCRIPT>
<TABLE CELLPADDING="0" CELLSPACING="0" BORDER="0" STYLE="border:15px ridge red">
<TR>
<TD><IMG SRC="http://www.dynamicdrive.com/dynamicindex4/t9.gif" WIDTH="120" HEIGHT="112" NAME="pic11" CLASS="drag" ALT=""></TD>
<TD><IMG SRC="http://www.dynamicdrive.com/dynamicindex4/t4.gif" WIDTH="120" HEIGHT="112" NAME="pic12" CLASS="drag" ALT=""></TD>
<TD><IMG SRC="http://www.dynamicdrive.com/dynamicindex4/t6.gif" WIDTH="120" HEIGHT="112" NAME="pic13" CLASS="drag" ALT=""></TD>
<TD><IMG SRC="http://www.dynamicdrive.com/dynamicindex4/t1.gif" WIDTH="120" HEIGHT="112" NAME="pic14" CLASS="drag" ALT=""></TD>
</TR>
<TR>
<TD><IMG SRC="http://www.dynamicdrive.com/dynamicindex4/t7.gif" WIDTH="120" HEIGHT="112" NAME="pic21" CLASS="drag" ALT=""></TD>
<TD><IMG SRC="http://www.dynamicdrive.com/dynamicindex4/t10.gif" WIDTH="120" HEIGHT="112" NAME="pic22" CLASS="drag" ALT=""></TD>
<TD><IMG SRC="http://www.dynamicdrive.com/dynamicindex4/t2.gif" WIDTH="120" HEIGHT="112" NAME="pic23" CLASS="drag" ALT=""></TD>
<TD><IMG SRC="http://www.dynamicdrive.com/dynamicindex4/t12.gif" WIDTH="120" HEIGHT="112" NAME="pic24" CLASS="drag" ALT=""></TD>
</TR>
<TR>
<TD><IMG SRC="http://www.dynamicdrive.com/dynamicindex4/t3.gif" WIDTH="120" HEIGHT="112" NAME="pic31" CLASS="drag" ALT=""></TD>
<TD><IMG SRC="http://www.dynamicdrive.com/dynamicindex4/t5.gif" WIDTH="120" HEIGHT="112" NAME="pic32" CLASS="drag" ALT=""></TD>
<TD><IMG SRC="http://www.dynamicdrive.com/dynamicindex4/t11.gif" WIDTH="120" HEIGHT="112" NAME="pic33" CLASS="drag" ALT=""></TD>
<TD><IMG SRC="http://www.dynamicdrive.com/dynamicindex4/t8.gif" WIDTH="120" HEIGHT="112" NAME="pic34" CLASS="drag" ALT=""></TD>
</TR>
</TABLE>
<BR>
</CENTER>

</BODY>
</HTML>