...

View Full Version : need help with a jvs function which opens new window



shingen
07-13-2007, 09:54 AM
Can anyone help me with this?

function gotoshow(){
if (!window.winslide||winslide.closed)
winslide=window.open(slidelinks[whichlink])
else
winslide.location=slidelinks[whichlink]
winslide.focus()
}


I need to change this function to DO NOT open "slidelinks" in new window, but in same window as the image witch uses this function.

Thanks a lot for help, I am a newbie in javascript...

mcjwb
07-13-2007, 02:09 PM
You need to set the location.href property to the required url, e.g.


function gotoshow(){
location.href = slidelinks[whichlink];
}

P.S. "witch" is spelt "which" in this context.
P.P.S. javascript is usually abbreviated to "js" not "jvs".

shingen
07-13-2007, 03:57 PM
thanks a lot, mcjwb, it works.

P.S.: english and js are not my native languages :o))



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum