Results 1 to 4 of 4

Thread: external variable !

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Nov 2002
    Location
    Viet Nam
    Posts
    142

    external variable !

    I have a file chaychu.js which having some arrays that are used for scrolling the value of them from bottom to top . But then i want to make the scrolling text more easy to change by using database . That means i added PHP script to get values from the database and pass the value the arrays in that chaychu.js .
    The problem is that i don't know how to solve this . Thought there was a way : getting value form database and then write in another .js file ( tmp.js - for example ) - with the format of setting value for the function in the file chaychu.js . But i can't get the value from the the file tmp.js to use in the function in the file chaychu.js . So i came here to ask that can we call values from another .js file from another file ? and how ?
    Or is there any other way to solve my problem above ?

  2. #2
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    huh?
    My evil laugh has a squeak in it.

    kristopherwilson.com

  3. #3
    Fanatic Member davebat's Avatar
    Join Date
    Dec 2002
    Posts
    727
    ditto

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    Nov 2002
    Location
    Viet Nam
    Posts
    142

    It is like this !

    I'll tell another example to make it more clear .
    I have a function of making the arrays of text scrolling that is stored in the file chaychu.js .

    Eg:
    var text = new array();

    function scroll()
    {
    // making the array scroll by accessing the variable text[] and the mc ( array count )
    }

    this code only making the value in the text[] array to scroll - or that we can only change the array text[] value to make newer scrolling text .

    Now i want to have the text[] array variable to be passed from the database . I had a solution but now think back it is false . So please anyone have a solution for this problem please tell me how .

Posting Permissions

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



Click Here to Expand Forum to Full Width