Archive

Archive for the ‘Javascript’ Category

Javascript: Print Page button

January 6th, 2009 Comments off
here’s a very simple javascript to place a link on a webpage to facilitate the user’s printing of that page: simply paste the code below where you want the button to appear: <SCRIPT LANGUAGE=”JavaScript”> <!– Begin if (window.print) { document.write(‘<form>Click Here To ‘ + ‘<input type=button name=print value=”Print” ‘ + ‘onClick=”javascript:window.print()”> This Page!</form>’); } // [...]
Categories: Javascript Tags:

Javascript: Display Random Text from a list

January 5th, 2009 Comments off
Did you ever want to display a random text from a pre-populated list?  Maybe you wanted to randomly display a client testimonial from a list of 10… well, here’s the script you need. place the following code in the head of your document (somewhere between the <head> and </head> tags): <script type=”text/javascript” src=”../scripts/rotate.js”></script> now, place [...]
Categories: Javascript, random text, web development Tags:

Creating a simple javascript Popup Div

October 20th, 2008 Comments off
Sometimes you want to create a div in your document that opens a pop-up window that shows another webpage, but that isn’t actually another browser window.  The code below will do just that for you in a simple manner.  You can change the page that shows in the popup by simply changing the “src” from [...]
Categories: Javascript Tags: