By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,608 Members | 1,925 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,608 IT Pros & Developers. It's quick & easy.

Lytebox problem onload

100+
P: 347
Hi everyone.

I am using lytebox to load a page into the lyteframe part of the script.

the problem is that if you click on the link before the page is fully loaded it just loads into a normal window without using the lytebox script, does any one have any ideas on hoe to get round this

can be viewed at

http://www.yaketyyakallmouth.com/pages/boys.asp?id=All

thanks

colin
Jul 9 '09 #1
Share this Question
Share on Google+
9 Replies


acoder
Expert Mod 15k+
P: 16,027
The Lytebox script initiates onload, so you'll have to make the links "dead" if you want to avoid this problem. Use "return false" to stop a link following its destination.
Jul 9 '09 #2

100+
P: 347
sorry i dont understand what return false is
Jul 9 '09 #3

acoder
Expert Mod 15k+
P: 16,027
If you want to prevent a link from being followed, add "return false;" onclick:
Expand|Select|Wrap|Line Numbers
  1. <a href="some-destination.html" ... onclick="return false;">
Jul 9 '09 #4

100+
P: 347
will that not always make the link not work, i will want the links to work when the page has loaded?
Jul 9 '09 #5

acoder
Expert Mod 15k+
P: 16,027
I don't know. I haven't really looked at the code, but it could easily be changed onload if required.
Jul 9 '09 #6

100+
P: 347
hi thanks for your help i have put a OnLoad return true in the line and it works
Jul 9 '09 #7

acoder
Expert Mod 15k+
P: 16,027
I'm not entirely sure how you've got it working with that. Can you post the code for clarification? Anyway, glad to see you've got it working.
Jul 9 '09 #8

100+
P: 347
My link code is like this

Expand|Select|Wrap|Line Numbers
  1. <a href="anypage.htm" rel="lyteframe" OnClick="return false;" OnLoad="return true;" rev="width: 1000px; height: 600px; scrolling: auto;">
It seems to work the links go nowhere unless the page has finished loading

Its a shome that in IE the window that loads causes the Flash part of the pash to flutter and move when you roll over the edge of the window
Jul 9 '09 #9

acoder
Expert Mod 15k+
P: 16,027
Actually, onload is not a link event, so you can remove that and it should still work.
Jul 9 '09 #10

Post your reply

Sign in to post your reply or Sign up for a free account.