Go4Expert

Go4Expert (http://www.go4expert.com/)
-   JavaScript and AJAX (http://www.go4expert.com/forums/javascript/)
-   -   javascript -- Error : Xarray is uninitialized (http://www.go4expert.com/forums/javascript-error-xarray-uninitialized-t5480/)

sakthi.abdullah 27Jul2007 02:34

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??

shabbir 27Jul2007 09:02

Re: javascript -- Error : Xarray is uninitialized
 
It seems you have not defined the Array.

pradeep 27Jul2007 09:55

Re: javascript -- Error : Xarray is uninitialized
 
Yeah shabbir is right! Please post the code snippet!

sakthi.abdullah 27Jul2007 15:04

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

pradeep 27Jul2007 15:46

Re: javascript -- Error : Xarray is uninitialized
 
Code:

var XArray=new Array(
"ALL||ALL",
"06||06"
,"1N||1N"
,"1X||1X"
,"1Y||1Y"
,"21||21"
,"30||30"
}

Look at the code, you started the Array with '(' but ended it with '}'

sakthi.abdullah 27Jul2007 16:07

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 21:53.