JavaScript Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsWeb DesignJavaScript Development

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:
  #1  
Old July 9th, 2000, 09:49 AM
RareFreak RareFreak is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2000
Posts: 8 RareFreak User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to RareFreak
Hi people,

I'm just starting with DHTML and got a problem. It's kinda hard to explain, but I'm working with slideouts, and when a slideout disappears and the other should come, the next slideout first pop-ups for a moment before loading. If nobody understands the question, which I can imagine, the html document is on http://home.wanadoo.nl/joop/DHTML/Dhtml.html.
Please help me!
Comments on this post
Gran Roguismo agrees!

Reply With Quote
  #2  
Old July 10th, 2000, 05:13 AM
firepages's Avatar
firepages firepages is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Feb 2000
Location: Perth West Australia
Posts: 757 firepages User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 h 18 m 32 sec
Reputation Power: 14
Hi ReareFreak - your page was not working so I can not see what is going on there - the source did not help much either -

Anyway a general tip is to hide all layers in tour init function and only make them visible the very instant that they are needed
if the layers are to slide in from offscreen - make sure that they are positioned offscreen before the visibility is turned on .

Sorry I could be of no further help.

------------------
Simon Wheeler
FirePages -DHTML/PHP/MySQL

Reply With Quote
  #3  
Old July 10th, 2000, 06:31 AM
RareFreak RareFreak is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2000
Posts: 8 RareFreak User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to RareFreak
I'm sorry, put a dot to much in the URL
I didn't optimize it for NS yet, but in IE it should work fine on this URL: http://home.wanadoo.nl/joop/DHTML/Dhtml.html
Thanx for your looking.

Reply With Quote
  #4  
Old July 10th, 2000, 09:46 PM
firepages's Avatar
firepages firepages is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Feb 2000
Location: Perth West Australia
Posts: 757 firepages User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 h 18 m 32 sec
Reputation Power: 14
The problem is that the div gets shown before the slide function begins - the code below solves the problem - but is not very efficient - but at least you know where the problem lies (it does work - I tested it)

function slideoutLeft() {
if (slideoutShown.xpos > -700) {
slideoutShown.xpos -= 30
slideoutShown.left = slideoutShown.xpos
setTimeout("slideoutLeft()",20)
}
else {
hide(slideoutShown)
//show(slideoutNew)//## FROM HERE
setTimeout("slideoutRight()",20)
}
}

function slideoutRight() {
show(slideoutNew)//###### TO HERE
if (slideoutNew.xpos < 0) {
slideoutNew.xpos +=20
slideoutNew.left = slideoutNew.xpos
setTimeout("slideoutRight()",20)
}
else {
slideoutShown = slideoutNew
slideoutActive = 0
}
}

This is not good coding as it forces a show() every time in the loop - but it works for now. Your code 'appears' to position everything off screen but manages to move it onscreen again just before the slide - mess around with that for a bit.


regards
Simon



------------------
Simon Wheeler
FirePages -DHTML/PHP/MySQL

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignJavaScript Development > DHTML problem

Developer Shed Advertisers and Affiliates



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 | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap