#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2012
    Posts
    19
    Rep Power
    0

    Can I pass an argument via hyperlink to check a checkbox on the target page?


    Basic HTML Question..I want to see if some PHP developers might know the answer..

    I have a website set up that uses html coded accordions on certain pages.
    The accordions use hidden check boxes to open and close the vertical accordions.

    Each check box has a unique id, such as "checkbox-1" or "checkbox-2" ..

    Want I would like to do is click a hyperlink on one page and have it automatically target or "check" a check box on another page so that the accordion can open automatically when requested from the original page..

    any ideas?
    Last edited by E-Oreo; January 27th, 2013 at 09:44 PM.
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Loyal (3000 - 3499 posts)

    Join Date
    Jul 2003
    Posts
    3,498
    Rep Power
    594
    Yes but I suggest you change the check box IDs to an array to make managing them easier in PHP.
    There are 10 kinds of people in the world. Those that understand binary and those that don't.
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2012
    Posts
    19
    Rep Power
    0
    That wouldn't be a problem.


    This should be similar to page.php#targetid

    I cant use that of course because the target within my accordion will remain hidden until it opens.

    I just need a simple script on a hyperlink and a script on the target page that will listen and act on the request and then check the check box, thus opening the accordion.

    would it be something to the effect of page.php?variable="action"

    I'm not a strong programmer. I know enough to implement into certain areas but I couldn't put something like this together myself.
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Loyal (3000 - 3499 posts)

    Join Date
    Jul 2003
    Posts
    3,498
    Rep Power
    594
    It sounds like you need to learn some PHP first. Start here.
    Last edited by ManiacDan; January 28th, 2013 at 10:48 AM. Reason: tags were wrong
    There are 10 kinds of people in the world. Those that understand binary and those that don't.
  8. #5
  9. Sarcky
    Devshed Supreme Being (6500+ posts)

    Join Date
    Oct 2006
    Location
    Pennsylvania, USA
    Posts
    10,908
    Rep Power
    6351
    You could also do this with javascript, if you know that language.
    HEY! YOU! Read the New User Guide and Forum Rules

    "They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." -Benjamin Franklin

    "The greatest tragedy of this changing society is that people who never knew what it was like before will simply assume that this is the way things are supposed to be." -2600 Magazine, Fall 2002

    Think we're being rude? Maybe you asked a bad question or you're a Help Vampire. Trying to argue intelligently? Please read this.
  10. #6
  11. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2012
    Posts
    19
    Rep Power
    0
    Well,

    I guess I'm just looking for a quick fix. I could learn some more.
    I know enough to use <?php include "header"; ?> and things to that affect so I don't have to edit the same things over and over.

    I can look at a script and figure out what to modify to get it to work my way. I guess I'm a cheater in scripting. I just haven't had enough time to sit and learn the languages.

    I'm a huge Googler and that how I've been putting my website together. Most of it is in basic HTML with some Jquery banners and menus.
    I could implement the script that I need but I would just be a cheater for a quick fix.
  12. #7
  13. No Profile Picture
    Contributing User
    Devshed Loyal (3000 - 3499 posts)

    Join Date
    Jul 2003
    Posts
    3,498
    Rep Power
    594
    Copying someone else's bad code from the internet, especially if you don't understand what it is doing, is a bad idea on many levels. If you don't have enough time to learn how to do it right then you really should be hiring a professional. This is a help forum where you are expected to do the work. The folks here will help you figure out what is wrong with your code, suggest better ways, point out security holes, suggest debugging techniques, etc.

    If you are looking for someone to write the code for you then you need to post this in the hire a programmer forum.
    There are 10 kinds of people in the world. Those that understand binary and those that don't.

IMN logo majestic logo threadwatch logo seochat tools logo