![]() |
javascript -- Error : Xarray is uninitialized
When I am loading a javascript file ,it is giving error :
"Done! But with errors on page"" "Error: XYArray is undefined "... goes on for multiple arrays like this ... how to solve this?? |
Re: javascript -- Error : Xarray is uninitialized
It seems you have not defined the Array.
|
Re: javascript -- Error : Xarray is uninitialized
Yeah shabbir is right! Please post the code snippet!
|
Re: javascript -- Error : Xarray is uninitialized
okay....
Here is the code: inside Lvalues.jsp I am having some n no of Arrays declared like this : <% response.setContentType("application/x-javascript"); response.setHeader("Cache-Control", "no-cache"); response.setHeader("Pramga", "no-cache"); %> var XArray=new Array( "ALL||ALL", "06||06" ,"1N||1N" ,"1X||1X" ,"1Y||1Y" ,"21||21" ,"30||30" } In other jsps I am referring this jsp file... Though named as jsp,since this is a javascript code, i tried sth like this: I replaced <script type="text/javascript" language="Javascript" src="js/LValues.jsp"> with <script type="text/javascript" language="Javascript" src="js/LValues.js"> When I did that, it is producing the error XArray is undefined .... //for all the arrays.. and in the log file, I am getting like this.. 119971 DEBUG [http-8090-Processor25] org.apache.jasper.compiler.SmapUtil$SDEInstaller - 896 copying 4 bytes 119971 DEBUG [http-8090-Processor25] org.apache.jasper.compiler.SmapUtil$SDEInstaller - 897 read class attr -- 'reuse' 119971 DEBUG [http-8090-Processor25] org.apache.jasper.compiler.SmapUtil$SDEInstaller - 898 copying 4 bytes 119971 DEBUG [http-8090-Processor25] org.apache.jasper.compiler.SmapUtil$SDEInstaller - 899 copying 4 bytes 119971 DEBUG [http-8090-Processor25] org.apache.jasper.compiler.SmapUtil$SDEInstaller - 900 read class attr -- '_jspx_th_mbs_005fsecure_005f0' 119971 DEBUG [http-8090-Processor25] org.apache.jasper.compiler.SmapUtil$SDEInstaller - 901 read class attr -- 'Lcom/mbs/security/util/SecurityTag;' 119971 DEBUG [http-8090-Processor25] org.apache.jasper.compiler.SmapUtil$SDEInstaller - 902 read class attr -- 'SourceFile' 119971 DEBUG [http-8090-Processor25] org.apache.jasper.compiler.SmapUtil$SDEInstaller - 903 read class attr -- 'starCycle_jsp.java' 119971 DEBUG [http-8090-Processor25] org.apache.jasper.compiler.SmapUtil$SDEInstaller - SourceDebugExtension not found, installed at: 904 |
Re: javascript -- Error : Xarray is uninitialized
Code:
var XArray=new Array( |
Re: javascript -- Error : Xarray is uninitialized
That's typo...The array declaration is fine..
Please tell will these options work??? Just call the files .js instead of .jsp or: remove line feeds. |
| All times are GMT +5.5. The time now is 09:19. |