|3utters
11-08-2004, 10:51 PM
Ok heres the pronlem I am new to javascript.
I need to do this.
call the same script src from two diffent scripts that use the exact
same functions. Can I even accomplish this
joh6nn
11-08-2004, 11:39 PM
could you elaborate a little?
having two functions with the same name... there is no reason for this. just rename one of the functions.
|3utters
11-09-2004, 07:36 PM
this is what I need to do
<script src="myscript.js></script>(in the head)
(in the body)
<script> (this is the photoalbum script)
call functions
<script>
<a href="javascript:myfucntion()">clickhere</a>
that will work but I want to do it with two or more photoalmum scripts
but I run into problems with that.
For another one in the <a href > I have to call the same function to bring up the photoalbum. So I am stuck. Is there even a way to do this or not?
Willy Duitt
11-09-2004, 08:07 PM
You may want to read this thread (http://www.codingforums.com/showthread.php?t=46661)....
.....Willy
|3utters
11-09-2004, 09:54 PM
Well ok I got it to pull up form two different
href lines but it is loading all the photo's from both
scripts. arghhhhhhhhh!!!!!.
This is what I have.
<head>
<script src="cookiesfuncs.js"></script>
<script src="richfuns.js"></script>
</head>
<body>
<a href="javascript:cookies_show(0)">click here</a>
<a href="javascript:rich_show(0)">click here</a>
</body>
<script>
cookiesalbumcreate(3, 3, -1)
blah blah and so on
</script>
<script>
richalbumcreate(3, 3, -1)
blah blah and so on
</script>
and it is pulling up the album in a different window on click
which is what I want because I will be calling the function
from flash. And then you can scroll throuhg the photo's using
prev and next buttons.Now the oly problem I am having is
that each script is loading all the pictures but I have no idea
why because the script source is written differently one
having all funtions named cookies_function and the other is
all rich_function so they should not be able to communicate
correct or am I wrong on this?
|3utters