Forum Moderators: open

Message Too Old, No Replies

Open url from input button

simple question :)

         

webstyler

7:33 am on Jun 15, 2005 (gmt 0)

10+ Year Member



Hi to all

<input type="button" name="back" value="back" class="input" onClick="javascript:window.open('page.php?c=reg2');">

This button is a "Retunr back".. but I must open link "into" my window and not in new window.

?

thks

rocknbil

4:41 pm on Jun 15, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



<input type="button" name="back" value="back" class="input" onClick="javascript:window.location='page.php?c=reg2';">

But if you **really** want it to be a back button,

<input type="button" name="back" value="back" class="input" onClick="javascript:history.back();">

or

<input type="button" name="back" value="back" class="input" onClick="javascript:history.go(-1);">

webstyler

4:50 pm on Jun 15, 2005 (gmt 0)

10+ Year Member



thks, I try immediatly this :
<input type="button" name="back" value="back" class="input" onClick="javascript:window.location='page.php?c=reg2';">

I use this but have problem with recursive posting...
<input type="button" name="back" value="back" class="input" onClick="javascript:history.back();">

I think that the first is perfect ;)
thks

rocknbil

7:20 pm on Jun 15, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



So the previous page auto-posts to this one? Then you can use the history one, history.go(-2) jumps back TWO pages. But as long as it works, it's all good.