Logo 
Search:

Sharepoint 2010 Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint 2010       RSS Feeds

__doPostBack not working dynamically added HTML button on SharePoint 2010 List form

  Asked By: Arvind    Date: Jan 23    Category: Sharepoint 2010    Views: 3281

Hi,

I have added one HTML button on the Default SharePoint 2010 List Edit form dynamically using Jquery.

Code:1

$(priotr).before('<tr><td colspan="2"><input id="btnTest" Name="btnTestSubmit" type="button" onclick = "javascript: {ddwrt:GenFireServerEvent(\'__commit\')}" value="Submit Button"/>

at the time of button click. i get error "Object expected"
Any idea why.

i also tried other option.

Code:2
$(priotr).before('<tr><td colspan="2"><input id="btnTest" Name="btnTestSubmit" type="button" onclick="javascript: __doPostBack(\'btnTestSubmit\''+ ','+'\'__commit\')" value="Submit Button"/>

in the second approach function is working but data is not saving in the list.

Thanks in advance

Arvind

Share: 

 

No Answers Found. Be the First, To Post Answer.

 




Tagged: