PDA

View Full Version : javascript getUrl


eggnogg
02-21-2006, 12:31 AM
hi guys

im new to javascript and ive been searching around for some time for someway of doing this:

var ="http://ww.google.com"

<a href="javascript:var">click</a>

is there a way without the new.window...stat..obje..funct...thing? lol

eggnogg
02-21-2006, 12:53 AM
ive got

function gogo() {
someshit
}
<a href="javascript:gogo()">clicky,clicky</a>

but im missigng the someshit part :/

return doesnt work, document.write neither..

if anybody can point out the if im in the right direction id appretiate that little step for man and a big step for mankind

thx

EDIT: got it..

function gogo() {
location.href = "www.someplace.com";
}
<a href="javascript:gogo()">clicky,clicky</a>