-
Who Knows
How I can retrive from URL, query string collection value using JavaScript.
Please help me if you know.
and
Please, can you tell me if you know some other sites where I can ask some
questions or look like this site.
Please!!!!
-
Re: Who Knows
Hello Alex:
In Java, use the StringTokenizer class and set the delimiters to ?, &, =,
+ or whatever is separating the "chunks" in your URL. Retrieve the URL string,
pass it through the tokenizer and store the individual chunks however you'd
like.
In Javascript, it's little more difficult but I'd start with the indexOf
operator. Here's a function that checks for a valid e-mail address for a
form element but could just as easily take a string (not what you wanted
but you'll get the idea):
function isEmail(elm) {
if (elm.value.indexOf("@") + "" != "-1" &&
elm.value.indexOf(".") + "" != "-1" &&
elm.value != "")
return true;
else return false;
}
Just check your URL string using a mechanism like this and store the pieces
in between the indeces.
As far as other discussion boards go, Sun has a big one on Java through their
Developers Connection arm. I don't know the URL off hand.
You might also try http://www.delphi.com/ab-java. You'll need to become
a Delphi member but it's free and relatively harmless (they only spam me
about once a month and it is only regarding updates to the board - never
any sales stuff).
For Javascript try:
http://www.jsworld.com (haven't been there in a while but it used to be THE
place) and
http://www.delphi.com/dynamicdesign (same stuff about Delphi as above)
HTH,
Tom Duffy
Assistant Professor, CIS
Norwalk Community College
http://www.bright-moments.com/javasite
"Alex" <sycale@yahoo.com> wrote:
>
>How I can retrive from URL, query string collection value using JavaScript.
>Please help me if you know.
>
>and
>
>Please, can you tell me if you know some other sites where I can ask some
>questions or look like this site.
>Please!!!!
>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks