Skip to main content
Inspiring
March 24, 2009
Question

Application Scope

  • March 24, 2009
  • 2 replies
  • 717 views
Hi Community!

How do I change the value of an application variable on the event onSubmit()?

I don't know if I can use javascript to modify application variables. I think I can't but I wanted to hear from the experts :-)

Thanks!

Ysais.
This topic has been closed for replies.

2 replies

Inspiring
March 24, 2009
Actually, all local variables disappear once a page has been submitted. Also, what do you want to do if another user had submitted that page in the last hour? What about if the user had submitted another page in the last hour?

The gist of all this is that application variables might not be the best way to accomplish your goal.
Inspiring
March 24, 2009
Dan, you just made a good point!

I better start thinking about some solutions :-)

Thanks Dan and Ian!
Inspiring
March 24, 2009
apocalipsis19 wrote:
> I don't know if I can use javascript to modify application variables. I think
> I can't but I wanted to hear from the experts :-)

Code running in a client (AKA JavaScript) can *NOT* change any values in
memory on the server or vice a versa.

If you want the client to communicate anything to the server it must use
some type of communication with it. The normal would be a HTTP request
either a normal get or post request or a JavaScript request object AKA AJAX.
Inspiring
March 24, 2009

Thanks Ian!

Any short example of code structure I should follow?