Reputation
2,421
Top tag
Next privilege 2,500 Rep.
Create tag synonyms
Badges
3 14 26
Newest
 Custodian
Impact
~256k people reached

Jun
25
awarded  Favorite Question
May
27
answered Inheritance vs containment while extending a large legacy project
May
27
comment Javascript Event in Innerhtml Resulting from PHP Server Script
Like I said, this is a question to Stack Overflow, not here. Please ask it there.
May
27
comment Javascript Event in Innerhtml Resulting from PHP Server Script
You'll need to ask that one on Stack Overflow. Without your actual code there's nothing much we can do to help. Link to the question here, provide your code and as many details as possible. Make your problem clear as well as what you've tried.
May
27
awarded  Organizer
May
27
revised Javascript Event in Innerhtml Resulting from PHP Server Script
This question is neither PHP nor MySQL.
May
27
comment Javascript Event in Innerhtml Resulting from PHP Server Script
No, that's wrong. By the mere fact that you can see it on the page, means that it's added to the DOM. Rather, newly created elements need to be attached with the event handler anew. If you are attaching the event handler to an element that doesn't get removed and re-added (like the parent div), you don't have that problem.
May
27
comment Javascript Event in Innerhtml Resulting from PHP Server Script
This is called event delegation. If you have a div with children, clicking on any of the children also counts as clicking on the parent. By setting a handler on the parent, and using .target to know which child was actually clicked, you can make a generic handler for all of the children at once. Read the attached link for more information.
May
27
comment Javascript Event in Innerhtml Resulting from PHP Server Script
See if my answer fits your needs.
May
27
suggested approved edit on Javascript Event in Innerhtml Resulting from PHP Server Script
May
27
answered Javascript Event in Innerhtml Resulting from PHP Server Script
May
27
comment Javascript Event in Innerhtml Resulting from PHP Server Script
So the ID comes back from the XHR query? Or was it in the popup the entire time? I don't understand where the problem is.
May
15
comment Many-to-many in OOP: Class A instantiates Class B, which instantiates Class A, which
@RobertHarvey: The idea of a DataMapper is to completely separate your logic from your storage and from the logic of fetching/saving from/to storage. You could say it's like an Entity Framework, although that still wouldn't be quite accurate. Check out teresko's top answer on Stack Overflow for a better explanation.
May
15
comment Many-to-many in OOP: Class A instantiates Class B, which instantiates Class A, which
@RobertHarvey: I think you're confusing. DataMapper is a more generalized implementation of ORM. It abstracts the need for your objects to match your storage schema.
Apr
15
awarded  Good Question
Mar
22
awarded  Famous Question
Mar
22
comment Why is Global State so Evil?
That's highly dependant on the language. In languages where programs run persistently, it may be true that you're able to save memory by using global space and singletons instead of instantiating many classes, but even that argument is shaky. It's all about priorities. In languages like PHP (which is run once per request, and objects don't persist), even that argument is moot.
Jan
17
awarded  Good Question
Oct
7
awarded  Yearling
Sep
26
awarded  Favorite Question