javascript - Split an html document into multiple documents on form submit -


i want submit html text area , on submit want read file, find class selector , break down html multiple html files , save them in directory.

any ideas on how achieved?

for example let submit textarea , hit submit :

<table class="yoda">     <tr>         <td></td>     </tr> </table> <table class="yoda">     <tr>         <td></td>     </tr> </table> 

on submit want grab each yoda , save in new html file in directory.

thank in advance. not sure if need use php achieve or if need use javascript.

you have 2 options

  1. submit html via submit php , use simpledom library or php native dom/xml methods parse , save individual snippets (best method)

  2. parse html on client (using jquery or native ) , submit json php (remember escape html strings). process json using php on server , save snippets.


Comments

Popular posts from this blog

database - VFP Grid + SQL server 2008 - grid not showing correctly -

jquery - Set jPicker field to empty value -

.htaccess - htaccess convert request to clean url and add slash at the end of the url -