form button onclick and hide result

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

    #1

    form button onclick and hide result

    Problem: I want to send an URL via button but i don't want to get the result.

    At the moment i use this form to send the URL, which enables a control unit:
    <form><input type=button value="switch on"
    onclick="locati on='cgi-bin/writeVal.exe?PL CO2+0';"></form>

    As result i see a new page with "0" or "1", which i'd like to hide.
    What can i do to send the URL without getting the result to the browser ?

    Thanks,
  • Grant Wagner

    #2
    Re: form button onclick and hide result

    "Daniel H." wrote:
    [color=blue]
    > Problem: I want to send an URL via button but i don't want to get the result.
    >
    > At the moment i use this form to send the URL, which enables a control unit:
    > <form><input type=button value="switch on"
    > onclick="locati on='cgi-bin/writeVal.exe?PL CO2+0';"></form>
    >
    > As result i see a new page with "0" or "1", which i'd like to hide.
    > What can i do to send the URL without getting the result to the browser ?
    >
    > Thanks,[/color]

    You could write the value to a cookie and retrieve it on the next page, but at
    some point the browser still has to know what the value is that is being written.

    --
    | Grant Wagner <gwagner@agrico reunited.com>

    * Client-side Javascript and Netscape 4 DOM Reference available at:
    *


    * Internet Explorer DOM Reference available at:
    *
    http://msdn.microsoft.com/workshop/a...ence_entry.asp

    * Netscape 6/7 DOM Reference available at:
    * http://www.mozilla.org/docs/dom/domref/
    * Tips for upgrading JavaScript for Netscape 7 / Mozilla
    * http://www.mozilla.org/docs/web-deve...upgrade_2.html


    Comment

    • Thomas 'PointedEars' Lahn

      #3
      Re: form button onclick and hide result

      Daniel H. wrote:
      [color=blue]
      > Problem: I want to send an URL via button but i don't want to get the result.
      >
      > At the moment i use this form to send the URL, which enables a control unit:
      > <form><input type=button value="switch on"
      > onclick="locati on='cgi-bin/writeVal.exe?PL CO2+0';"></form>
      >
      > As result i see a new page with "0" or "1", which i'd like to hide.
      > [...][/color]

      This is (bordering to) a FAQ, please search before you post.
      Ask Google (Groups) for "XMLHttp OR XMLHTTPRequest" (sic!).


      HTH

      PointedEars

      Comment

      • Randy Webb

        #4
        Re: form button onclick and hide result

        Thomas 'PointedEars' Lahn wrote:[color=blue]
        > Daniel H. wrote:
        >
        >[color=green]
        >>Problem: I want to send an URL via button but i don't want to get the result.
        >>
        >>At the moment i use this form to send the URL, which enables a control unit:
        >><form><inpu t type=button value="switch on"
        >>onclick="loca tion='cgi-bin/writeVal.exe?PL CO2+0';"></form>
        >>
        >>As result i see a new page with "0" or "1", which i'd like to hide.
        >>[...][/color]
        >
        >
        > This is (bordering to) a FAQ, please search before you post.
        > Ask Google (Groups) for "XMLHttp OR XMLHTTPRequest" (sic!).[/color]

        And before you refer someone to Google, why not refer them to the
        HTTPRequest references in the FAQ?



        Which leads to:




        --
        Randy
        Chance Favors The Prepared Mind
        comp.lang.javas cript FAQ - http://jibbering.com/faq/

        Comment

        • Jim Ley

          #5
          Re: form button onclick and hide result

          On Wed, 19 May 2004 15:48:48 -0400, Randy Webb
          <hikksnotathome @aol.com> wrote:
          [color=blue]
          >Thomas 'PointedEars' Lahn wrote:
          >Which leads to:
          >
          >http://jibbering.com/2002/4/httprequest.html[/color]

          I believe it's somewhat out of date now, and may not even be correct
          for Mozilla (and safari?)

          Jim.
          --
          comp.lang.javas cript FAQ - http://jibbering.com/faq/

          Comment

          • Thomas 'PointedEars' Lahn

            #6
            Re: form button onclick and hide result

            Jim Ley wrote:
            [color=blue]
            > On Wed, 19 May 2004 15:48:48 -0400, Randy Webb
            > <hikksnotathome @aol.com> wrote:[/color]

            Please ...
            [color=blue][color=green]
            >>Thomas 'PointedEars' Lahn wrote:
            >>Which leads to:
            >>
            >>http://jibbering.com/2002/4/httprequest.html[/color]
            >
            > I believe it's somewhat out of date now, and may not even be correct
            > for Mozilla (and safari?)[/color]

            WFM. Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8a)
            Gecko/20040513 Firefox/0.8.0+

            See <http://www.mozilla.org/xmlextras/>.


            PointedEars

            Comment

            Working...