C
Craig G
i have the following little jscript function which i use to launch a modal
dialog
but what i want to do is check the values of txtAddress1 & txtAddress2 to
make sure they have values before lauching the dialog. but im not sure of
the syntax for it
function OpenPostCode2(idname, postBack)
{
var strReturn;
strReturn=window.showModalDialog('frmPostCode.aspx?Address1=' +
document.getElementById('txtAddress1').value + '&Address2=' +
document.getElementById('txtAddress2').value
,null,'status:no;dialogWidth:520px;dialogHeight:285px;dialogHide:true;help:n
o;scroll:no');
if (strReturn != null)
document.getElementById('txtPostcode').value=strReturn;
}
so i wanted to put something within it like
if (document.getElementById('txtAddress2').value=="") window.alert("Town
must be
populated") return;
but i dunno how!!!
any help would be greatly appreciated.
Cheers, and happy new year
Craig
dialog
but what i want to do is check the values of txtAddress1 & txtAddress2 to
make sure they have values before lauching the dialog. but im not sure of
the syntax for it
function OpenPostCode2(idname, postBack)
{
var strReturn;
strReturn=window.showModalDialog('frmPostCode.aspx?Address1=' +
document.getElementById('txtAddress1').value + '&Address2=' +
document.getElementById('txtAddress2').value
,null,'status:no;dialogWidth:520px;dialogHeight:285px;dialogHide:true;help:n
o;scroll:no');
if (strReturn != null)
document.getElementById('txtPostcode').value=strReturn;
}
so i wanted to put something within it like
if (document.getElementById('txtAddress2').value=="") window.alert("Town
must be
populated") return;
but i dunno how!!!
any help would be greatly appreciated.
Cheers, and happy new year
Craig