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 8 of 8
  1. #1
    New Coder
    Join Date
    Aug 2002
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    object + number, possible?

    I try to make a scrollscript i've found made possible for several
    scrolls on one page so i thought maybe i could add a number to
    the div/span id and to the function and then it adds it to the
    object(or whatever it's called).

    example:

    function(number) {
    object+number.style.pixelTop... bla bla bla...
    }

    you see my point?
    i've tried it (not exactly this script off course, but the "+number"
    part) and it doesn't work i've also tried to make "object" an
    variable and then there add the number to it like this
    var object = object+number;
    so please just tell me if this is possible, i really think it should be anyway.


    /Robert

  • #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
    function(number) {
    window.["object" + number].style.pixelTop... bla bla bla...
    }

    try that.
    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
    New Coder
    Join Date
    Aug 2002
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts
    thanks but i coudn't get it to work i'll could post the whole script later if you would like to help me

  • #4
    New Coder
    Join Date
    Aug 2002
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Oh i'll attach the .js file instead(it's a bit edited)
    Attached Files Attached Files

  • #5
    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
    this:
    ["data" + number]

    has to be this:
    window["data" + number]

    that should do what you want.
    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.

  • #6
    New Coder
    Join Date
    Aug 2002
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts
    hmm thanks now it moves but i still get an error:

    'window[...].offsetHeight' is null or not an object

  • #7
    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
    can we see a link to the site this is on?
    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.

  • #8
    New Coder
    Join Date
    Aug 2002
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts
    it's not up yet but temporarily try:

    http://webb.dynu.com/project

    login: forum
    pass: pass


  •  

    Posting Permissions

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