Changing parameters in javascript

D

danparker276

this should be simple, but can I change parameters like the url coming
in:

www.testpage.com?test1=a

<script>
document.setParam("test1", "b");

</script>

something like that? I want the parameter to change based on the code
 
D

danparker276

The .jsp is using struts logic based on a parameter that is passed in.

I want to read from a cookie and change that parameter (if needed).


I don't use javascript that much and can't think right now, it must be
simple.
 
T

Thomas 'PointedEars' Lahn

The .jsp is using struts logic based on a parameter that is passed in.

So? JSP is no JavaScript Pages, it is Java ServerPages. Written
in an entirely different language; one not discussed here.
I want to read from a cookie and change that parameter (if needed).

Not understood. Do you want to change the cookie data with client-side
script?
I don't use javascript that much and can't think right now, it must be
simple.

Most certainly.


PointedEars
 
D

danparker276

Actually I'll just do it in real java.

Thanks for the atitude, howd you like it if I shoved one of your pointy
ears up your butt.
 
L

Lee

(e-mail address removed) said:
The .jsp is using struts logic based on a parameter that is passed in.

I want to read from a cookie and change that parameter (if needed).


I don't use javascript that much and can't think right now, it must be
simple.


If the page is generated by JSP, the Javascript won't exist until
after the .jsp file has executed.

Changing any part of the URL with client-side code will cause the
new URL to be loaded, which is probably not what you want.


--
 
J

John G Harris

Actually I'll just do it in real java.


Thanks for the atitude, howd you like it if I shoved one of your pointy
ears up your butt.

Ask a confused question and you get a confusing answer.

John
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,430
Messages
2,571,676
Members
48,796
Latest member
Greg L.

Latest Threads

Top