user2307958
user2307958

Reputation: 351

Get PHP variable to check form

I'm trying to get a php variable to send alert box to user:

    var filial = '<?php echo $counta; ?>';

    if (filial=='0') {  
        if (formObj.dropdown1.value=='') {  
            alert('Filial');  
            return false;  
        }  
    } 

I think there is an error because alert is not showed...

Any tip to solve?

Thanks a lot

Upvotes: 0

Views: 64

Answers (1)

jspcal
jspcal

Reputation: 51904

view-source and see if filial is initialized... Then check console for any JS errors.

Upvotes: 1

Related Questions