Submit Your Article Webforumz RegistrationAnnouncements Contact Webforumz StaffContact
Home Resources Blogs Meet the Team Contact Register
 

Go Back   WebForumz.com > The Code > JavaScript

Reply
 
LinkBack Thread Tools
Old February 7th, 2006, 04:39 PM   #1
New Member
 

Join Date: Feb 2006
Location: Norwich, UK
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 kato77 is on a distinguished road
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!
kato77 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old February 11th, 2006, 08:14 AM   #2
Highly Reputable Member
 
masonbarge's Avatar
 

Join Date: Jan 2006
Location: Atlanta GA
Posts: 649
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 masonbarge will become famous soon enough
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:
"<A href="http://www.websitename.com/#Example"
looks like an error to me, but you may know better than I do.
masonbarge is offline  
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

Bookmarks

Tags
javascript , hyperlink


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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 HTML, XHTML and CSS 3 August 24th, 2007 07:43 AM
Permission to hyperlink....? colinmcgray Legal Discussion 8 June 15th, 2007 10:41 PM
Hyperlink buttons scoopslack Flash and ActionScript 3 March 8th, 2007 09:02 AM
Targetting two frames from one hyperlink Paul.Yeoman HTML, XHTML and CSS 5 February 11th, 2006 05:41 PM
Returning result from db as a hyperlink lobster1983 PHP 2 September 18th, 2005 03:59 PM


Search Engine Optimization by vBSEO 3.2.0 RC8