Go Back   United Bimmer Community - BMW Forum > UnitedBimmer- Off Topic > United Off Topic  **FOR MEMBERS ONLY** > Geek Chat
FAQ Members List Calendar Advertise With Us Mark Forums Read

Geek Chat Ask computer questions or just engage in general geek talk on here

Reply
 
Thread Tools
Old 03-08-2006, 10:27 PM   #1
komodo
 
komodo's Avatar

Name: komodo
Title: Administrator
Status: Offline
Join Date: Apr 2005
Location: Athens, GA
Rate My Car: 68 / 340
Your Ride: 1995 M3
Question Calling HTML/Javascript Guru's

Okay, I don't know if this is possible at all, but if so, does anyone have any ideas of how to do it?

I want to have the href part of an anchor link point to one location for SEO purposes (so a crawler follows it there), but have the click actually take you somewhere else. My idea was to encode an onclick hook with Javascript to redirect the window.location(), however that doesn't work. Obviously the href trumps that. I even considered prefixing the onclick function with a "return" or "exit", trying to half the previous pageload command, but alas, no luck.

With examples, my original link:

[code]<a href="showthread.php?goto=newpost&amp;t=1234">Test ing</a>[/code]

Simple enough, but if I allow a search engine crawler to go there, it'll cause a duplicate page in the SERPs... the same as thread1234.html. I want the crawler to essentially see the link like this:

[code]<a href="thread1234.html">Testing</a>[/code]

But direct the user to the last post of it. Here's my idea that didn't work:

[code]<a href="thread1234.html" onclick="window.location ='showthread.php?goto=newpost&amp;t=1234'">Testing </a>[/code]

Anyone else have any ideas?

Thanks.
__________________

  Reply With Quote
Old 03-09-2006, 10:27 AM   #2
jms
 
jms's Avatar

Name: jms
Title: ______
Status: Offline
Join Date: Jul 2005
Location: Pittsburgh,PA
Rate My Car: 105 / 340
Your Ride: 99 328I Convertible
try this [HTML]<a href="thread1234.html" onMouseOver="this.href='showthread.php?goto=newpos t&amp;t=1234'">Testing</a>[/HTML]
  Reply With Quote
Old 03-09-2006, 10:28 AM   #3
jms
 
jms's Avatar

Name: jms
Title: ______
Status: Offline
Join Date: Jul 2005
Location: Pittsburgh,PA
Rate My Car: 105 / 340
Your Ride: 99 328I Convertible
the mouseover just makes sure the person has a mouse to over with, and it permantly changes the link for them once they get the mouse on it
  Reply With Quote
Old 03-09-2006, 10:38 AM   #4
komodo
 
komodo's Avatar

Name: komodo
Title: Administrator
Status: Offline
Join Date: Apr 2005
Location: Athens, GA
Rate My Car: 68 / 340
Your Ride: 1995 M3
Ah, very nice. I didn't think of that. Thanks!

It works great in Firefox, but I broke IE on my computer so I can't test it. It's being used on all the last-posted-in thread names when viewing the forum homepage. Anyone have any problems with it in IE?
__________________

  Reply With Quote
Old 03-09-2006, 11:24 AM   #5
jms
 
jms's Avatar

Name: jms
Title: ______
Status: Offline
Join Date: Jul 2005
Location: Pittsburgh,PA
Rate My Car: 105 / 340
Your Ride: 99 328I Convertible
I tested in IE6
  Reply With Quote
Old 03-09-2006, 11:27 AM   #6
komodo
 
komodo's Avatar

Name: komodo
Title: Administrator
Status: Offline
Join Date: Apr 2005
Location: Athens, GA
Rate My Car: 68 / 340
Your Ride: 1995 M3
Great, thank you.
__________________

  Reply With Quote
Reply


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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Calling all sig makers EnvyM3 Video and other Multimedia 12 03-20-2006 11:43 AM
Calling ALL 'Codebreakers' Timboy E46 9 12-19-2005 04:34 PM
Answering Machine Messages komodo Comedy Collection
11 10-27-2005 03:57 PM
Calling all Artists! Cellardoor United Off Topic  **FOR MEMBERS ONLY** 4 08-16-2005 01:19 AM


All times are GMT -5. The time now is 11:59 PM.

A vBSkinworks Design

 
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Copyright © 2005-2013 UnitedBimmer.com