php - How to cache dynamicaly created form fields -


i have laravel project view user adds form fields dynamicaly. there's ajax "save" button , link opens "print view" of page.

if user hits button after printing, there's no dynamicaly added fields, although saved ( - if reload page, renders correctly)

am missing regarding caching fields?

thanx y

ok, found few possible solutions:

1) target: _blank links lead away

2) input type=hidden dynamically added fields, populated on onbeforeunload, , restored on page load (link)

but choosed force reloading pages after button such (dyn) content.

after body tag:

<input type="hidden" id="tmkreloadtest" value="reloaded" /> <script>   if(document.getelementbyid('tmkreloadtest').value!=="reloaded") {     location.reload();   }   window.onbeforeunload = function (e) {     document.getelementbyid("tmkreloadtest").value = "fromcache";    } </script> 

hope helps..

br y


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

android - Keyboard hides my half of edit-text and button below it even in scroll view -