> <script src="http://www.outside.com/page.asp?id=1"></script>
Okay, so you are using an ASP page to dynamically generate the
JavaScript, right? (You should be, because that is the result of
putting that kind of URL in the src attribute of a script element.)
> It generates array 'content with all necessaries information. The problem is
> I need several type of information (id=2,3, etc.), and it always generate
> the same array content (as name) with different contents. how can I change
> the name of the array to other things in order to get different arrays.
You need to be a little clearer on what your intent is.
You say that "it always generate[s] the same array content (as name)
with different contents." I interpret that to mean "a variable, which
is an array, is set to different information based upon whether the id
is 1, 2, or 3, but it always sets it to the name variable name. How
can I have it set to a different variable name?" Is that correct?
If so, the code in your ASP, which is currently determining if id is
1, 2, or 3 (in order to set the contents differently) also sets a
different name. Let us assume that the value of id is set to a
variable named "paramId":
if ( paramId == 1 ) {
var arrayId1 = { ... some contents ... };
} else if ( paramId == 2 ) {
var arrayId1 = { ... some other contents ... };
} etc.
If you are using this information on the client-side in some way, you
can check to see is arrayId1, arrayId2, etc. exists, and if so, is an
array.