How to call Save As Dialog by using Script ???

C

conckrish

Dear All,

This is all about ASP.NET WEB APPLICATION.

I have a Button and when i click that button,I need to open the
File Dialog( Genearl Save AS Dialog) through Which i have to select the
Image Path. When I press the OK Button of the Save as Dialog ..... I
have to get the File name selected and set it as TextBox Text ...
How to do this by Java Script.And I need to give selected image path
into a Image control. I have tried document.execCommand('SaveAs').. But
not able to fix it.. Plz help me !!


Thnx,
James..
 
R

Randy Webb

(e-mail address removed) said the following on 6/2/2006 3:26 AM:
Dear All,

This is all about ASP.NET WEB APPLICATION.

Then why are you asking in a client-side javascript group?

But your question has nothing to do with ASP other than the fact that
you choose to say that in the hopes that it makes a difference when it
doesn't.
I have a Button and when i click that button,I need to open the
File Dialog( Genearl Save AS Dialog) through Which i have to select the
Image Path.

When I press the OK Button of the Save as Dialog ..... I have to get
the File name selected and set it as TextBox Text ...

The browser already does that. Test it. I promise, it will put the name
- and path - to that file into a textbox - of sorts.
How to do this by Java Script.

No need for scripting, the browser does all that for you.
And I need to give selected image path into a Image control.

Ahh.

<input type="file" onchange="changeImage(this.value)">

function changeImage(imagePath){
document.images['imageNAME'].src = imagePath;
}
I have tried document.execCommand('SaveAs')..

Did you try anything else you may have dreamed up? What makes you think
trying to do a Save As on the current page would change an image?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,077
Latest member
SangMoor21

Latest Threads

Top