View Full Version : Help!!!! Please

11-08-2004, 11: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

11-09-2004, 12:39 AM
could you elaborate a little?

11-09-2004, 02:16 AM
having two functions with the same name... there is no reason for this. just rename one of the functions.

11-09-2004, 08: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

<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, 09:07 PM
You may want to read this thread (http://www.codingforums.com/showthread.php?t=46661)....


11-09-2004, 10: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.
<script src="cookiesfuncs.js"></script>
<script src="richfuns.js"></script>


<a href="javascript:cookies_show(0)">click here</a>
<a href="javascript:rich_show(0)">click here</a>

cookiesalbumcreate(3, 3, -1)
blah blah and so on

richalbumcreate(3, 3, -1)
blah blah and so on

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?