Connecting Tech Pros Worldwide Help | Site Map

input button to load new page

Moist
Guest
 
Posts: n/a
#1: Jul 23 '05
Hi,

I know this may be a trivial question but I wonder if it is possible to load
a new HTML page (without opening a new window) by just clicking an input
button.

Is there a way to do this right inside the "input" tag or I must call a
JavaScript function? If this is the later case, how can I do this within
that function?

Thanks!
Moist


Ivo
Guest
 
Posts: n/a
#2: Jul 23 '05

re: input button to load new page


"Moist" wrote[color=blue]
> I know this may be a trivial question but I wonder if it is possible to[/color]
load[color=blue]
> a new HTML page (without opening a new window) by just clicking an input
> button.[/color]

<input type="button" onclick="location.href='/some/page.htm';">
[color=blue]
> Is there a way to do this right inside the "input" tag or I must call a
> JavaScript function? If this is the later case, how can I do this within
> that function?[/color]

Both is possible. There may be a few advantages in creating a function if
the url of the new page is in a variable or something.
The question is whether your users will understand what is going on, as
input buttons do not usually load new pages.
--Iv


Lasse Reichstein Nielsen
Guest
 
Posts: n/a
#3: Jul 23 '05

re: input button to load new page


"Ivo" <no@thank.you> writes:
[color=blue]
>
> <input type="button" onclick="location.href='/some/page.htm';">[/color]

Or, without javascript:

<form action="/some/page.html"><input type="submit" value="Go!"></form>

/L
--
Lasse Reichstein Nielsen - lrn@hotpop.com
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
'Faith without judgement merely degrades the spirit divine.'
Moist
Guest
 
Posts: n/a
#4: Jul 23 '05

re: input button to load new page



"Lasse Reichstein Nielsen" <lrn@hotpop.com> a écrit dans le message de
news:u0v5inib.fsf@hotpop.com...[color=blue]
> "Ivo" <no@thank.you> writes:
>[color=green]
> >
> > <input type="button" onclick="location.href='/some/page.htm';">[/color]
>
> Or, without javascript:
>
> <form action="/some/page.html"><input type="submit" value="Go!"></form>
>
> /L
> --
> Lasse Reichstein Nielsen - lrn@hotpop.com
> DHTML Death Colors:[/color]
<URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>[color=blue]
> 'Faith without judgement merely degrades the spirit divine.'[/color]

Bingo! This is what I was looking for. To answer the other reply from Ivo,
my users will navigate through pages using buttons, this is to simulate an
application. They won't use the usual navigation stuff.

Thanks!


Closed Thread