0

I'm making an web app that allow user to input form and generate word document. The form is relatively complex and I use a lot of jQuery and jQuery Mobile framework. I try to plugin the demo from opentbs ut it seems like it doesn't do anything when I have:

<script src="http://code.jquery.com/mobile/1.3.1/jquery.mobile-1.3.1.min.js"></script>

when I comment it out it looks fine. Does any one has problem like that?

I also having problem to find the resources of how to modify the template within the docx. I know here like variable that so I can modify it through php form but is there more detail documentation for it?

Kara
  • 6,115
  • 16
  • 50
  • 57
mishxpie
  • 38
  • 8
  • Hi, You could give a try to [DocxGenJS](https://github.com/edi9999/docxgenjs) which I lead and maintain and is to generate docx files from templates. It runs on Javascript. [Demo](http://javascript-ninja.fr/docxgenjs/examples/demo.html) – edi9999 Sep 24 '13 at 08:53

1 Answers1

0

I found that there's nothing to do with opentbs it was jQuery that is assuming the post is ajax request therefore I cannot have file download (I am not sure if I am explaining it 100 percent correctly). However, I found the work around: put the script below right before jQuery Mobile script. It works for me.

<script>$(document).bind("mobileinit", function(){$.mobile.ajaxEnabled = false;});</scipet>

or this link in your htnl tag:

<a href="download.php?file=test.txt" rel="external">test.txt<a>
Community
  • 1
  • 1
mishxpie
  • 38
  • 8