SharePoint - GenFireServerEvent - How can I set a fields value

Asked By Chester Thomas on 08-Jul-09 12:40 PM

I am using - {ddwrt:GenFireServerEvent(concat('__update;__workflowTaskComplete={',ddwrt:EcmaScriptEncode(string($Id)),'*',ddwrt:EcmaScriptEncode($ListName),'};__commit;__redirectsource;__redirect={_x0027__x002C_ddwrt:EcmaScriptEncode($ListName)_x002C__x0027_}'))} inside a button to complete a task, I however need to set a value of a field's name.


Can I do it in javascript or in the code above even.


Any help will be appreciated.

Steven McCullagh replied to Chester Thomas on 23-Feb-10 09:36 AM
I think this is an XSL issue.  I don't know if it's possible though.  I'm having the same issue myself.
Geetha replied to Chester Thomas on 30-Apr-10 02:29 AM
you can set the form field value using another javascript function and call the function in the beginning and then the genfireserverevent like..

onclick="javascript: myjavascripttosetvalue(); {ddwrt:GenFireServerEvent('__commit;__redirect={../../pagename.aspx}')}"

<script type="text/javascript" language="javascript">
 function myjavascripttosetvalue()
 {
document.getElementById(controlname).value = 'text';
}