View Full Version : Problems trying to save changes before going to the next screen on a wizard

29 Jun 2011, 1:08 AM
Hi. I'm trying to change an existing piece of code that currently moves the user from one screen to the next on a wizard form. It uses 'window.location' to do this. My change is to save the data on the current screen, using a function that calls the BasicForm.updateRecord function to do so, then use the existing code to move onto the next screen. My problem is that while the user is taken to the next screen as expected, the data is not being saved. If I comment-out the 'window.location' line and try again, the data is saved. Can the 'window.location' line be interfering with the code that saves the data? I hope that someone can help.


30 Jun 2011, 1:24 PM
Bit hard to comment without seeing the code but from your description I would assume you aren't waiting for the save action to complete before moving to the next page. Are you setting the location immediately or are you doing it in a callback after the save it finished?

30 Jun 2011, 11:57 PM
Thanks skirtle. But since I posted, I've managed to get my code to work.

Thanks again.