Lytebox problem onload 
July 9th, 2009, 01:17 PM
|  | Familiar Sight | | Join Date: Nov 2007
Posts: 172
| |
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
| 
July 9th, 2009, 01:56 PM
|  | Site Moderator | | Join Date: Nov 2006 Location: UK
Posts: 14,522
Provided Answers: 12 | | | re: Lytebox problem onload
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.
| 
July 9th, 2009, 03:19 PM
|  | Familiar Sight | | Join Date: Nov 2007
Posts: 172
| | | re: Lytebox problem onload
sorry i dont understand what return false is
| 
July 9th, 2009, 03:32 PM
|  | Site Moderator | | Join Date: Nov 2006 Location: UK
Posts: 14,522
Provided Answers: 12 | | | re: Lytebox problem onload
If you want to prevent a link from being followed, add "return false;" onclick: - <a href="some-destination.html" ... onclick="return false;">
| 
July 9th, 2009, 03:49 PM
|  | Familiar Sight | | Join Date: Nov 2007
Posts: 172
| | | re: Lytebox problem onload
will that not always make the link not work, i will want the links to work when the page has loaded?
| 
July 9th, 2009, 03:56 PM
|  | Site Moderator | | Join Date: Nov 2006 Location: UK
Posts: 14,522
Provided Answers: 12 | | | re: Lytebox problem onload
I don't know. I haven't really looked at the code, but it could easily be changed onload if required.
| 
July 9th, 2009, 04:17 PM
|  | Familiar Sight | | Join Date: Nov 2007
Posts: 172
| | | re: Lytebox problem onload
hi thanks for your help i have put a OnLoad return true in the line and it works
| 
July 9th, 2009, 05:45 PM
|  | Site Moderator | | Join Date: Nov 2006 Location: UK
Posts: 14,522
Provided Answers: 12 | | | re: Lytebox problem onload
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.
| 
July 9th, 2009, 06:07 PM
|  | Familiar Sight | | Join Date: Nov 2007
Posts: 172
| | | re: Lytebox problem onload
My link code is like this - <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
| 
July 9th, 2009, 06:42 PM
|  | Site Moderator | | Join Date: Nov 2006 Location: UK
Posts: 14,522
Provided Answers: 12 | | | re: Lytebox problem onload
Actually, onload is not a link event, so you can remove that and it should still work.
|  | | | | /bytes/about
We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights.
Get the best answers to your questions from over 225,698 network members.
|