PDA

View Full Version : how to open in the same window..?


nine09
01-14-2006, 04:18 AM
I dont know if this is the right place to post this.

ok so this is what I got in the HTML page:

<!--
/*Full screen window opener script*/
function winopen(){
var targeturl="redirector.htm"
newwin=window.open("","","scrollbars")
if (document.all){
newwin.moveTo(0,0)
newwin.resizeTo(screen.width,screen.height)
}
newwin.location=targeturl
}
//-->
</script>

<input type="image" onClick="winopen()" value="Open window" name="image" src="index.jpg" width="600" height="257"class="gradualshine" onMouseover="slowhigh(this)" onMouseout="slowlow(this)">



I just wonder how I can make redirector.htm open in the SAME window...

aluminumpork
01-14-2006, 06:41 AM
Simple, basically shrink down your current winopen function to two lines.



function winopen(){
var targeturl = 'redirector.htm';
window.location.href = targeturl;
}



There ya go.