Error on adding OnClick attribute to insertAdjacentHTML when passing javascript to OnClick

29 views Asked by At

My Code on aspx page:

function StartupJS() {
 document.getElementById('cphForm_btnHistory').insertAdjacentHTML("beforebegin", '<input type="submit" name="ctl00$cphForm$btnSave" value="Save" onclick="javascript :if (chkSaveValidation()){this.disabled=true; this.value='Wait...';__doPostBack('ctl00$cphForm$btnSave','')}else{return false;};" id="cphForm_btnSave" tabindex="41" class="dbody" style="width:60px;">')}

Now It is showing error on: this.value='Wait...'

that ')' is expected. I don't understand why this is showing this error.

0

There are 0 answers