Save to system dialog box in AngularJS - angularjs

how to get the windows "Save as dialog box" on click of some button in AngularJS? I need to give the facility to save the data in a div tag to a file the user wants in his system.

Related

How to get an alert/confirm dialog box with custom message when refreshing a page

I am trying to show a pop-up (alert/confirm box) with a custom message when a user refreshes a page. The reason is to alert the user that the data they entered might be lost. I have tried working with the 'beforeunload' event -> https://developer.mozilla.org/en-US/docs/Web/API/WindowEventHandlers/onbeforeunload.
It shows a dialog box specific to the browser and the message cannot be modified anymore. Is there a way to show our prompt (alert/confirm) with custom message? If there is, will it cause any security issues?

How to stop "save your password" key icon to appear in search bar?

I am working on to disable browser to prompt save password pop-up. I have successfully done that by taking the input fields out of form and using hidden input fields in actual form. It stopped browser to prompt save password pop-up in chrome as well as mozilla. In chrome browser when I type password in input field a key icon appears in search bar on right side. When I click on that it asks to save password. How can I hide that icon too. I am using angularjs.

Hide button on PDF before flattening in LiveCycle Workbench

ASP.NET application asks user to fill in fields.
User clicks a "Request Signatures" button in the application and a LiveCycle service is called to create the pdf.
The pdf is saved in the ASP.NET application database.
This pdf has to then be digitally signed by 3 people.
A link to the pdf is shown to the first person in the workflow.
User clicks on link and the pdf is shown in the browser for them to digitally sign.
At the bottom of the pdf is a submit button, which the user clicks after signing.
The pdf is submitted to a web page which updates the pdf in the database and through other database tables, is put in the next person's "to-do" list.
2nd & 3rd person repeat #5 - #8
After the 3rd person signs, the pdf is considered complete. The pdf is to be flattened using LiveCycles Output service transformPDF
The problem is the "Submit" button on the form. I have made it "Visible - Screen only" to take care of anyone that wants to print a hard copy anytime during the process. However, I have a feeling the client will complain that the Submit button shows up on screen. Also, the final, flattened pdf should not show the button as it's being submitted to an official repository for these forms in which other forms don't have a submit button.
After the 3rd person signs, I can easily set the submit button presence to hidden. Then when it's flattened, it won't show up. The problem comes when the user wants a "Print View" before or during the signing process.
So my question is can I make a LiveCycle process that takes in a document variable (the pdf with the submit button) and output a document variable (the pdf without the submit button). Meaning the process would have to somehow run javascript inside the pdf to hide the submit button.
That event could be the prePrint event to remove the button from the layout.
And you will need postPrint event to put the button back in.
on the prePrint event of the button(to hide the button):
this.presence = "hidden";
on the postPrint event of the button(to show the button):
this.presence = "visible";

ExtJS 4 uploading files (using CodeIgniter for backend)

I have the standard upload file form from the ExtJS documentations, I create form.Panel with with xtype:filefield and an open and Submit button. And as it is by default when I click Open the browser window is opened and I can choose a file, and then Submit it for saving. But now I\m asked to bypass this and leave only a button with name Open directly on the toolbar and clicking it to open directly the browser window. I don't know even if this is possible and how to do it.
thanks
Leron
Am I understanding this correctly? You need to have a just single button on the page - user clicks button, gets file open dialog and when he presses 'OK' on that dialog form is submitted?
Take a look at the second sample 'Button only'
http://dev.sencha.com/deploy/ext-4.0.0/examples/form/file-upload.html
You are going to want to listen to the filefield.change event, and submit your form when that fires. Example:
http://jsfiddle.net/62gmq/3/

Is there any way to open new tab(or popup, or window) with certain html content in silverlight?

I have a grid filled with some data in my silverlight4 app.
I want to have "Show this as html" button for the grid.
I can generate the html, export it to savefile dialog, but that's not what i need, because in this way user has to perform more actions, like:
click 'export'
enter filename
wait for download
find file open it in browser
Is there any way to create tab, or window, or popup with certain html content in it? (so it would be like
click 'show as html'
?)
Thanks in advance,
Ilya.
The problem is that you can't save it anywhere locally without user interaction (or elevated privileges).... so don't save it locally.
I can think of two options:
1.
Write the data back to the server
Open a normal popup web browser window, pointing a generated temp HTML page.
To open another HTML browser window from Silverlight you can use HtmlWindow.Navigate specifying _blank as the target type.
2.
Use the ability of Silverlight to execute any Javascript to open a popup with the content.
From Silverlight you can use ScriptObject.Invoke to execute arbitrary Javascript.

Resources