473,396 Members | 1,797 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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

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..

Jun 2 '06 #1
1 7761
co*******@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/
Jun 2 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Barry | last post by:
Hello, I've recently noticed that someone can simply type in the URL to my javaScript, from my HTML source code, to the explorer location bar and an auto-save dialog pops up to let them save it...
5
by: Rob | last post by:
Help me, I'm just beginning with programming in Access 2000. I've tried the http://www.mvps.org/access/api/api0001.htm but it won't work in Access. What am i doing wrong. I don't have...
1
by: ASH | last post by:
Hello all, I'm using the "API: Call Windows File Open/Save Dialog Box" to source the name of a file to open. The Dialog Box when called opens in the top left hand corner of the screen. I have...
4
by: Richard | last post by:
Hi I'm new to ASP/Web programming so any help would be appreciated... Situation: On my web page I would like to present a link {or button} that would allow the user to download a large file. ...
12
by: Daniel Walzenbach | last post by:
Hi, I have a Website which allows users to input data. After they finished entering data they can click a button to save their input. Problem now is, that I have no possibility to visualize that...
1
by: George W. Jackson | last post by:
I copied the code below and saved it as a .vbs file. Can anyone tell me why I would be getting an 800A0005 error while another XP Pro. and a 2000 machine can run it just fine? The error is "An...
3
by: forest demon | last post by:
for example, let's say I do something like, System.Diagnostics.Process.Start("notepad.exe","sample.txt"); if the user does a SaveAs (in notepad), how can i capture the path that the user...
3
by: =?Utf-8?B?YXNkZg==?= | last post by:
Hello. I am making a web application with c# and am using this code: Response.ContentType = "application/x-excel"; Response.AddHeader("Content-Disposition", "attachment;filename=" +...
3
by: Angus | last post by:
I have a web page with a toolbar containing a Save button. The Save button can change contextually to be a Search button in some cases. Hence the button name searchsavechanges. The snippet of...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.