Can a button have 2 onclick functions?

I have a button on web app, that i would like to have it edit a form and then refresh the fields. I can not have the form open in edit mode due to customer requirements. Can two functions be called from one button? The below button does not work. The functions work fine indepentenly. Thanks.

function editDoc()

{

thisform = document.forms[0];

var WebURL2 = thisform.WebURL2.value;

docID = thisform.DocId.value;

var strLocation = location.href

location.href = strLocation.split(‘?’)[0]+‘?EditDocument’;

function refresh(){

// Emulates refresh on keyword change.

// Call to retain field values while recalculating form.

if( window.document.forms[0].name == “” ) {

// read mode

window.location.reload(true);

return false;

}

else{

// edit mode

_doClick(‘$Refresh’, this, null, null);

return false;

}

}

Subject: Can a button have 2 onclick functions?

Hi

How do you want to launch a JS function after a reload ???

Consider changing your processes.

ian

Subject: RE: Can a button have 2 onclick functions?

The reason im doing an edit then refresh is because i have lookups in the form. if changes are done to the lookups, it does not show on the form unless the form is refreshed even though the lookups have nocache. ive tried different methods and none seem to work only an edit with refresh.

Subject: RE: Can a button have 2 onclick functions?

do you have the form set to “refresh” on keyword change etc.,

Subject: RE: Can a button have 2 onclick functions?

Yes. I have the form to refresh.