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..
|
|
0
|
|
|
|
Reply
|
conckrish (6)
|
6/2/2006 7:26:20 AM |
|
conckrish@gmail.com 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.
<input type="file">
> 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?
--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
|
|
0
|
|
|
|
Reply
|
Randy
|
6/2/2006 4:59:47 PM
|
|