2

I am working in SP Designer 2007. I have an issue where I would like to update the editform.aspx but allow the user to keep working on the form. My thought was I could do a save then reload, but it isn't working.

<input type="button" value="Update" name="btnSave" onclick="javascript:{ddwrt:GenFireServerEvent('__commit;__redirect={/}')};location.reload(true) " />

What is happening is tht the page will just reload (no commit). If I take off location.reload(true), then it will commit but will leave the page.

My end goal is to allow some of the data fields to be updated as they work which will cause conditional information to be displayed upon a button click.

Example: Options A B C [Button] If a user selects A and clicks the button, I want the form to commit and then reload itself so that a subset of items related to "option A" will now appear via conditional formatting.

Thanks in advance.

3

Just remove the redirect in GenFireServerEvent. The nature of the event will trigger a postback, reloading the page with the updated data.

<input type="button" value="Update" name="btnSave" onclick="javascript: {ddwrt:GenFireServerEvent('__commit')}" />

Be sure to include this code within the DataFormWebPart.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.