In article <d2k7p8$flb$1@s s405.t-com.hr>, nospam@xxx.com enlightened us
with...[color=blue]
> how create redirection to some URL by clicking on the form button?
>
> any ideas?[/color]
Plenty.
The simplest being
onClick="top.lo cation.replace( 'myNewLocation. html');"
(which will also break out of a frameset)
There are more ways to do this (server-side, mostly) if you need to pass
header or request info or want to keep history, replace only one frame, etc.
[color=blue]
> Plenty.
> The simplest being
> onClick="top.lo cation.replace( 'myNewLocation. html');"
> (which will also break out of a frameset)
>[/color]
RE: sorry I am javascript newbie
where add it:
<html>
<head>
<title>Untitl ed Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Untitl ed Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
In article <d2kgqe$r1$1@ss 405.t-com.hr>, nospam@xxx.com enlightened us
with...[color=blue]
> and
>
> <input type="submit" name="Submit"
> onclick="top.lo cation.replace( 'myNewLocation. html');form1.su bmit();">
>
>
> but nothing..
>[/color]
You can't do that. The replace of the location wipes out the form.
What exactly are you trying to accomplish here? I think there's a better way
for you than this.
If you just want to redirect to a page when a user clicks a button, do it
this way:
[color=blue]
>
> What exactly are you trying to accomplish here? I think there's a better
> way
> for you than this.
> If you just want to redirect to a page when a user clicks a button, do it
> this way:
>
> <form>
> <input type="button" name="b1" value="click here"
> onClick="top.lo cation.replace( 'myPage.html'); ">
> </form>
>
> Note: change myPage.html to a REAL page/URL. That's just an example.[/color]
RE: yes it work, if I have not form action "/masterpanel/index.cgi"!
but I must have it because YES button!
<form name="form1" method="post" action="/masterpanel/index.cgi">
"PHP2" <nospam@nospam. tv> wrote in message
news:d2rm45$bsl $1@ss405.t-com.hr...[color=blue]
>[color=green]
>>
>> What exactly are you trying to accomplish here? I think there's a better
>> way
>> for you than this.
>> If you just want to redirect to a page when a user clicks a button, do it
>> this way:
>>
>> <form>
>> <input type="button" name="b1" value="click here"
>> onClick="top.lo cation.replace( 'myPage.html'); ">
>> </form>
>>
>> Note: change myPage.html to a REAL page/URL. That's just an example.[/color]
>
>
> RE: yes it work, if I have not form action "/masterpanel/index.cgi"!
>
> but I must have it because YES button!
> <form name="form1" method="post" action="/masterpanel/index.cgi">
>
> how can NO button work at same time?
>[/color]
Comment