form button onclick and hide result

D

Daniel H.

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,
 
G

Grant Wagner

Daniel H. said:
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 <[email protected]>

* Client-side Javascript and Netscape 4 DOM Reference available at:
*
http://devedge.netscape.com/library/manuals/2000/javascript/1.3/reference/frames.html

* Internet Explorer DOM Reference available at:
*
http://msdn.microsoft.com/workshop/author/dhtml/reference/dhtml_reference_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-developer/upgrade_2.html
 
T

Thomas 'PointedEars' Lahn

Daniel said:
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
 
R

Randy Webb

Thomas said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top