469,322 Members | 1,672 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,322 developers. It's quick & easy.

How to hide my link(passwor)

30
This script is dedicate to send sms from your page, using smsaccounts.
You have help me to do it!
Can you help me now to hide my link (because in link is my password)?
is this possible with JavaScript

Expand|Select|Wrap|Line Numbers
  1. <html>
  2. <body>
  3. <script>
  4. function updateHREF() {
  5. document.getElementById('theLink').href = 'https://myaccount.smsdiscount.com/clx/sendsms.php?'+ 'username=artxcenter.com'+'&password=mypass'+'&from=artxcenter.com' +'&to='+ document.forms[0].to.value + '&text='+ document.forms[0].text.value;
  6. }
  7. </script>
  8. <form>
  9. <input type="text" name="to" onchange="updateHREF();">
  10. <input type="text" name="text" onchange="updateHREF();">
  11. <input type="text" name="fieldThree">
  12.  
  13. <a id="theLink" href="javascript:alert('Please enter some values.');void('');">test me</a>
  14. </form>
  15. </body>
  16. </html>
Jun 7 '07 #1
2 1143
acoder
16,027 Expert Mod 8TB
No, you can't hide anything client-side. Even if it's not in the URL, someone could just view the source.
Jun 8 '07 #2
gits
5,390 Expert Mod 4TB
hi ...

on clientside you can't do this ... like acoder said. and as a recommendation: never do auth-things on clientside ... always call a service or whatever you want to call it on the server side ... the client always gets your javascript-code and it may be always locally modified by the user ... so avoid everything that may be security-critical like building sql-queries, pass usernames and passwords etc. ...

try to find an other solution for this ... never, never do it ;) its evil ... and you may wonder what the guys may do with such code ... probably its your mysql-password too or whatever ... don't rely on the fact that most users don't be able to use what they get ;) ... if some could ... you may be send to hell by them ...

of course i'm exaggerating ... but i have to mention it ... and bring it to your attention ...

kind regards ...
Jun 8 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

4 posts views Thread by Michael Lamb | last post: by
3 posts views Thread by Barbara Alderton | last post: by
7 posts views Thread by julianmlp | last post: by
reply views Thread by joe | last post: by
20 posts views Thread by Lennart Anderson | last post: by
5 posts views Thread by phobia1 | last post: by
reply views Thread by suresh191 | last post: by
reply views Thread by Gurmeet2796 | last post: by
reply views Thread by mdpf | last post: by
reply views Thread by harlem98 | last post: by
reply views Thread by listenups61195 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.