locked
Add save button on content editor - error RRS feed

  • Question

  • I added a save button - that save and redirect to a sublist - on a content web editor, but it is giving me an error and it will not save the  changes or do any thing. my code is inside .txt file and linked:

    <input type="button" name="btnSave" runat="server" value="   Save   " 
    id="saveButton2" onclick="javascript: {ddwrt:GenFireServerEvent('__commit;__redirect={/Lists/Projects/AllItems.aspx}')}" />

    The error I get is:

    SCRIPT5007: The value of the property 'GenFireServerEvent' is null or undefined, not a Function object


    Any ideas. Thank you
    • Edited by FM250 Monday, May 13, 2013 9:17 PM
    Monday, May 13, 2013 9:17 PM

Answers

  • I had to edit the form and add this line:

    <input type="button" value=" Save/Add sub task " name="btnSave"

    onclick="javascript: {ddwrt:GenFireServerEvent(concat('__commit;__redirect={/RM/Lists/Task/NewForm.aspx?PID=',/dsQueryResponse/Rows/Row/@ID,'}'))}"


    • Marked as answer by FM250 Tuesday, May 21, 2013 8:59 PM
    Tuesday, May 21, 2013 8:59 PM

All replies