I am using a checkbox with AutoPostBack=true inside a WARP.
Checking the box displays the error:
- Internet Explorer Script Error - An error has occured in the script on this page. Line: <mylinenumber> char: 1 Error: Syntax Error Code:0 URL: <myurl> Do you want to continue running scripts on this page? Yes/No buttons
- Internet Explorer Script Error -
An error has occured in the script on this page.
Line: <mylinenumber>
char: 1
Error: Syntax Error
Code:0
URL: <myurl>
Do you want to continue running scripts on this page?
Yes/No buttons
Note if the checkbox is outside the WARP or has AutoPostBack=false, no error.
Hi,
I tested aspx:CheckBox with autopostback in WARP and worked without errors. If you believe that problem is in WARP, then you should write a simple aspx which reproduces that bug and submit a bug report.
Thanks Viktor for getting back to me on this issue.
In fact, the issue is related to the XHTML standard AND related to .Net framework version installed on the web server.
On my development machine I have .Net 2.0 installed, no issue.
<script type="text/javascript">Page_Validators = new Array(/* list of validators */);var ctl00_MainScreen_rfv_Name = /* assignment */
On Test machine, we have .Net 2.0 SP1 installed, the javascript error message is occuring.
As you can see the difference is with the CDATA out of place.
Using a CDATA section will not work with all browsers. For example, Internet Explorer considers a CDATA section in a <script> tag a syntax error. You can avoid this problem by adding JavaScript comments, as follows.
<script type="text/javascript"> /* <![CDATA[ */ function isLess(a, b) { if (a < b) return true; } /* ]]> */ </script>
We are using Infragistics 2007 Vol1 CLR 2.0. But I didn't get a chance to look at if the lastest Infragistics build would fix this issue.