How to Get The ID From a Draggable Item with jQuery
Problem: I have a list of photos that I’ve uploaded. I want to drag a photo from the pool of photos to a gallery or album. So, basically I have two lists of items. I’m dragging items from one list...
View ArticleHow to Use PHP, Javascript (or jQuery), and HTML Together
Sometimes for beginners, or even those of us that have been doing this for a while, it may be difficult to see how to use PHP and Javascript together to make the page work correctly. I often have to...
View ArticleHow to Pass an Object from PHP to Javascript and Back Again Using JSON
Many times I would like to pass an object from my PHP code to Javascript or from Javascript to PHP. JSON and a couple of PHP and Javascript functions make that easy! JSON is JavaScript Object Notation....
View ArticleHow to Add Numbers in Javascript
I have been programming in PHP much longer than I’ve been programming in Javascript. As a matter of fact, I really haven’t programmed much in Javascript at all. I’ve copied and pasted a lot of snippets...
View ArticleConcatenating Strings in PHP and Javascript
Combining two strings into one string is easy with both PHP and Javascript. In PHP: $string1 = 'Hello'; $string2 = 'World!'; $string3 = $string1.' '.$string2; echo $string3; // prints - Hello World! In...
View ArticleUse Ajax Checkbox Toggles to Update the Database
A client wanted me to use Ajax to save checkbox results to a database so that each check was saved as it was made instead of waiting until all the checkboxes were checked (or unchecked) and then...
View ArticleShow a Certain Div’s Contents if a Certain Option is Selected in a Select
A client needed me to show a certain hidden div on the page if a certain option was selected in a dropdown box. Here is the javascript/jquery code I used to show the div when the option was selected. I...
View ArticleHiding my Pop-up When a Visitor Returns if They’ve Chosen Not to See it Again
I mentioned the sliding pop-up that my client wanted on her page here. I fixed it where it would pop-up – or slide in – every time someone visited the home page. After the first couple of visits, I...
View Article
More Pages to Explore .....