473,503 Members | 8,784 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Changing parameters in javascript

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

Mar 29 '06 #1
6 1728
da**********@yahoo.com wrote:
this should be simple, but can I change parameters like the url coming
in:

www.testpage.com?test1=a

<script>
The `type' attribute is required in HTML 4:

<script type="text/javascript">
document.setParam("test1", "b");

</script>

something like that?
No, something very different from that.
I want the parameter to change based on the code


Please elaborate. Why do you think this is necessary?
PointedEars
Mar 29 '06 #2
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.

Mar 29 '06 #3
da**********@yahoo.com wrote:
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
Mar 30 '06 #4
All I'm asking if you can change the value of a parameter passed in
from the url.

"http://www.testpage.com?test1=a"

I want to change the value of "test1" from "a" to "b".
Can I do this with javascipt?

Mar 30 '06 #5
Actually I'll just do it in real java.
Most certainly. PointedEars


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

Mar 30 '06 #6
In article <11**********************@v46g2000cwv.googlegroups .com>,
"da**********@yahoo.com" <da**********@yahoo.com> writes
Actually I'll just do it in real java.
Most certainly.PointedEars


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
--
John Harris
Mar 30 '06 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
2516
by: Michel | last post by:
Hi folks, I wonder if what I have in mind is possible, maybe even not all that complicated: I have an image, which is a yellow circle. I want this yellow circle to change color by having 3...
7
2257
by: Hal Vaughan | last post by:
I have a sample script from a book ("Beginning JavaScript" by Paul Wilton) that removes or adds a choice to a <SELECT> element. The <FORM> is form1 and the <SELECT> is theDay. The example uses...
13
26958
by: Al Franz | last post by:
Anyone understand how to pass parameters to a JavaScript. If anyone finds this easy to do maybe they could take a look at my short script on this page and show me how it needs to be changed. ...
11
3000
by: Andrew Thompson | last post by:
I have written a few scripts to parse the URL arguments and either list them or allow access to the value of any parameter by name. <http://www.physci.org/test/003url/index.html>...
3
32120
by: DCB | last post by:
Hello. I have an easy question, likely, that has me in a headspin. I have an include file to a frames based site that basically forces frames on the end user if they visit the site and hit a...
6
1884
by: Thaynann | last post by:
I have an app that i am developing, it access a website via HttpWebRequest and HttpWebResponse classes (eg http://thaynann.com/images/) and at the moment i am able to save all the image files from...
0
1993
by: R L Vandaveer | last post by:
I am having an interesting and rather frustrating issue with the encoding/decoding of parameters with the ASP.NET runtime. What I am doing isn't exactly revolutionary so hopefully someone has an...
7
11264
by: Aaron Gray | last post by:
I put together the following code to get the href's parameters :- function GetParameters() { var arg = new Object(); var href = document.location.href; if ( href.indexOf( "?") != -1) { var...
5
4005
by: leosarasua | last post by:
I am writing a page in French and I need to create a confirm box, but I want to change the labels of the buttons from "OK" and "Cancel" into "Oui" and "Non". I've looked around and it seems...
0
7194
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7070
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7267
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7316
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6976
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7449
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
4993
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3160
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
372
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.