FRIHOSTFORUMSFAQTOSBLOGSDIRECTORY
You are invited to Log in or Register a Frihost Account!

Detect click on an area in the page.

 


toughtrio
Was just wondering if I could detect a click on some part in the page. I was actually making a puzzle, something similar to games on JK Rowlings websites, and wanted a HIDDEN link. As you know, there always are ways to detect it through the view>source method, but the area method would be more difficultly detected.

A clearly defined part, any event that could be placed on a click on that part.

Warm Regards,
sonam
I have simple JavaScript what can show/hide content if is click (right or left) on some div. I can PM to you this JS.

Sonam
alalex
Try this:
http://snippets.dzone.com/posts/show/3764
toughtrio
Thank you alalex. I've modified the script you gave a link to to suit my needs.
What I just want to know if there's a way to HIDE my code, i mean securing it.
I've searched and I get some product from Zend, but that's REALLY expensive. Thought of using the include tags, but that also shows the script ultimately. Any way I can just hide the document.click method from the View>Source.

Warm Regards,
alalex
You will not be able to hide JavaScript code, but you could obscure it. To put in some way this will "encode" the javascript so that it will still work but it will be unreadable to humans.

Try this:
http://www.htmlguardian.org/help_main.html

Although you won't be able to hide the code, it will still be visible, even if users don't know what it actually does...
If you then want to avoid letting your users know what is going on, name the functions with some arbitrary strings like "345jkbh3j45", so that even if they find those strings around they would never know what they do...
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2007 Frihost, forums powered by phpBB.