The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.
|
 |
|
Dev Shed Forums
> Programming Languages
> PHP Development
|
Can I pass an argument via hyperlink to check a checkbox on the target page?
Discuss Can I pass an argument via hyperlink to check a checkbox on the target page? in the PHP Development forum on Dev Shed. Can I pass an argument via hyperlink to check a checkbox on the target page? PHP Development forum discussing coding practices, tips on PHP, and other PHP-related topics. PHP is an open source scripting language that has taken the web development industry by storm.
|
|
 |
|
|
|
|

Dev Shed Forums Sponsor:
|
|
|

January 27th, 2013, 09:38 PM
|
|
Registered User
|
|
Join Date: Nov 2012
Posts: 18
Time spent in forums: 4 h 55 m 51 sec
Reputation 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.
|

January 28th, 2013, 06:55 AM
|
|
|
|
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.
|

January 28th, 2013, 10:15 AM
|
|
Registered User
|
|
Join Date: Nov 2012
Posts: 18
Time spent in forums: 4 h 55 m 51 sec
Reputation 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.
|

January 28th, 2013, 10:23 AM
|
|
|
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
|

January 28th, 2013, 10:49 AM
|
 |
Likely to be eaten by a grue.
|
|
Join Date: Oct 2006
Location: Pennsylvania, USA
|
|
|
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.
|

January 28th, 2013, 11:50 AM
|
|
Registered User
|
|
Join Date: Nov 2012
Posts: 18
Time spent in forums: 4 h 55 m 51 sec
Reputation 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.
|

January 28th, 2013, 11:59 AM
|
|
|
|
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.
|
Developer Shed Advertisers and Affiliates
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|