By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
428,978 Members | 1,492 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 428,978 IT Pros & Developers. It's quick & easy.

encode or encrypt the links on displayed on web browser bottom section.

P: n/a
Hi!

If page has the link, let say page has following hyperlink
<a href="javascript:editUser('<c:out value="${users.id}"/>')"><c:out
value="${users.username}"/></a>

Now, on web browser, bottom section at runtime, following will be
displayed:

javascript:editUser('457592-11783');

Due to security reasons, i would like that link to be encoded or
encrypted. and browser bottom pane should show some encrypted text
instead of my javascript function.

How to accomplish this? i had tryed following:
http://scriptasylum.com/tutorials/en...de-decode.html

But above thing works on action, not at render time?

Any help would be appreciated.

THanks,

Anil G

Jan 20 '07 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Anil G said the following on 1/19/2007 8:28 PM:
Hi!

If page has the link, let say page has following hyperlink
<a href="javascript:editUser('<c:out value="${users.id}"/>')"><c:out
value="${users.username}"/></a>
Then the author made a very poor choice of an HREF attribute.

Now, on web browser, bottom section at runtime, following will be
displayed:

javascript:editUser('457592-11783');
Yes, that is what the status bar is for.
Due to security reasons, i would like that link to be encoded or
encrypted. and browser bottom pane should show some encrypted text
instead of my javascript function.
Then change your link. Either point at a server file using a hash to
look up the true ID of the user or simply point the HREF attribute
somewhere else and use the onclick event handler of the link.

<a href="ThisWillShowInTheStatusBar.html"
onclick="editUser('Joe Blow');return false">
Edit User Joe Blow</a>

An even better quasi-solution would be to use a button instead:

<button onclick="editUser('Joe Blow')" type="button">
This one wont change the status bar at all
</button>

Right Click>View Source......

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Jan 20 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.