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

Discussion in 'Javascript' started by Anil G, Jan 20, 2007.

  1. Anil G

    Anil G Guest

    Hi!

    If page has the link, let say page has following hyperlink
    <a href="javascript:editUser('<c:eek:ut value="${users.id}"/>')"><c:eek:ut
    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/encdec/encode-decode.html

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

    Any help would be appreciated.

    THanks,

    Anil G
    Anil G, Jan 20, 2007
    #1
    1. Advertising

  2. Anil G

    Randy Webb Guest

    Re: encode or encrypt the links on displayed on web browser bottomsection.

    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:eek:ut value="${users.id}"/>')"><c:eek:ut
    > 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/
    Randy Webb, Jan 20, 2007
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Noozer
    Replies:
    1
    Views:
    7,089
    Carolyn Marenger
    Mar 13, 2006
  2. =?Utf-8?B?VGVycnkgSG9sbGFuZA==?=

    encrypt smpt section of web config

    =?Utf-8?B?VGVycnkgSG9sbGFuZA==?=, Oct 1, 2007, in forum: ASP .Net
    Replies:
    0
    Views:
    430
    =?Utf-8?B?VGVycnkgSG9sbGFuZA==?=
    Oct 1, 2007
  3. MichaelS
    Replies:
    0
    Views:
    385
    MichaelS
    Nov 22, 2006
  4. mnowosad

    Cannot encrypt custom section in web.config

    mnowosad, Dec 8, 2006, in forum: ASP .Net Security
    Replies:
    3
    Views:
    288
    mnowosad
    Dec 19, 2006
  5. http://ejobseek.com

    Encrypt in Perl, De-encrypt in Javascript

    http://ejobseek.com, Sep 1, 2003, in forum: Perl Misc
    Replies:
    3
    Views:
    262
    James Willmore
    Sep 1, 2003
Loading...

Share This Page