CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: General Discussions: General Questions:
HELP! I want to send data with screen refresh

 



jmayes
Deleted

Dec 13, 2000, 8:03 AM

Post #1 of 3 (2204 views)
HELP! I want to send data with screen refresh Can't Post

I want to send data to my CGI/Perl program without creating a refresh or url-redirect.

In other words I want to click on a hyperlink (or equiv) and data travels to the server, no return trip with the displayed page staying static in the browser.
Sorta of like sending a URL request without actually expecting a page to be sent back.

HELP HELP HELP HELP!

Thankx Bunch!
Jeff



sleuth
Enthusiast

Dec 13, 2000, 12:01 PM

Post #2 of 3 (2200 views)
Re: HELP! I want to send data with screen refresh [In reply to] Can't Post

 You can do this with the use of iframes & java script. Put this html on the page that you'll have your link to your cgi on,

<IFRAME SRC="page.htm" WIDTH=1 HEIGHT=1 CROLLING="no" FRAMEBORDER=0 MARGINHEIGHT=0 MARGINWIDTH=0></IFRAME>

And in the page.htm file, put this script in the head

<script language = "javascript>
<! --
self.window.name="little_frame";
// -->
</script>

And now go back to the page with the iframe on it, and the link, in the link make sure that it's targeted to "little_frame", by putting target="little_frame" in the links html.

Then when you click the link, the page / your cgi will load unnoticed in that small Iframe which is 1 x 1 pixel, you'll never see it load, and this way the data will be able to be sent to your script. You can also target forms the same way. In the <form tag just add the target="little_frame">

Sleuth



jmayes
Deleted

Dec 14, 2000, 5:23 AM

Post #3 of 3 (2194 views)
Re: HELP! I want to send data with screen refresh [In reply to] Can't Post

Thank you Sleuth for your help, this sounds do-able. I still have a issue with the time required for the return trip - the browser will appear locked up until the hidden popup window has completed its action. Perhaps someone could help verse me in keeping the connection open?

I am trying to achive real-time control of hardware devices without going to a custom front-end (everybody has a browser already)

Thankx bunch
Jeff



 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives