469,328 Members | 1,316 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,328 developers. It's quick & easy.

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="location='cgi-bin/writeVal.exe?PLCO2+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,
Jul 23 '05 #1
5 1849
"Daniel H." wrote:
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="location='cgi-bin/writeVal.exe?PLCO2+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,


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 <gw*****@agricoreunited.com>

* Client-side Javascript and Netscape 4 DOM Reference available at:
*
http://devedge.netscape.com/library/...ce/frames.html

* 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
Jul 23 '05 #2
Daniel H. wrote:
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="location='cgi-bin/writeVal.exe?PLCO2+0';"></form>

As result i see a new page with "0" or "1", which i'd like to hide.
[...]


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

PointedEars
Jul 23 '05 #3
Thomas 'PointedEars' Lahn wrote:
Daniel H. wrote:

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="location='cgi-bin/writeVal.exe?PLCO2+0';"></form>

As result i see a new page with "0" or "1", which i'd like to hide.
[...]

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


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

http://www.jibbering.com/faq/#FAQ4_38

Which leads to:

http://jibbering.com/2002/4/httprequest.html
--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/
Jul 23 '05 #4
On Wed, 19 May 2004 15:48:48 -0400, Randy Webb
<hi************@aol.com> wrote:
Thomas 'PointedEars' Lahn wrote:
Which leads to:

http://jibbering.com/2002/4/httprequest.html


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

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

Jul 23 '05 #5
Jim Ley wrote:
On Wed, 19 May 2004 15:48:48 -0400, Randy Webb
<hi************@aol.com> wrote:


Please ...
Thomas 'PointedEars' Lahn wrote:
Which leads to:

http://jibbering.com/2002/4/httprequest.html


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


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
Jul 23 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Building Blocks | last post: by
4 posts views Thread by multimatum2 | last post: by
4 posts views Thread by jerryyang_la1 | last post: by
3 posts views Thread by jeff29_b | last post: by
11 posts views Thread by Zytan | last post: by
19 posts views Thread by zacks | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
reply views Thread by Purva khokhar | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.