input button to load new page

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Moist

    #1

    input button to load new page

    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

    #2
    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="locati on.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


    Comment

    • Lasse Reichstein Nielsen

      #3
      Re: input button to load new page

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

      Or, without Javascript:

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

      /L
      --
      Lasse Reichstein Nielsen - lrn@hotpop.com
      DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleD OM.html>
      'Faith without judgement merely degrades the spirit divine.'

      Comment

      • Moist

        #4
        Re: input button to load new page


        "Lasse Reichstein Nielsen" <lrn@hotpop.com > a écrit dans le message de
        news:u0v5inib.f sf@hotpop.com.. .[color=blue]
        > "Ivo" <no@thank.you > writes:
        >[color=green]
        > >
        > > <input type="button" onclick="locati on.href='/some/page.htm';">[/color]
        >
        > Or, without Javascript:
        >
        > <form action="/some/page.html"><inp ut type="submit" value="Go!"></form>
        >
        > /L
        > --
        > Lasse Reichstein Nielsen - lrn@hotpop.com
        > DHTML Death Colors:[/color]
        <URL:http://www.infimum.dk/HTML/rasterTriangleD OM.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!


        Comment

        Working...