• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

8. Dynamic Forms > 8.14. Copying Form Data Between Pages

Copying Form Data Between Pages

NN 4, IE 4

Problem

You want to convey all form control settings from one page to another.

Solution

Use the stringForms.js library shown in the Discussion to convert all values in a form to a string that can be passed to another page via URLs or cookies. Invoke the form2ArrayString( ) function, passing as an argument a reference to the form in need of conversion. The function returns a string whose format is of a shortcut constructor of an array of objects. Each object represents a form control in the following format:

{name:'elemName',id:'elemID',type:'elemType',value:value}

To distribute the values to a form with the same control structure, invoke string2FormObj( ), passing parameters for a reference to the destination form and to the string originally created by the form2ArrayString( ) function.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint