Refresh causes entered data to disappear

rss

Posted by Sonoma - Sep 28 ’15 at 08:26

On random intervals when our users press submit/save the page refreshes and the newly entered data disappears. It could happen after a few seconds or starting or a few minutes. Small forms no biggie, anoying though. But as you can imagine a form with 90+ fields, for some reason people lose it.

It happens in Edge, IE, FF, Chrome...

This is kind of new so I do not think it is SPForm. Anyone run into something like this? Weird issue.

 

 

  • rostislav
    rostislav
    Moderator
    Member for: 6 years 6 months 25 days
    #1 by rostislav Sep 28 ’15 at 09:15

    Can you send the html of a page that's giving you trouble to [email protected] ?

  • Sonoma
    Member
    Member for: 7 years 2 months 5 days
    #2 by Sonoma Sep 28 ’15 at 09:58

    Sent. It is a stripped down test version of a big form.

  • rostislav
    rostislav
    Moderator
    Member for: 6 years 6 months 25 days
    #3 by rostislav Sep 28 ’15 at 01:15

    [#2]:

    We've found a place in your code that redefines PreSaveItem function, which very well may be what's causing the problem. Try commenting it out and seeing what happens. That is the exact place in the code:

    $kw('document').ready(function() {    
    	RepeatingRows_FixInputSizes();
    
    	try
    	{
    		if(typeof(PreSaveItem) != 'undefined')
    		{
    			if(RR_oldPreSaveItem == null)
    			{
    				RR_oldPreSaveItem = PreSaveItem;
    
    				PreSaveItem = function()
    				{
    					RR_fireOnRequestEnded = function()
    					{
    						PreSaveItem = RR_oldPreSaveItem;
    						var allSaveButtons = $kw('input[id$=diidIOSaveItem]');
    						if(ClkElmt != 'undefined')
    							ClkElmt(allSaveButtons[allSaveButtons.length-1]);
    						else
    						{
    							try
    							{
    								e.click();
    							}
    							catch(e)
    							{
    								var evt=document.createEvent('MouseEvents');
    								evt.initMouseEvent('click', true, true, window,
    								0, 0, 0, 0, 0, false, false, false, false, 0, null);
    								e.dispatchEvent(evt);
    							}
    						}
    						window.setTimeout("$kw('input[id$=diidIOSaveItem]').removeAttr('disabled');", 1000);
    					};
    					__doPostBack('ctl00$ctl42$g_6b8909e3_5b59_45be_b730_9f71af7234be$SystemicTherapyField$ctl00$ctl00$removeAllEmptyRows','');
    					return false;
    				}
    			}
    		}
    	}catch(e){}
    });
    
Displaying 1 to 3 of 3 messages