473,399 Members | 4,177 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

Need help with posting to CGI from javascript

Here is a function that is declared in my html page. It is part of a series
of javascript that allows the user to draw a rectangle on a graphic. This
is called when the box is done, so I would like to send the screen coords
which I know already to a cgi script at this point below. Can anybody help
me?

Somebody mentioned this code, but I am not sure how exactly to go about and
where to put code etc etc. It uses the urlconnection. Not sure of syntax.
Thanks again.
http://www.javaworld.com/javaworld/j...javatip34.html

function dragDone(x,y) {
startlayer.moveTo(iX,iY)
alert("Box is done")

need to post to cgi here

}

Jul 20 '05 #1
2 4476

"Stacey" <st****@optonline.net> wrote in message
news:ui*********************@news4.srv.hcvlny.cv.n et...
Here is a function that is declared in my html page. It is part of a series of javascript that allows the user to draw a rectangle on a graphic. This
is called when the box is done, so I would like to send the screen coords
which I know already to a cgi script at this point below. Can anybody help me?

Somebody mentioned this code, but I am not sure how exactly to go about and where to put code etc etc. It uses the urlconnection. Not sure of syntax. Thanks again.
http://www.javaworld.com/javaworld/j...javatip34.html

function dragDone(x,y) {
startlayer.moveTo(iX,iY)
alert("Box is done")

need to post to cgi here

}


function dragDone(x,y) {
startlayer.moveTo(iX,iY);
alert("Box is done");

if ("java"=="javscript") {
alert("Ask question in comp.lang.java.help");
} else {
alert("Ask question in comp.lang.javascript");
}
}


But if you really want to know, this is what I like to do:

I create a hidden frame, be it an iframe or from a frameset. Have a form in
there that will receive data from the dragDone(x,y) function. Submit the
form to you cgi. This will prevent the main window from submiting the data
(and prevent the user from doing more things). From what I'm guessing, you
may need some way to buffer the input and send larger packets of input
together.
Jul 20 '05 #2
"Stacey" <st****@optonline.net> wrote in message
news:ui*********************@news4.srv.hcvlny.cv.n et...
Here is a function that is declared in my html page. It is part of a series of javascript that allows the user to draw a rectangle on a graphic. This
is called when the box is done, so I would like to send the screen coords
which I know already to a cgi script at this point below. Can anybody

help
# 30:

http://savage.net.au/Perl-tuts-1-30.html

--
Ron Savage
ro*@savage.net.au
http://savage.net.au/index.html
Jul 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Krechting | last post by:
Hi All, I need a button on my form that opens a new window. I put in a submit button but it always returns to my first page. And then my first page is empty. What button do I need to go to...
17
by: Sue | last post by:
<html> Is there someone here that can help me validate the period as the fourth from the last character in an email address. There is other information and validation on the form I have to do but...
8
by: Tom | last post by:
Please help. I need a quick little scrpit to place on a web page that will count how many days have passed since January 1, 1970. I have ZERO experience writing ANY scripts. Anyone have any...
2
by: Axel Foley | last post by:
Hi Folks, i'm newbie at JS; but "learning by tweaking" is my middle name! Trying to set up a link partnership application on a client's site; got this script at "The Javascript Source", but it...
4
by: nsr93 | last post by:
I am not sure if this was the proper group to post this, but here is my question: I am a Java consultant. I have new client I am working for to make a web based application similar to an...
35
by: Boobie | last post by:
I need to escape HTML chracters so <test> --> &lt;test&gt; Looks like there is no built-in JS function...anyone got one handy ? thanks
2
by: techfuzz | last post by:
I scoured this group and others looking for the best way to disable a button after the first click to prevent multiple submissions, but never did find anything that worked like they said it would. ...
4
by: usl2222 | last post by:
Hi folks, I appreciate any assistance in the following problem: I have a form with a bunch of dynamic controls on it. All the controls are dynamically generated on a server, including all...
2
by: OTSolutions | last post by:
This line of code works in IE but not in Firefox or Netscape for some reason. Any ideas as to why would be appreciated, It is the NavigateURL part. IE brings up the page, the other two...
3
by: Dean Craig | last post by:
I'm working with the new ASP.NET AJAX Control Toolkit. I have a map that has several key areas (hot spots) where when the user hovers over them, I want to pop up a small window with information in...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.