.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links


Posted By:      Posted Date: September 30, 2010    Points: 0   Category :SharePoint

I have a button in the home page named as say "Create Request"

On click of "Create Request" newform.aspx of a custom list will be opened as a popup. A request is a new item in a custom list.

In the newform.aspx of the list, we have used content editor web part with javascript.

We have actually overriden the PreSaveAction method of newform.aspx in the javascript.

Validation of required fields is done inside the PreSaveAction function.

Below given are the last two lines of the PreSaveAction method.


returns true;

For saving the list item PreSaveAction should return true. But business rules need the popup also should get closed once the save happens.

Currently as window is getting closed , the PreSaveAction method is failing some times to return true. So those items wont be getting saved to the list.

Some items are getting saved. But most of the time it is getting failed to save.

Any one knows how to handle this ?

Please help.

View Complete Post

More Related Resource Links

PreSaveAction is not firing for a custom save button on a Custom List Form

Hi Everybody,
I've created a custom list form using SPD. Now I want to put a custom button for saving and redirecting to another page based on a logic. I am using following script for making a custom Save button.

<input type="button" value="Submit" name="Submit" onclick="{ddwrt:GenFireServerEvent('__commit;__redirect={Confirm.aspx}')}  " />
When the user clicks this button, I am able to save the values, but the validation I have implemented in the PreSaveAction() is not getting activated. I don't understand where the problem is.

Is validation with PreSaveAction()  works only with OOB SaveButton ?

Thanks in advance,
- Loka Samastha Sukhino Bhavanthu : May Eternal Peace & Goodwill Prevail in the Whole World!
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend