0

is there a way that I can do this? I want to,
call a java function from an HTML page and set a varaible, (function 1)
then switch to a new web page and read the same varaible that was set, (function 2)
I would like to do this in Java if it is possible. I have tried and each time function 2 show the vaaraible
as undefined, eventhrough it is globally defined in an external .js file that is shared by both HTML files.

What I am tring to do is simply pass a variable from one HTML file to another, using Java.

5
Contributors
4
Replies
5
Views
5 Years
Discussion Span
Last Post by otengkwaku
0

You need some help with server side scripting to pass, read, store, and manipulate the data.

0

If you want it to be done locally (client), Cookies is the way to go. Though, I don't prefer to use it because it is manipulatable by the client unless I don't care for securities. Preferably, server side work is appropriate for most cases.

Edited by Taywin

0

as said early on you can use a server side language. thus you js function1 will pass the value or the varable to a server side script and value will be stoted and when function2 is called it can look up that varable and use it. or you can use cookies. it works the same way you store than you retrive

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.