Legal Real estate Insurance Website Hosting Travel Agents Internet & Phone Casino Sports Book Templates Expat Food Items Domain Names
Submit Engine Send e-Cards Shopping Mall Travel Guide Missing Persons Free Web Based E-mail Search The Web Webmaster Tools Dating Service Blog read now Play Flash Games
Free E-books Free Legal Forms Reference Programs Scripts Affilliate Videos Free Adsense Templates Erotic phone Java games
Send SMS to USA FAQ's & Advice Expat Profile Consumer Protection Testimonials Pattaya's WeatherThai Food Recipes Free Articles Free Magazines
Pattaya City Thailand.com,  reciprocal links page

Fun with Forms


This is a really cool trick that lets your visitors copy text from your site with the click of a mouse. It can be very handy for issuing code, or any other text that you want your visitors to copy from your site. Here's how it works.

Put this part of the script between the <head></head> tags of your page.

<style>
.highlighttext{background-color:darkgray; color:#ffffff; font-face:Arial, helvetica, sans-serif; font-weight:bold; text-decoration:none;}
</style>

<script language="Javascript">
<!--
var copytoclip=1
function HighlightAll(theField) {
var tempval=eval("document."+theField)
tempval.focus()
tempval.select()
if (document.all&&copytoclip==1){
therange=tempval.createTextRange()
therange.execCommand("Copy")
window.status="Contents highlighted and copied to clipboard!"
setTimeout("window.status=''",1800)
}
}
//-->
</script>

Then in the body of your page, where you would like the box placed you insert this code:

<form name="test">
<div align="center"> <a class="highlighttext" href="javascript:HighlightAll ('test.select1')"> Copy To Clipboard</a>
<textarea name="select1" rows=8 cols=30 wrap=no>PCT Thailand: These are some words that have no meaning. However, when put together they do a pretty good job of filling up the space to demonstrate this little script. </textarea> </div>
</form>


example:
Copy To Clipboard

 


It is a very simple little script, but it adds so much versatility to your website.


Pattaya City Thailand.com,  reciprocal links page



Google