2009/04/13

Disable highlight text on blogger

I have just shown you how to disable right click on blogspot.But just save your images is not enough, your articles are important, too! So this tip will help you to disable highlight text.
This widget will not allow your visitors to highlight the text in your articles.


Go to Layout--->Add A gadget-->HTML/Javascript and add add this code :

<script type="text/javascript">

/***********************************************
* Disable select-text script- © Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/

//form tags to omit in NS6+:
var omitformtags=["input", "textarea", "select"]

omitformtags=omitformtags.join("|")

function disableselect(e){
if (omitformtags.indexOf(e.target.tagName.toLowerCase())==-1)
return false
}

function reEnable(){
return true
}

if (typeof document.onselectstart!="undefined")
document.onselectstart=new Function ("return false")
else{
document.onmousedown=disableselect
document.onmouseup=reEnable
}

</script>


If any problems please leave a comment and subscribe me now.

42 comments:

www.ibuykorea.com said...

What a nice blog!
I'm a Korean.
I'll post much information about Korea.
Feel free to visit my blog site.
Have a great day! ^^

Kexin said...

Uh , it did not work for me .

vuluganck said...

Oh I don't think so XINNNZXC
I have checked it and it ran very very good, have you done exactly what i told you above ?

deleted said...

THATS AWESOME!!!!!!!!!

Ehtesham said...

wow, this is awesome :) thank you very much!!!!!
~Ehtesham~

Lieyza said...

its really works!!!
thanks..

ilovemama said...

hello. I'm using the edit html myself sort of blogger template. it doesn't work for me! Is there a different code for my case?

Angie | Pandaphilia.com said...

thank you so much for this!

Anonymous said...

Doesnt work for me?

Unknown said...

weldon great post great man

Unknown said...

I HAV A DOUTE HOW U PUT ADD IN UT TEMPLATE ON UR RIGHT SIDE..I'M ALSO USING THE A TEMPLATE LIKE UR CAN U PLE HELP ME

vanezza astilla said...

whew. Thanks for this. i've been looking for this for sooo long. :)


http://vanezzaexist.blogspot.com

vanezza astilla said...

yeah! very effective! thanks!
it's a big help.

Nina Husain said...

Thanks A Lot

Unknown said...

wonderful thank you
visit my site and please follow it at
www.allrounder-1.co.cc

Chiennie said...

It's not working to me....but the code for disable right click is working..but not this code for disable highlight

ミ★Chelsea☆彡 said...

Thank you so much! It worked like a charm. :)

siwaporn said...

It's not worked for me and the right click copy image too.I use your Sweet Cupcake template and it may cause of trouble, right.Thank you very much for your kindness and much more very good tips for me.I can use it more working except that 2 types.BYE THANKS!!!!!!!

Unknown said...

nice trick.. it's good for protect our posting
please visit and follow my blog for up my trafict.. thank's before.
http://www.ngurahadis.co.cc

Anonymous said...

it cant work for me. they kept prompting
"Your template could not be parsed as it is not well-formed. Please make sure all XML elements are closed properly.
XML error message: The markup in the document following the root element must be well-formed."

what should i do?

kibodo said...

A good trick, for the miserly

tech mag said...

owsome!! nice! looking for this :)

afifaaaaaaaah said...

thank you so much !

Alireza said...

thanks it is perfect

Gian Faye said...

Thanks! I just used it on my blog to help protect my articles.

minty_mint said...

thnks 4 d tutorial.. it help a lot..^^,

FishyMilky said...

Owhhh million thanks for this! Really useful! Like it! ^^

yahaya said...

tq for your information

Vintot said...

thanks man

Anonymous said...

awesome :D thank you

Anonymous said...

Thank you SO much for this! :) You are an angel!

azulgrana said...

thanks good work

Omar said...

I just want to thank you very much for this code.
I really appreciate it.

Omar

Anonymous said...

It really works! visit www.nplover.blogspot.com

zanzinews.com said...

Thank you too

Dude said...

DISABLING JAVASCRIPT ...

بی‌ نام و نشان said...

mate, it doesn't work on my blog. Any ideas why?
I had a code which was working, but then I changed my blog template and added streampad and text selection prevention code stopped working, however right-click prevention code is still working.

Dude said...

Great it works just put the javascript gadget below post and your'e good to go,, downside of this is its a bit slow to load.
http://pctionary.blogspot.com/

Anonymous said...

thank you very much

teyrachucky said...

it work very well for me . thankyou ! <3

Anonymous said...

This is sooooooo awesome... ^^ Someone has been taking stuff from my blog and here is the perfect thing to slow him down! ahahahaha i feel victorious! Thanks!

Unknown said...

Awesome..the best!!

Post a Comment

Thanks for reading , if you have any problem please leave me a comment here I will help you by my best.Please note that you put the friendly words tohelp each other to improving and developing these tips to be better,or the best way for you to track my blog is subscribing my Feed.You are always welcome on Zenplate.
Best regard
Zen

 
.