[nbajax] Re: error using special characters html inside JS script

  • From: Paolo Scarabelli < >
  • To:
  • Subject: [nbajax] Re: error using special characters html inside JS script
  • Date: Mon, 06 Aug 2012 23:41:09 +0800

Hi Massimo,

<script>
      for (i=0;i&lt;5;i++)
      {
            alert(i);
      }
</script>

This is interesting, I never saw < represented as &lt; in JavaScript and
I'm pretty sure it should return error.

The only way this can work is for the script to be decoded before being
passed to the browser.

Is the script embedded in html code or the html code is generated by php
or any other language?

If it's generated, is the string containing the script encoded or
decoded in any way or it's just fed to the browser directly?

Anyway this is not a Netbeans issue because the code you posted is not
correct JavaScript.


Regards,


Paolo

On 08/06/2012 06:32 PM, tarmax wrote:
> Thanks for the answer, 
> Anyway without the escape, the code doesn't work...quite strange....
> there's anybody with the same problem?
> thanks


[nbajax] errore using i&lt ect...

tarmax 08/02/2012

[nbajax] error using special characters html inside JS script

markwagoner 08/03/2012

[nbajax] error using special characters html inside JS script

tarmax 08/06/2012

[nbajax] Re: error using special characters html inside JS script

Paolo Scarabelli 08/06/2012

[nbajax] error using special characters html inside JS script

tarmax 08/07/2012

Project Features

About this Project

www was started in November 2009, is owned by jpirek, and has 21 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20140418.2d69abc). © 2013, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
 
 
Close
loading
Please Confirm
Close