Javascript Hyperlink

This is a discussion on "Javascript Hyperlink" within the JavaScript Forum section. This forum, and the thread "Javascript Hyperlink are both part of the Program Your Website category.


 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Program Your Website > JavaScript Forum

Notices




Reply
 
LinkBack Thread Tools
  #1  
Old Feb 7th, 2006, 20:39
New Member
Join Date: Feb 2006
Location: Norwich, UK
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Javascript Hyperlink

Hi all,

I'm having problems with a bit of javascript in one of the pages on a site I'm working on. I have a glossary on the site, and when a word is selected from any page, the Glossary pops up in a new window and goes straight to the word that was just selected. Well, that's what it does 99% of the time - the first time you go in (IE and Firefox), it goes to a random section of the glossary, yet re-selecting the same link, takes you to the right word - any ideas??

THE CODE:

The link:
<a href='#' onclick='newwindow("<A href="http://www.websitename.com/#Example","Glossary");return">http://www.websitename.com/#Example","Glossary");return false'>Click here</a>

The javascript function:
function newwindow(URL,WindowName)
{
var NewWindow
NewWindow=window.open(URL,WindowName,'width=600,he ight=620,titlebar=no,toolbar=no,scrollbars=yes,loc ation=no,status=no,menubar=no,resizable=no');
NewWindow.focus();
}

Extract from glossary code:
<td class='Glossary'><A Name="Example"><b>Description</b></a></td>

Thanks!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

  #2  
Old Feb 11th, 2006, 12:14
masonbarge's Avatar
Highly Reputable Member
Join Date: Jan 2006
Location: Atlanta GA
Posts: 631
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Javascript Hyperlink

I'm not good enough at JS yet to really parse this for you, sorry. But I will say, I'd check the quotation marks in the link.

Code: Select all
"<A href="http://www.websitename.com/#Example"
looks like an error to me, but you may know better than I do.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
javascript, hyperlink

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Hyperlink Rollovers crackafaza Web Page Design 3 Aug 24th, 2007 11:43
Hyperlink buttons scoopslack Flash & Multimedia Forum 3 Mar 8th, 2007 13:02
Targetting two frames from one hyperlink Paul.Yeoman Web Page Design 5 Feb 11th, 2006 21:41
Returning result from db as a hyperlink lobster1983 PHP Forum 2 Sep 18th, 2005 19:59


All times are GMT. The time now is 15:41.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42