0

I'm working on an application where users can download a page and are then able to modify that page by dragging things around, resizing them, etc. using jQuery-UI. After the user makes their changes I'd like to let them upload the modified page to the server as a normal html file. Accessing this html file with a browser will bring down the static page with the changes (no jQuery-UI here to make further changes).

The question is, how to get the modified page from the client's browser back to the server as an html file (or maybe as database entries that PHP can build an html file from)? I don't want to reinvent any wheels here if there are already methods developed for doing this sort of thing.

Thanks for any suggestions

Steve
  • 4,534
  • 9
  • 52
  • 110
  • Anything manipulated by JavaScript will not have easily accessible styling to reproduce it. This is more complicated than you think. – Diodeus - James MacFarlane Jul 09 '13 at 14:13
  • I don't expect it to be simple. But basically, JavaScript manipulation just changes the DOM, and the new DOM can be readout with innerHTML statements, and that data can be uploaded to a database, and PHP can pull that data and put it into an html file and VOILA! - the new html comes down. – Steve Jul 09 '13 at 14:32
  • Depending on the inline styling that the JS will generate is a sloppy approach. The better way would be to grab the computed styling and generate a proper stylesheet. – Diodeus - James MacFarlane Jul 09 '13 at 14:36
  • How do you "grab the computed styling" ? – Steve Jul 09 '13 at 16:24
  • 1
    Here: http://stackoverflow.com/questions/8625855/get-all-computed-style-of-an-element – Diodeus - James MacFarlane Jul 09 '13 at 16:37
  • Thanks! There's a lot of great information there to go through. I'm not sure I see, though, the advantage of building a "proper stylesheet" over just using the HTML as-is, with the inline styling that jQuery-UI stuck in. The rendered markup will look exactly the same and I'm not sure that I care if someone who chooses to view the source thinks it looks sloppy. The jQuery-ui developers didn't worry about that. – Steve Jul 09 '13 at 17:20
  • let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/33150/discussion-between-steve-and-diodeus) – Steve Jul 09 '13 at 17:30

0 Answers0