SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Enthusiast
    Join Date
    Jul 2001
    Location
    Ireland
    Posts
    90
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Javascript and links

    Hi,

    Is there a way to use javascript to solve the following task?

    The two methods that I use to get variable names and values to the server are:

    1. Getting the name and value from a form or hidden variable and then hitting an "<Input type=submit>" button to post data;

    or

    2. Using a link "www.mysite.com/page.php?city=sydney&fname=john&age=10"


    With regard to method 2, if I have 100 links like the one above, each with different fname and age values but all with the same city value, is there any way that I can avoid having to include city=sydney on each link yet still getting the city name and value from the webpage to the server?

    There are lots of pages, each with 100 links.Each individual page will have the 100 links but a different city name.

    All pages will call upon the same php script.

    Thanks in advance for you help.

    Willie

  2. #2
    We like music. weirdbeardmt's Avatar
    Join Date
    May 2001
    Location
    Channel Islands Girth: Footlong
    Posts
    5,882
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you're going to have that many inserts for each city would you be able to have a separate table for each city. That would avoid the need for the link, but might not suit your table structure.
    I swear to drunk I'm not God.
    Matt's debating is not a crime
    Hint: Don't buy a stupid dwarf Clicky

  3. #3
    SitePoint Enthusiast
    Join Date
    Jul 2001
    Location
    Ireland
    Posts
    90
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    How would you see that working, can you give a small example?

    Willie


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
  •