tags:

views:

102

answers:

4

Example:

function pcs()
{
    var t1 = document.getElementById("tot1").value
    var pb = document.getElementById("pcbox").value
    var pc = ""

    if (t1==! && pb==!)
    {
     document.getElementId("rbox").innerHTML = ""
    }
}

My question is if t1 and pb are null the function pcs() is not called... Why?

+2  A: 

if(t1==! && pb==!) --> this is absolutly wrong.... What are you trying to check?

Maybe if(t1!="" && pb!="")?

Sergio
+3  A: 

The line if(t1==! && pb==!) is nonsense - did you mean if (!t1 && !pb)?

Greg
+6  A: 
Andrzej Doyle
A: 

You've posted no code to show the function pcs() being called. Post more code.

uidzer0