I copied the start of you're code, and it works fine br>
<body>
<script type='text/javascript'>
var mArray = new Array();
mArray[0] = new Array();
mArray[1] = new Array();
var num_rec='4';
</script>
<script type='text/javascript'>
mArray['0']['0'] = '1';
alert(mArray[0][0]);
</script>
</body>
As far as a script tag indicator, you could use this sort of code br>
script_tag = 0;
if (!script_tag) {
// turn tags on at start of JavaScript output echo("<script>");
script_tag = 1;
}
.........
if (script_tag) {
// turn tags off before outputting HTML
echo("</script>");
script_tag = 0;
}
-----Original Message-----
From: 1stJavaScript%40yahoogroups.com">1stJavaScriptyahoogroups.com [mailto: 1stJavaScript%40yahoogroups.com">1stJavaScriptyahoogroups.com] On
Behalf Of Stone
Sent: 03 July 2008 18:47
To: 1stJavaScript%40yahoogroups.com">1stJavaScriptyahoogroups.com Subject: [1stJavaScript] Re: java array won't fill more then two rows.
I thank you very much for all your help. I have changed the way i
declared the arrays to <script type='text/javascript'>var mArray =
new Array(); mArray[0] = new Array(); mArray[1] = new Array
();</script> and it still comes up with the same error mArray.# is
null or not an object or mArray[...].1 is null or not an object.
if i declared the arrays as var mArray[0] = new Array() i would get
the error mArray is undefined.
how would i declare the <script> tags as being active?
the source still shows the array as being filled the same as it was
before:
<script type='text/javascript'>var mArray = new Array(); mArray[0] =
new Array(); mArray[1] = new Array(); var
num_rec='4';</script><script type='text/javascript'>mArray['0']['0']
= '1';</script><script type='text/javascript'>mArray['0']['1']
= 'Good Will Hunting';</script><script type='text/javascript'>mArray
['0']['2'] = 'Drama';</script><script type='text/javascript'>mArray
['0']['3'] = 'Home';</script><script type='text/javascript'>mArray
['0']['4'] = 'Matt Damon, Robin Williams, Ben Affleck, Minnie Driver,
Stellan Skarsgard';</script><script type='text/javascript'>mArray['0']
['5'] = 'Matt Damon and Ben Affleck won an Oscar for their script
about friendship and risk for this film directed by Gus Van Sant.
With an abuse-filled past and a janitorial job, Will Hunting (Damon)
spends his days hanging out with best friend Chuckie Sullivan
(Affleck). But the aimless young man's also a mathematical genius,
and when his talents are discovered, a therapist (Robin Williams)
helps Will confront the demons that have been holding him
back.';</script><script type='text/javascript'>mArray['0']['6']
= '1997';</script><script type='text/javascript'>mArray['0']['7']
= 'United States';</script><script type='text/javascript'>mArray['0']
['8'] = '1';</script><script type='text/javascript'>mArray['0']['9']
= '89';</script><script type='text/javascript'>mArray['0']['10']
= '';</script><script type='text/javascript'>mArray['0']['11']
= 't';</script><script type='text/javascript'>mArray['1']['0']
= '2';</script><script type='text/javascript'>mArray['1']['1']
= 'Good Morning Vietnam';</script><script
type='text/javascript'>mA