Jump to content

value to hyperlink


jjmusicpro

Recommended Posts

My knowledge is limited to this subject. But it seems that if you are going to be using title, you should change it from value to title as well.

e.g.

<a href="" onClick="showHint(this.title)" title="Value 1">Value 1</a>

Link to comment
Share on other sites

<a href="/url/to/current/script.php?var=1" title="Value 1" onclick="return showHint(this.href);">Value 1</a>

 

with this javascript...

 


function showHint(val)
{
var urldata = val.slice(val.indexOf('?'));
var varvals = urldata.split('=');
alert('Value is ' + varvals[1]);
return false;
}

 

Now you could make this kind of javscript even less invasive by using javascript to add the onclick eventhandler- this is difficult in ie as you would have to faff about for hours simply because someone at Microsoft implemented their addevent fucntionality on a friday afternoon - they got to a point where it actually did something and said 'eureka! - time for the pub' they couldn't be bothered to check if it was useful or not....

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.