misdst23 wrote:
I've come accross your point about javascript being on the client and
java on the server. BUT, the client side javascript function IS able to
pass a constant as a parameter to the server side java. It seems
logical to me that javascript should have a means to pass a variable.
Obviously, there is some sort of TCP connection going on in the back
end that allows the constant to be sent to the server. But since the
functionality is there maybe javascript should be standardized to allow
some way to pass a variable.
Your missing something very key here, that is javascript cannot access
java.
What is can access are the RESULTS of that java method. You see by the
time javascript is running, the JSP has already rendered itself to HTML
output and is done.
>
Thanks, I think i'll have to look into XMLHttpRequest.
Using this you can pass a javascript variable to serverside process. If
this results in changes on the page, you'll have to either reload the
page or execute the changes yourself in javascript.
>
Also, how can I use a image preload get to transmit a string to the
server, i've heard this is possible.
By using a server side process (like a servlet) to provide the image
data, and appending a query string to the img src parameter. The server
side process will receive the request (headers, parameters and all) and
can process it before transmitting image data back (or it may not
actually send anything back...)
HTH.
>
Thanks,