I have been trying to add a random text script to my site and have been doing a lot of search but I am not getting what I am looking for. All the random text generator scripts that I see are scripts that wants me add the whole code in the body of the page where I want to display. What I want is a script that stays on my server so that "some blogger can add my random text generator on his blog" using a simple code like : (See question below code) My question is how do I write or find the javascript code for "todaysjoke.js " This look like a simple enough script since I see it on many legacy sites. Can anyone give me a pointer My plan is write a Option A) A Javascript code that contains all the jokes within the script, save the file as dailyjoke.js and upload to a folder on my website. Option B) Same as above but the jokes are stored in a mysql database Any pointers? Or help would be appreciated. I want a very simple barebones script. Best if I can copy paste from somewhere. Can I use this http://www.javascriptkit.com/script/script2/dailyinfo.shtml to suit my need? Regards Blogspotter
I got the answer myself. Thanks every one who read but didn't reply Ypu need to save the same script as a .js file and then call the same script in a smaller script like you call an image.. Here is more http://www.javascriptkit.com/javatutors/external.shtml