Who Knows


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Who Knows

  1. #1
    Alex Guest

    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!!!!


  2. #2
    Tom Duffy Guest

    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
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center