Of course! That fixes it. Thanks
"uMar Khan" wrote:
> Hi,
> Just a small mistake, when you need to check some condition than use two
> equal to signs
> if (returnedInvoice = true) INCORRECT
> if (returnedInvoice == true) CORRECT
> // WORKING CODE
> var returnedInvoice = crmForm.all.new_returnedinvoiceexist.DataValue;
> if (returnedInvoice == true)
> {
> alert("Return");
> }
> else
> {
> alert("Nothing");
> }
> --
> PLEASE do click on Yes or No button if this post was helpful or not for our
> feedback.
> uMar Khan
> Email for direct contact: imumar at gmail dot com
> "Troyz" wrote:
> > I have a bit field I created in account new_returnedinvoiceexist with values
> > of Yes or No.
> > I wanted to create a jscript onload event to alert user if
> > new_returnedinvoiceexist value is "Yes".
> > I created the following jscript but cannot get it to work:
> > var returnedInvoice = crmForm.all.new_returnedinvoiceexist.DataValue;
> > if (returnedInvoice = true)
> > {
> > alert("return");
> > }
> > else
> > {
> > ;
> > }
> > I have tried many different combinations like changing true to 1 etc. I
> > have checked that the field name is correct. I have gotten the alert to
> > popup but was not correctly checking the field.
> > Help! I know this should be very easy.