Hide only progressbar in uploadify - asp.net-mvc-4

I'm creating one web application using ASP.NET MVC 4.0 and Jquery .
Me use uploadify for uploading files from client and i want to upload file on post action of my form, so basically my problem is while i'm selecting file it shows progressbar with file list and uploading progressbar but i want to show only file not progress bar.
stuck at this point - Any suggestion ?

so you don't need uploadify you just want multi file select
make form like this
<form action="processThem.php" method="post" enctype="multipart/form-data">
<input type="file" value="" name="upload[]" multiple>
<button type="submit">Upload!</button>
</form>
Square brackets in name of input type file are important also attribute multiple
see this post
http://www.hyperorg.com/blogger/2012/09/09/beginner2beginner-javascript-multi-file-upload-php-to-process-it/

Related

Is it possible to set folder path for input type IFormFile

I am currently working on a CMS web application. To select images i am using the following code. The input type is IFormFile(BigImage is of type IFormFile)
<div class="input-group input-group-sm mb-2 custom-file-button">
<label class="input-group-text" for="inputGroupFile">GroßesBild</label>
<input class="form-control" form="addUpdateSubmenu" asp-for="BigImage" id="inputGroupFile">
</div>
Now my question is if it is possible to set a default folder path like: "\abc33\images\bilder"
Now it is just opening any folder which was used the latest.
So if i would select an image the directory would look like shown on this screenshot
There is no concept of folder selection in the HTML/JavaScript platform. Even if you could select one, you wouldn't be able to do anything with the folder path. Web applications do not have access to a client's file system.
Here is a similar issue, You can refer to it.
Browsers don't allow you to modify deafault file path(value)of<input type="file"/> due to security issue,the value only changes when you select a file yourself

integration of ck editor in vue js

I am trying to integrate ckeditor with vue js in my application. Everything is working fine but when i click on submit button, all the data is saved in database and all fields are empty.
but in this case , i am not able to edit the ck-editor if i refresh or change the dom and again come to same page then working fine.
I think it needs to re-binding of ckeditor but I am not sure how we can do it.
I followed this link -> https://vuejsexamples.com/ckeditor-using-for-vue-js-2/
to integrate the ck-editor and also using js file of ckeditor on index page.
I assume that the Form which you are using is submitted by the browser - native html behaviour. To avoid that, the input field with type submit should look like (both #submit.prevent so as #click.prevent):
<form #submit.prevent="">
<input type="text" />
<input type="submit" value="ok" #click.prevent="" />
</form>

HTML form submission in struts

Can I submit a simple html form with html tags and no struts tags. I'm using struts 1.0 and have a form like this:
<form action='/admin/fsubmit.html?action=search' method='post'>
<input type='text' name='keyword'>
<input type='submit' name='search' value='Search'>
</form>
I'm handling this submission with struts. but it seems like my action is never called. Do I need to use form with struts html tags?
If using struts html tags is the only option then how do I use two forms in single Action class?
The answer is yes,
The problem I see here is your action='/admin/fsubmit.html?action=search'. It's either your action is mapped to a .do extension or .html. If it's the latter, then your relative URL isn't mapped properly.

Can struts 1.1 post to a relative path

I have a Struts application and I build by form
<html:form action="companyProvAdd"> ....</html:form>
which renders the html as
<form name="companyProvAddForm" method="post" action="/ebig/companyProvAdd.do"> ...</form>
Is there a way to have the post go to a relative URL?
<form name="companyProvAddForm" method="post" action="companyProvAdd.do"> ...</form>
It looks like Struts 1.1 does not support this
https://issues.apache.org/jira/browse/STR-768
but I did find a workaround
<!-- <html:form action="companyProvAdd"> -->
<form name="companyProvAddForm" method="post" action="companyProvAdd.do">
....
</html:form>
The html:form tag is necessary because items in the form depend on its presence. Commenting it out keeps the browser from reading it and leaves room for the desired form line to be hard coded in.
It is an ugly hack, but it works.

Create PDF in Struts from data on screen

I am able to create a simple pdf using iText api inside a struts action class.
The data that should be passed into the pdf is generated on screen based on user search parameters.
What I am wondering is how I can pass the data into the struts action so it can be displayed in the pdf?
Thanks in advance.
Similar question is already here. You just need to transfer everything that is on the page to struts action. I would do it like so:
JSP:
<div id="content">
wrap everything generated in here
</div>
<html:hidden styleId="hiddenHtml" name="hiddenHtml"/>
<html:submit onclick="setContentAsParam();">Export PDF</html:submit>
JS:
function setContentAsParam() {
document.getElementById('hiddenHtml').value = document.getElementById('content').innerHTML
}
This will set all the HTML to a action class property hiddenHtml. Get back if anything won't work, I wrote this out of my head without a test :)