...

View Full Version : Nan.. What does it mean



chris_angell
07-24-2002, 03:52 PM
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

:rolleyes:

Zardoz
07-24-2002, 04:04 PM
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

chris_angell
07-24-2002, 04:50 PM
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')

???

Zardoz
07-24-2002, 05:08 PM
I don't know enough javascript yet to give you a good answer. Stay tuned!

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

tamienne
07-24-2002, 06:41 PM
why don't you post your code so we can take a peek?

chris_angell
07-24-2002, 07:07 PM
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

adios
07-24-2002, 07:25 PM
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...

EdCompSci
10-08-2009, 12:38 AM
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.

Philip M
10-08-2009, 08:13 AM
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.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum