I an trying to upload file using modal popup. I couldn't get uploaded file in controller.
I placed file upload control in model popup and used $.post to save that file.
Please suggest me your thoughts, It's possible or not?
Thanks!
No, out of the box $.post cannot be used to upload files. You could use some of the available file upload plugins such as jQuery.form or Blueimp file upload.
Related
This is my first Grails project & I can't seem to do this very simple thing! I am trying to display a list of PDF forms in one page that I have saved under a folder called forms under my_project/grails-app/views/forms and want to open the PDF form in a new window when clicked.
In my .gsp file I am trying to access the forms like this:
Form #1
But that's giving me a 404 error.
I have found couple of solutions like this one or this question (which is very similar to mine)...but first of all, i don't need to upload/download the file. Second, i don't need to render the file either. All I want to do is just click the link and open the PDF file in a new window/tab. Am I saving the PDF files in a wrong place? Please help!! Thank you.
Place your file/directory into grails-app/assets so that you have grails-app/assets/forms/form_one.pdf then you can use the resource tag like this:
Form #1
The grails-app/views directory is used for views rendered by controllers, where as the grails-app/assets directory is used for static and pre-processed assets.
I have a PHP based (no JavaScript) website. It has a file upload input. How do I make this work for an iPad? I have access to the files to be uploaded using dropbox. Thank you
I am new in MVC and I have to implement style on mvc razor control actually I want to hide a file upload control and open file upload control on button click I am using razor file upload control
Asssuming your upload control is called fileselector, try this...
$('#fileSelector').click();
If I want to change create my Tag Library for file Upload via ajax, then what changes I have to make into tag in grails.
I have code for file upload via ajax and using that I want to create tag library which upload file and also submit form through ajax...
what I have do for that??
Have you run this command? This creates the necessary files and you just actually write code in those files. Bascially you just genereate HTML in those. Here is an example of a taglib http://www.howardism.org/Technical/Groovy/Useful_Taglibs.html
Hope this helps !!!
I want to embed a javascript function into a pdf file generated by jasper.
it comes to my mind because I want to make the pdf file auto open printing dialog.
after reading this question and tried this example I want to do the same.
but I use iReport designer to create my pdf templates and then export using struts actions, any idea how to embed javascript with ireport?
thanks
You can try to use the net.sf.jasperreports.export.pdf.javascript property.
The information about this property is here.