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

c++ - llvm function pass ReplaceInstWithInst malloc -

Cross-Compiling Linux Kernel for Raspberry Pi - ${CCPREFIX}gcc -v does not work -

java.lang.NoClassDefFoundError When Creating New Android Project -