I have 2 simple JS function one checks values of 2 input fields and triggers the other function Here is the code
function ValidateForm()
{
var name = document.getElementById('fullname').value;
var email = document.getElementById('email').value;
if(name.value= '' || email.value='')
{
alert('fields Empty');
}
else
{
UpdateRecord();
}
}
function UpdateRecord()
{
var Qact = getQueryVariable('ACT');
if(Qact==2){
var picture= document.getElementById('myPic').src;
activity.setUpdates(name,email,picture);
}
else
{
activity.CheckEmail(name,email);
}
}
HTML
<button onClick="ValidateForm();" data-role="button" >Register</button>
if I call UpdateRecord() on button click it works fine but when i use ValidateForm() nothing works. The firefox debugger don't even go to the ValidateForm() Function
valuename.value= ''use==.