C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !




Javascript for selecting Highlighted Text


Posted Date: 12 May 2008    Resource Type: Code Snippets    Category: Html
Author: Abhishek AryaMember Level: Diamond    
Rating: Points: 5



<HEAD>

<SCRIPT LANGUAGE="JavaScript">

var text = "";
function getActiveText(e) {

// Sets text MSIE or Netscape active
// text based on browser, puts text in form
text = (document.all) ? document.selection.createRange().text : document.getSelection();

document.theform.text.value = text;
return true;
}

document.onmouseup = getActiveText;
if (!document.all) document.captureEvents(Event.MOUSEUP);
// End -->
</script>
</HEAD>



<BODY>

<center>
<form name=theform>
Selected text: <input type=text name=text value="">
</form>
</center>

<p><center>
<font face="arial, helvetica" size="-2">Free JavaScripts provided<br>
by <a href="http://javascriptsource.com">The JavaScript Source</a></font>
</center><p>


For more details, visit http://javascript.internet.com/page-details/highlighted-text.html




Responses

Author: selva venkatesh    13 May 2008Member Level: Gold   Points : 2
it's very useful one


Feedbacks      
Popular Tags   What are tags ?   Search Tags  
(No tags found.)

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: Repeatedly showing the backgrounds
Previous Resource: Refreshing and Redirecting of a page
Return to Discussion Resource Index
Post New Resource
Category: Html


Post resources and earn money!
 
Related Resources



dotNet Slackers   BizTalk Adaptors    Web Design


Contact Us    Privacy Policy    Terms Of Use