Load HTML file from drop-down created from XML file

Posted By: Ian on Jan 30, 2015 in JavaScript, Snippets

Question How can i now load the HTML file selected from the Dynamically created drop-down. Answer Demo xml-select-html.php

Continue Reading »

Dynamic drop-down from XML (2 drop-downs 1 populates other)

Posted By: Ian on Jan 29, 2015 in JavaScript, Snippets

Question How can i use my XML file to populate two drop-downs where the 1st one defines whats displayed in the second? Answer Demo xml-miltiple-select.php

Continue Reading »

Populate drop-down list from XML

Posted By: Ian on Jan 29, 2015 in JavaScript, Snippets, XML

Question So now i have what i want how can i put that into a select tag? Answer Demo xml-select-tag.php

Continue Reading »

Get Location of Currently Running Script

Posted By: Ian on Feb 01, 2014 in JavaScript, Snippets
Last modified on January 29th, 2015 at 9:31 pm,

Do you need to get the URL or folder location of the currently executing script? Here’s how i did it! Why would you need to do this? Well if you have a script you distribute which is setup to dynamically load all it’s CSS and other components the location to each of these will need …

Continue Reading »

Ajax update innerHTML

Posted By: Ian on Mar 17, 2012 in Snippets
Last modified on February 26th, 2014 at 9:45 pm,

Ajax is very useful for when you want todo something without refreshing the page plus it’s the way things are done now. For my Banner Bar program i allow the user to upload images or insert links to images which while this is good i think at the moment it looks confusing and the page …

Continue Reading »

Passing Arguments to a Function

Posted By: Ian on Mar 09, 2011 in JavaScript, Snippets
Last modified on November 20th, 2013 at 10:28 am,
Continue Reading »

Get the Page Title Description and Url

Posted By: Ian on Mar 09, 2011 in JavaScript, JQuery, Snippets
Last modified on January 12th, 2013 at 3:09 pm,

JQuery version: <script type=”text/javascript”> $(document).ready(function () { var pageTitle = $(document).attr(‘title’); var pageHref = $(location).attr(‘href’); var pageDescription = $(‘meta[name=description]’).attr(“content”); $(‘#result’).html(‘<a href=”‘ + pageHref + ‘”>’ + pageTitle + ‘</a><br />’ + pageDescription + ‘<br /><span class=”green”>’ + pageHref + ‘</span>’); }); </script>   Javascript Version: <script type=”text/javascript”> var a = (document.title); var b = (document.location.href); …

Continue Reading »

Split String

Posted By: Ian on Mar 09, 2011 in JavaScript, Snippets
Last modified on November 7th, 2013 at 5:34 pm,

Why might you need to use the split string function? Well imagine you have a load of keywords separated by commas you want to list individually or like in the example above separate your users full name to maybe greet them by there first name then this is ideal. Do remember all this is Client …

Continue Reading »

Image Swapper

Posted By: Ian on Mar 09, 2011 in JavaScript, Snippets
Continue Reading »

Hide and Show

Posted By: Ian on Mar 07, 2011 in JavaScript, Snippets

Often you want to hide or show an image or one or more tags on your page and using this reusable script you can do just that.No code to edit and it also changes (Toggles) the button value. You just have to insert 4 variables whenever you want to call the script <input type="button" onclick="toggleItem(‘1′,,’3′,’4’);" …

Continue Reading »

About This Site

Dreams are built from lines of code well it's true!
If you can dream it you can usually code it.

I have learned so much from other people on the Internet and this site is for me to give back some of what i have learned and hope people can now learn from me.
Have fun and surf safely,

protected by copyscape duplicate content check


Powered by Banner Bar 125