"Stacey" <stacye@optonline.net> wrote in message
news:uiJPa.21724$hY1.6513370@news4.srv.hcvlny.cv.n et...[color=blue]
> Here is a function that is declared in my html page. It is part of a[/color]
series[color=blue]
> 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[/color]
help[color=blue]
> me?
>
> Somebody mentioned this code, but I am not sure how exactly to go about[/color]
and[color=blue]
> where to put code etc etc. It uses the urlconnection. Not sure of[/color]
syntax.[color=blue]
> Thanks again.
>
http://www.javaworld.com/javaworld/...-javatip34.html
>
>
>
> function dragDone(x,y) {
> startlayer.moveTo(iX,iY)
> alert("Box is done")
>
> need to post to cgi here
>
> }
>
>
>[/color]
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.