Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

In If ( query ) { }, query is been assigned as a value!

Status
Not open for further replies.

leaocinho

Programmer
May 17, 2001
2
CL
Hola gente.

Espero que estén teniendo un buen día.

Something etrange is happenning to me: in a function, the query (IF), is not just comparing the actual value from the object's attribute, but giving the attribute the value wich I want to compare. Hard to understand? See the code! It's assigning "0,*" to the .cols of the frameset!

Me ocurre algo extraño y desagradable: en una función, la consulta (if) en javascript, en vez de ir a buscar el valor actual del atributo de un objeto, en este caso el valor de .cols en el frameset "arreglo", y compararlo, le asigna el valor "o,*". ?????

NOTE: "arreglo" is the id for the frameset.

function posicionar(){
if (parent.document.all.arreglo.cols = "0,*"){
sinop.style.left=((800/2)-(250/2))
sinop.left=((800/2)-(250/2))
}
else{
sinop.style.left=((569/2)-(250/2))
sinop.left=((569/2)-(250/2))
}
}

¿Alguien sabe qué ocurre?

Gracias.
 
Use == TWO equal signs, instead of one in the IF statement. Tracy Dryden
tracy@bydisn.com

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top