Welcome Guest, Not a member yet? Register   Sign In
capture id on click
#7

(01-03-2016, 08:58 AM)ryan Wrote: This captures the div id, I'm actually after the DB ID. Thank you for effort though.

Then your question is not clear. You asked "how to capture and pass the id of the clicked item". Show us the code that's not working and what you're trying to do.


Quote:This did what I was going for. Thank you. I keep not realizing there are codeigniter ways instead of html ways.

What do you mean, CI way vs. HTML way? Huh



Quote:One follow on question:
I had <a><li>words</li></a>
Applying the anchor above the list made the whole button clickable. Your method puts the link on the list so now only the words are clickable. Is there a way using the codeigniter way to make the whole containing element clickable?

Again, CI has nothing to do with that. This is a CSS problem. Put the anchor tag (a) inside the list tag (li), make your link "display: block", and then the whole line will be clickable. Also, the way you do it, I'm pretty sure it's not valid HTML (putting the anchor outside list tag).
CodeIgniter 4 tutorials (EN/FR) - https://includebeer.com
/*** NO support in private message - Use the forum! ***/
Reply


Messages In This Thread
capture id on click - by ryan - 12-31-2015, 09:34 AM
RE: capture id on click - by includebeer - 12-31-2015, 03:34 PM
RE: capture id on click - by ryan - 12-31-2015, 06:48 PM
RE: capture id on click - by includebeer - 01-01-2016, 08:58 AM
RE: capture id on click - by Wouter60 - 01-01-2016, 09:45 AM
RE: capture id on click - by ryan - 01-03-2016, 08:58 AM
RE: capture id on click - by includebeer - 01-03-2016, 10:34 AM
RE: capture id on click - by Wouter60 - 01-03-2016, 10:41 AM
RE: capture id on click - by ryan - 01-03-2016, 12:24 PM
RE: capture id on click - by PaulD - 01-03-2016, 12:53 PM
RE: capture id on click - by Wouter60 - 01-03-2016, 11:45 PM
RE: capture id on click - by ryan - 01-04-2016, 08:36 PM
RE: capture id on click - by ryan - 01-05-2016, 07:19 AM
RE: capture id on click - by mr_pablo - 01-05-2016, 08:46 AM
RE: capture id on click - by ryan - 01-05-2016, 08:53 AM
RE: capture id on click - by mr_pablo - 01-05-2016, 09:10 AM
RE: capture id on click - by ryan - 01-05-2016, 09:31 AM



Theme © iAndrew 2016 - Forum software by © MyBB