SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Guru
    Join Date
    Aug 2001
    Location
    Amsterdam
    Posts
    788
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    button to link refer

    Hi all,

    I want to make several buttons with some the same variables in one cell in the table.. If I open and close a form it will destroy my table layout so I want to use a javascript to go to the specific page and include the variables in the link..

    If I try this the page will be opened but the vars aren't passed on to the page ..

    This is what I tried..

    Code:
    <input type="submit" name="go" value="change"
     OnClick="window.location=('gebruikersaanpassen.php?gebruikerId=$gebruikerId')";>
    If you have a suggestion then please...

    Regards,

    Peanuts
    the neigbours (free) WIFI makes it just a little more fun

  2. #2
    SitePoint Guru Vincent Puglia's Avatar
    Join Date
    Feb 2000
    Location
    where the World once stood
    Posts
    700
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi Peanuts,

    You have to remember you are passing a variable, not a literal, so it must be outside the quotes

    onClick="window.location=('gebruikersaanpassen.php?gebruikerId=' + $gebruikerId)";

    Vinny
    Where the World Once Stood
    the blades of grass
    cut me still


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
  •