Go Back   CodingForums.com > :: Client side development > JavaScript programming > JavaScript frameworks

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 01-27-2010, 01:36 PM   PM User | #1
TAXIDUDE
New to the CF scene

 
Join Date: Jan 2010
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
TAXIDUDE is an unknown quantity at this point
Please Help With Making Two Tables Run Independently

I am putting 2 tables on a page that have images. Everything works to plan except they act as if one instead of independently. This should be an easy fix for you gurus but as I am a beginner I could sure use some help. Thanks.

Here is the page:

[CODE]
<HTML>
<HEAD>
<TITLE></TITLE>

<style>
<!--
.drag{position:relative;cursor:hand}
-->
</style>
<script language="JavaScript1.2">
<!--

/*
Drag and Drop Script-
© Dynamic Drive (www.dynamicdrive.com)
For full source code, installation instructions,
100's more DHTML scripts, and Terms Of
Use, visit dynamicdrive.com
*/

var dragapproved=false
var z,x,y
function move(){
if (event.button==1&&dragapproved){
z.style.pixelLeft=temp1+event.clientX-x
z.style.pixelTop=temp2+event.clientY-y
return false
}
}
function drags(){
if (!document.all)
return
if (event.srcElement.className=="drag"){
dragapproved=true
z=event.srcElement
temp1=z.style.pixelLeft
temp2=z.style.pixelTop
x=event.clientX
y=event.clientY
document.onmousemove=move
}
}
document.onmousedown=drags
document.onmouseup=new Function("dragapproved=false")
//--></script>


<script>
<!--

var bufferImage = new Array();
var bufferImage = new Array();

function Buffer(filename) {
var i = bufferImage.length;
bufferImage[i] = new Image();
bufferImage[i].src = filename;
}

function showImage(filename) {
document.images[Image_Name].src = filename;
}

//===========BUFFER ALL YOUR MENU IMAGES FIRST=============

Image_Name = "BODYCOLOR";

Buffer("random images/sample_1.gif");

Buffer("images/previewerBG_2.gif");

Buffer("random images/sample_3.gif");

Buffer("random images/sample_4.gif");

Buffer("random images/sample_5.gif");

//-->
</script>


<script>
<!--

var bufferImage = new Array2();


function Buffer(filename) {
var i = bufferImage.length;
bufferImage[i] = new Image();
bufferImage[i].src = filename;
}

function showImage(filename) {
document.images[Image_Name].src = filename;
}

//===========BUFFER ALL YOUR MENU IMAGES FIRST=============

Image_Name = "PINWHEELCOLOR";

Buffer("random images/sample_6.gif");

Buffer("images/previewerBG_1.gif");

Buffer("random images/sample_7.gif");

Buffer("random images/sample_8.gif");

Buffer("random images/sample_9.gif");

//-->
</script>


</HEAD>
<BODY BGCOLOR= #000000 link="red" vlink="red" alink="red" >

<CENTER>
<img SRC="images/PlacementBox_1.gif" BORDER="0" height="74" width="184">
</CENTER>
<BR><BR><BR><BR>


<script language="JavaScript1.2">

if (document.all)
document.body.style.cssText="background:black"
</script>


<center><table BORDER=8 CELLSPACING=0 CELLPADDING=0 COLS=3 WIDTH="330">
<tr><td BGCOLOR="blue" WIDTH="20%" ALIGN="CENTER" onMouseOver="showImage('random images/sample_1.gif')"><B>Blue Body</B></td>
<td ROWSPAN="2" BGCOLOR="black" WIDTH="40%"><center><img SRC="images/previewerBG_2.gif" NAME="BODYCOLOR" BORDER=0 height=72width=180 class="drag"></center></td>
<td BGCOLOR="red" WIDTH="20%" ALIGN="CENTER" onMouseOver="showImage('random images/sample_3.gif')"><B>Red Body</B></td></tr>
<tr><td BGCOLOR="teal"WIDTH="20%" ALIGN="CENTER" onMouseOver="showImage('random images/sample_4.gif')"><B>Teal Body</B></td>
<td BGCOLOR="green" WIDTH="20%" ALIGN="CENTER" onMouseOver="showImage('random images/sample_5.gif')"><B>Green Body</B></td>
</tr></table></CENTER><BR>



<script language="JavaScript1.2">

if (document.all)
document.body.style.cssText="background:black" <!--- url(pic/pugbg1.jpg) fixed center-center --->
</script>

<CENTER><table BORDER=8 CELLSPACING=0 CELLPADDING=0 COLS=3 WIDTH="330">
<tr><td BGCOLOR="pink" WIDTH="20%" ALIGN="CENTER" onMouseOver="showImage('random images/sample_6.gif')"><B>Pink PW</B></td>
<td ROWSPAN="2" BGCOLOR="black" WIDTH="40%"><center><img SRC="images/previewerBG_1.gif" NAME="PINWHEELCOLOR" BORDER=0 height=72width=180 class="drag"></center></td>
<td BGCOLOR="yellow" WIDTH="20%" ALIGN="CENTER" onMouseOver="showImage('random images/sample_7.gif')"><B>Yellow PW</B></td></tr>
<tr><td BGCOLOR="magenta"WIDTH="20%" ALIGN="CENTER" onMouseOver="showImage('random images/sample_8.gif')"><B>Magenta PW</B></td>
<td BGCOLOR="silver" WIDTH="20%" ALIGN="CENTER" onMouseOver="showImage('random images/sample_9.gif')"><B>Silver PW</B></td>
</tr></table></center><br><br>





</BODY></HTML>[CODE]
TAXIDUDE is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 07:51 AM.


Advertisement
Log in to turn off these ads.