471,857 Members | 1,928 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,857 software developers and data experts.

How to hide my link(passwor)

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">
  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 1175
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
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 NeoPa | last post: by
reply views Thread by YellowAndGreen | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.