473,655 Members | 3,114 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.setPar am("test1", "b");

</script>

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

Mar 29 '06 #1
6 1736
da**********@ya hoo.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.setPar am("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**********@ya hoo.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.co m?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************ **********@v46g 2000cwv.googleg roups.com>,
"da**********@y ahoo.com" <da**********@y ahoo.com> writes
Actually I'll just do it in real java.
Most certainly.PointedEar s


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
2527
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 sliders (RGB) on a website and a button to process it. Is this at all possible and could someone point me in the right direction or
7
2282
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 these lines (full text is below): if (document.form1.theDay.options.text != "Wednesday) { var days = document.form1.theDay; days.options.text = days.options.text; <snip> var option - new Option("Wednesday", 2);
13
26982
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. http://franz.org/java.htm Thanks for any help.
11
3018
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> <http://www.physci.org/test/003url/index.html?url=http://mybiz.com/&that=this&when=now#21> <http://www.physci.org/test/003url/index.html?url=http://mybiz.com/&when=now> Before I go offering it in public (and writing it into any number of the 'development kits'...
3
32141
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 non-frames created page... Simply, it is: if (parent != self)
6
1888
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 this page (by grabbing their URLs and calling WebClient.DownloadData() and save them to my PC), wat i need to do is to be able to have the applicaiton automatically move to the next page of images (the issue is that the next page doesnt appear to...
0
2007
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 answer for this. I have a page that accepts a number of parameters. Those parameters may sometimes include URL reserved characters like spaces and ampersands. I use a combination of HTML and URL encoding to build links to this page and...
7
11276
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 params = href.split( "?");
5
4019
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 impossible to do this, so my question is: why is the confirm method so restrictive? All it needs is a question string and two labels for the true and false buttons. Why was it defined with only one parameter, instead of, let's say one mandatory and...
0
8296
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8816
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
7310
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5627
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4150
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4299
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2721
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1928
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1598
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.