SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Hybrid View

  1. #1
    SitePoint Member Facecat's Avatar
    Join Date
    Apr 2003
    Location
    Canada
    Posts
    13
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Passing a variable from a URL to Javascript

    Hello. I'm trying to figure out how to pass values from a url into the javascript of the page, so when someone clicks on a link, they are sent to a page that displays stuff based on the values it gets from the link. What I mean is, using a url like

    http://www.whatever.com/greetingcard...ipientname=Bob

    To pass the variable Bob into the scrip in greetingcard.html so it will show a page customized for Bob (eg "Merry Christmas Bob!"). Ideally I'd like to be able to pass multiple variables as well ("Happy 11th Birthday, Bob! Love your brother Joe".

    Anyway, I'd really appreciate if someone could lend me a hand here.

  2. #2
    011521 dbalsdon's Avatar
    Join Date
    Feb 2003
    Location
    North Of Scotland
    Posts
    444
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Daniel Balsdon
    My Site

  3. #3
    Web-coding NINJA! silver trophy beetle's Avatar
    Join Date
    Jul 2002
    Location
    Dallas, TX
    Posts
    2,900
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I've got a script for that too, the Get Class

    http://www.peterbailey.net/dev/jsclasses/
    beetle a.k.a. Peter Bailey
    blogs: php | prophp | security | design | zen | software
    refs: dhtml | gecko | prototype | phpdocs | unicode | charsets
    tools: ide | ftp | regex | ffdev





Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •