H
hemant.singh
Hello all,
I am try'g to send window.location.href to the server script who will
generate dynamic javascript according to the referral name comg in as
param
Now bcz
<script language="javascript" src="NO JAVASCRIPT CAN BE USED HERE" />
So I am see'g If I can use eval todo something what I am doing
I have tried almost everything, following is being last one
<script language="javascript">
eval("a='http://localhost/ws/getdojs/c896ec8408f27942fe4b85f033c3e3af?t=t001&u='+window.location.href");
alert(a);//This show alert properly, but it is following line which
make JS to fail
//It gives error, unterminated string literal
eval("</script><script language='javascript' src="+a+">");
//If this is used instead of eval, it also gives same error as above
eval
//document.writeln("</script><script language='javascript'
src="+a+">");
</script>
Now my requirement being that i'll get javascript only when I pass
correct URL in param 'u' I see really no way out, any?
I am totally lost here ...
PS: Pls drop me a personal mail too in cc of reply, also lemme know if
you want to ask some question about this stupid need
--Hemant
http://sp2p.net
I am try'g to send window.location.href to the server script who will
generate dynamic javascript according to the referral name comg in as
param
Now bcz
<script language="javascript" src="NO JAVASCRIPT CAN BE USED HERE" />
So I am see'g If I can use eval todo something what I am doing
I have tried almost everything, following is being last one
<script language="javascript">
eval("a='http://localhost/ws/getdojs/c896ec8408f27942fe4b85f033c3e3af?t=t001&u='+window.location.href");
alert(a);//This show alert properly, but it is following line which
make JS to fail
//It gives error, unterminated string literal
eval("</script><script language='javascript' src="+a+">");
//If this is used instead of eval, it also gives same error as above
eval
//document.writeln("</script><script language='javascript'
src="+a+">");
</script>
Now my requirement being that i'll get javascript only when I pass
correct URL in param 'u' I see really no way out, any?
I am totally lost here ...
PS: Pls drop me a personal mail too in cc of reply, also lemme know if
you want to ask some question about this stupid need
--Hemant
http://sp2p.net