Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6

Thread: Help!!!! Please

  1. #1
    New to the CF scene
    Join Date
    Nov 2004
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Help!!!! Please

    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

  • #2
    Senior Coder joh6nn's Avatar
    Join Date
    Jun 2002
    Location
    72° W. 48' 57" , 41° N. 32' 04"
    Posts
    1,887
    Thanks
    0
    Thanked 1 Time in 1 Post
    could you elaborate a little?
    bluemood | devedge | devmo | MS Dev Library | WebMonkey | the Guide

    i am a loser geek, crazy with an evil streak,
    yes i do believe there is a violent thing inside of me.

  • #3
    fci
    fci is offline
    Senior Coder
    Join Date
    Aug 2004
    Location
    Twin Cities
    Posts
    1,345
    Thanks
    0
    Thanked 0 Times in 0 Posts
    having two functions with the same name... there is no reason for this. just rename one of the functions.

  • #4
    New to the CF scene
    Join Date
    Nov 2004
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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?
    Last edited by |3utters; 11-09-2004 at 07:45 PM.

  • #5
    Banned
    Join Date
    Sep 2003
    Posts
    3,620
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You may want to read this thread....

    .....Willy

  • #6
    New to the CF scene
    Join Date
    Nov 2004
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •