script # problem [modified]
-
i'm using window.location.href... properties used... assume these values... ex:1 <SCRIPT>window.location.href ='mailto:test@test.com?subject=c&body=Hello'</SCRIPT> ex:2 <SCRIPT>window.location.href ='mailto:test@test.com?subject=c#&body=Hello'</SCRIPT> example 1 is working fine...when i come to example 2 to, it displays email and subject till '#' after that nothing is displayed... whenever there is a hash from that point nothing is getting displayed...but i need to display #... any ideas to overcome this issue....i'm using I.E...
modified on Friday, February 5, 2010 1:00 AM
-
i'm using window.location.href... properties used... assume these values... ex:1 <SCRIPT>window.location.href ='mailto:test@test.com?subject=c&body=Hello'</SCRIPT> ex:2 <SCRIPT>window.location.href ='mailto:test@test.com?subject=c#&body=Hello'</SCRIPT> example 1 is working fine...when i come to example 2 to, it displays email and subject till '#' after that nothing is displayed... whenever there is a hash from that point nothing is getting displayed...but i need to display #... any ideas to overcome this issue....i'm using I.E...
modified on Friday, February 5, 2010 1:00 AM
You need to encode the url using the javascript encodeURI or encodeURIComponent method.
I know the language. I've read a book. - _Madmatt
-
You need to encode the url using the javascript encodeURI or encodeURIComponent method.
I know the language. I've read a book. - _Madmatt
no need of the encode, i replaced it with hex code %23, then it worked fine...
-
no need of the encode, i replaced it with hex code %23, then it worked fine...
encode is there so you don't have to remember to do this and to prevent malformed or malicious user input from causing unexpected results. But if you don't want to use the tools you have available and do it all by hand that's up to you.
I know the language. I've read a book. - _Madmatt
-
encode is there so you don't have to remember to do this and to prevent malformed or malicious user input from causing unexpected results. But if you don't want to use the tools you have available and do it all by hand that's up to you.
I know the language. I've read a book. - _Madmatt
k...i'll try that...