View Full Version : Jumptop.js not working

10-04-2008, 07:46 AM
1) Script Title: Jump to Top Script

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex5/jumptop.htm

3) Describe problem: I am using this script for quite sometime. Recently, I have notice that when you click on [Top] link a new blank windows opens up. Earlier this script was working fine. Is there any problem with the script? Here is the URL on which this I have placed this script. www.travelspan.in (http://www.travelspan.in). Please help.:(

10-04-2008, 09:11 AM
Remove this from your page:

<base target="_blank">

That's what's causing it. Or, if you need that for your page. You can edit this line in the script:

crosslogo.innerHTML='<a href="'+logolink+'">'+displayed+'</a>'


crosslogo.innerHTML='<a target="_self" href="'+logolink+'">'+displayed+'</a>'

That (untested) should also take care of it. If not, this will:

crosslogo.innerHTML='<span onclick="window.scrollTo(0,0);" style="color:blue;cursor:pointer;">'+displayed+'</span>'

10-04-2008, 12:32 PM
Thank You John, it is now working. Thank you dynamic drive community.