On Wed, 28 Jul 2004 14:54:44 +0200, cirillo curiosone
<ci***************@blabla.com> wrote:
Harag wrote:
On Wed, 28 Jul 2004 12:36:07 +0200, cirillo curiosone
<ci***************@blabla.com> wrote:
>
>Hi all!
>
>here'm my problem.
>
>In a parametric code i have to select which js file to load
>but, even if the path string composition is right, the js file is not
>executed.
>See below:
>
> <head>
> .......
> <script type="text/javascript">
> var gal_num=parent.scelta;
> var
>gal_par_path=gal_path[gal_num]+"gallery"+gal_num+"/g"+gal_num+"_par.js";
>
> </script>
> <script type="text/javascript" src=gal_par_path></script>
The above line is HTML not javascript... try putting:
document.write('<script type="text/javascript" src=' + gal_par_path +
'></script>')
between the first <script> & </script> tags.
Not sure if this will work as I've never done anything like that.
HTH.
Thanks Harag,
i tried but it doesn't seem to work.
I think there should be one way, at least, to load different values for one
or more variables for different external files.
Let's see if anyone else can help me...
thanks again.
oops forgot....
to save getting the error when you click the 2nd paragraph to run the
function in the 2nd file then change the clicking lines to the
following:
<p><span onClick="if (window.a1) a1();">Click Me for Func.1</span>
<p><span onClick="if (window.a2) a2();">Click Me for Func.2</span>