SP 2007 - 2010 Migration issues

May 1, 2013 at 4:06 PM
I have a few custom SPServices actions on several of our pages. They worked fine in SP 2007, now they've upgraded to SP 2010...a few things are broken. Mainly, things that load content after the fact cause the whole page to reload.
So my page is like a 'wizard' that hides and shows a series of controls. You type into a text box, click the button, select an item in a listbox, click a button, etc...
Problem is, when the script runs, the page reloads in conjunction...which removes the content and the variables that had been collected from the user.
Any ideas?

May 1, 2013 at 4:14 PM

It's pretty hard to say, really. You'll probably need to step through your code to see where the page reload actually happens. One thing that came to mind immediately is the whole dialog framwork in 2010, which isn't in 2007. You may need to adapt thing is your code is running in dialogs.

May 2, 2013 at 2:21 PM
OK, I think I've got it narrowed down a bit. The page reloads whenever I click an HTML button to initiate an action on the page. So it's forcing a 'submit' action, even though the onclick event for the button is like "javascript:MoveNext($('#2a'), $('#3'))".
May 2, 2013 at 4:58 PM
I figured out the solution. I had to add "return false;" after the onclick function for each button. This is probably something I should have done before, as the button is not associated with a form.

May 5, 2013 at 4:31 AM
Great. What that does is stop the "bubbling up" of the onclick event, which prevents the default events from firing.