Java Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesJava Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here!
  #1  
Old July 1st, 2002, 08:25 AM
cjdesigns cjdesigns is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2002
Location: london
Posts: 1 cjdesigns User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
scrolling buttons

Ok, i think it would be wise to say i am still a "newbie" at this!!.

This is my second attempt at code to allow the user to view a table by navigating through a page using customised buttons. Although all buttons work on the 'MouseDown', event, the 'MouseUp' is not working. Any ideas?

coding for the division=


Code:

<div style="background-color="orange";width:155"><center>
<a href="java script:movedown();"	onMouseDown="java script:movedown();" 	onMouseUp="java script:stopscroll();"><img src="down1.bmp" /></a>
<a href="java script:moveup();" 		onMouseDown="java script:moveup();" 		onMouseUp="stopscroll();"><img src="top1.bmp" /></a>
<a href="java script:moveright();"	onMouseDown="java script:moveright();" 	onMouseUp="stopscroll();"><img src="right1.bmp" /></a>
<a href="java script:moveleft();" 	onMouseDown="java script:moveleft();"	onMouseUp="stopscroll();"><img src="left1.bmp" /></a>
<a href="java script:stopscroll();" 	onMouseDown="java script:stopscroll();"><img src="stop1.bmp" ></a><br />
<a href="java script:movetop();"><b>Top of the table</b></a>
<a href="java script:moveside();"><b>side of the table</b></a><br /></center>
</div>


coding for the functions =

Code:

function movedown(){
if (window.moveupvar) clearTimeout(moveupvar)
if (iens6&&parseInt(crossobj.style.top)>=(contentheight*(-1)+155))
crossobj.style.top=parseInt(crossobj.style.top)-speed
else if (ns4&&crossobj.top>=(contentheight*(-1)+100))
crossobj.top-=speed
movedownvar=setTimeout("movedown()",100)
}

function moveup(){
if (window.movedownvar) clearTimeout(movedownvar)
if (iens6&&parseInt(crossobj.style.top)<=0)
crossobj.style.top=parseInt(crossobj.style.top)+speed
else if (ns4&&crossobj.top<=0)
crossobj.top+=speed
moveupvar=setTimeout("moveup()",100)
}

function moveright(){
if (window.moveleftvar) clearTimeout(moveleftvar)
if (iens6&&parseInt(crossobj.style.left)>=(contentwidth*(-1)+100))
crossobj.style.left=parseInt(crossobj.style.left)-speed
else if (ns4&&crossobj.top>=(contentwidth*(-1)+200))
crossobj.left-=speed
moverightvar=setTimeout("moveright()",100)
}

function moveleft(){
if (window.moverightvar) clearTimeout(moverightvar)
if (iens6&&parseInt(crossobj.style.left)<=0)
crossobj.style.left=parseInt(crossobj.style.left)+speed
else if (ns4&&crossobj.left<=0)
crossobj.left+=speed
moveleftvar=setTimeout("moveleft()",100)
}

function stopscroll(){
if (window.moveupvar) clearTimeout(moveupvar)
if (window.movedownvar) clearTimeout(movedownvar)
if (window.moverightvar) clearTimeout(moverightvar)
if (window.moveleftvar) clearTimeout(moveleftvar)
}

Reply With Quote
  #2  
Old July 2nd, 2002, 07:36 AM
pabloj's Avatar
pabloj pabloj is offline
Modding: Oracle MsSQL Firebird
Dev Shed God 6th Plane (7500 - 7999 posts)
 
Join Date: Jun 2001
Location: Outside US
Posts: 7,686 pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level) 
Time spent in forums: 2 Months 2 Weeks 5 Days 16 h 27 m 51 sec
Reputation Power: 259
You'd probably better to post to javascript (client side) forum http://forums.devshed.com/forumdisplay.php?forumid=1

Reply With Quote
  #3  
Old July 3rd, 2002, 03:31 AM
cjdesigns cjdesigns is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2002
Location: london
Posts: 1 cjdesigns User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
many thanx pabloj!!!

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesJava Help > scrolling buttons


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway