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 9 of 9
  1. #1
    Regular Coder
    Join Date
    Jul 2002
    Location
    Brighton, UK
    Posts
    282
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Smile Nan.. What does it mean

    I have added this into my code

    window.open(+this.obj.id+".htm",'foliomain')

    but I have it using an alert box and it takes the value and works fine,

    window.alert(+this.obj.id+".htm",'foliomain')

    ?? is the nan like null. can it not reconise the value, why does it not work


  • #2
    New Coder
    Join Date
    Jul 2002
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts
    nan usually means "not a number". This implies that the returned value is probably a string. I'm not sure if a null value qualifies?

    The SoupNazi @ http://www.ChefOnTheEdge.com

  • #3
    Regular Coder
    Join Date
    Jul 2002
    Location
    Brighton, UK
    Posts
    282
    Thanks
    1
    Thanked 0 Times in 0 Posts

    but why is it trying to call a number ??

    why does the value of the id not come up ?? when it does using the same line for an alert window ...

    window.alert(+this.obj.id+".htm",'foliomain')

    ???
    Last edited by chris_angell; 07-24-2002 at 04:58 PM.

  • #4
    New Coder
    Join Date
    Jul 2002
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I don't know enough javascript yet to give you a good answer. Stay tuned!

    The SoupNazi @ http://www.ChefOnTheEdge.com

  • #5
    Regular Coder
    Join Date
    Jun 2002
    Location
    Delaware, USA
    Posts
    137
    Thanks
    0
    Thanked 0 Times in 0 Posts
    why don't you post your code so we can take a peek?

  • #6
    Regular Coder
    Join Date
    Jul 2002
    Location
    Brighton, UK
    Posts
    282
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Smile I didn't think

    ok here we go.. the code I hope it helps to work out why...


    function portfolio() {
    DynLayerInit()

    drag.add(folioweb1,folioweb2,folioweb3,folioweb4,folioweb5,folioprint1,folioprint2,folioprint3,folio print4,folioprint5)

    drag.addTargets(maintarget)
    drag.onDragDrop = hitTarget

    initMouseEvents()
    }
    function hitTarget() {
    document.all[this.obj.id].style.visibility = "hidden"
    alert("dropped "+this.obj.id+" on "+this.targetHit.id)
    window.open(+this.obj.id+".htm",'foliomain')
    }

    the bit in the red is where things go wrong
    Last edited by chris_angell; 07-24-2002 at 07:10 PM.

  • #7
    Senior Coder
    Join Date
    Jun 2002
    Posts
    1,404
    Thanks
    2
    Thanked 32 Times in 32 Posts
    What's this?

    window.open(+this.obj.id+".htm",'foliomain')

    Can't just stick an operator - the addition one - in the middle of nowhere. Maybe:

    window.open(this.obj.id+".htm",'foliomain')

    Looks like D. Steinman so, there's a lot going on there...

  • #8
    New to the CF scene
    Join Date
    Oct 2009
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Post I got it trying to do a DHTML animation (NaN)

    Yeah I got a Nan error when trying to do something different and was wondering what it was. I was posting my code here, but it looks like that wasn't okay (below post), so I'll post it separately.
    Last edited by EdCompSci; 10-09-2009 at 06:36 AM.

  • #9
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    17,918
    Thanks
    203
    Thanked 2,531 Times in 2,509 Posts
    EdCompSci - please do not hijack someone else's post. If you have a question on a different subject please start your own thread. It should be obvious - as otherwise respones to chris_angell and to you will get mixed up and confused. I suggest you delete this post and re-post as a new thread.


  •  

    Posting Permissions

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