...

View Full Version : quick onlclick.href question



canadianjameson
09-16-2005, 04:56 PM
hey.

i have this div here



<DIV title='View "LTX15" details' style="CURSOR: hand"
onclick="location.href='ltx15.htm'">


and i want the onclick="location.href='ltx15.htm'"> part to open a custom js window that uses this href="javascript:newWinProdInfo('ltx15.htm')">

i tried
onclick.href='javascript:newWinProdInfo(\'ltx15.htm\')'> but it didnt work.

what little tidbit am i missing?

_Aerospace_Eng_
09-16-2005, 04:58 PM
For one you are using single quotes in your function AND the onclick. Its either double in the onclick and single in the function or the other way around not both, but you escaped the quotes but the javascript: isn't needed and there is no such thing as onclick.href

onclick="newWinProdInfo('ltu01.htm')"
Now you have to ask yourself why are you using an onclick in a div when you can easily use a link that fills up the whole div.

canadianjameson
09-16-2005, 05:24 PM
true... but that would involve asking myself a question... at which point i might hear voices answering me (they tell me i'm pretty...)

:D

it actually has its purpose; each div holds like 6 links to the same url (i'm redoing someones dirty code) so i just figured toss a div around it all and lose the 6 links.

dude you're 2 posts away from 3000... you bess do a happydance!

_Aerospace_Eng_
09-16-2005, 05:36 PM
Lol I just noticed my post count. Does the happy dance.
http://img.photobucket.com/albums/v153/Panarra/gifanim/zoidberg_dance_animate.gif

Bill Posters
09-16-2005, 05:40 PM
it actually has its purpose; each div holds like 6 links to the same url (i'm redoing someones dirty code) so i just figured toss a div around it all and lose the 6 links.
Doesn't sound much like a cleaner solution to me.
Sounds like you're actually making the content at the end of those links less accessible.

canadianjameson
09-16-2005, 05:41 PM
baahahaha

thats frikkin awesome!

made my day



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum