WebtextEdit execute Javascript function

I need to execute an entire javascript function. Found what I was doing wrong: var edit = igedit_getById("FG2100RefNo"); var editText = edit.getText(); alert(!isNaN(editText)); But, this only checks & displays a message box. I need to execute the below javascript: