Pop-Up window

S

Steve Caliendo

Hi,

Could someone please tell me how to generate a pop-up window?

On my web form I have a button, that when clicked, converts the selected
..pcx file into a .jpg, and I would like to display the converted file in a
new browser window.

Thanks,

Steve
 
S

Steve Caliendo

Can it be done from a server control? I don't know what the name of the
newly created .jpg is going to be until the user selects it. Can javascript
pull out a seesion variable, so that i could do something like this:
a=window.open(session("MyVar"),'MyWindow')

Thanks,

Steve
 
P

Peter Rilling

Presumable if you are performing some conversion on a file, then you must be
sending it to the server for processing. On the server could save the file
in some temp location and output some Javascript that will open the window
to that file when the page is finally rendered. When you users' session
ends, then you can delete the temp file.


Steve Caliendo said:
Can it be done from a server control? I don't know what the name of the
newly created .jpg is going to be until the user selects it. Can javascript
pull out a seesion variable, so that i could do something like this:
a=window.open(session("MyVar"),'MyWindow')

Thanks,

Steve


Steve C. Orr said:
You can open a new window using javascript such as this:
a=window.open('SomeImage.jpg','MyWindow')
Here's more info:
http://msdn.microsoft.com/workshop/author/dhtml/reference/methods/open_0.asp in
 
V

Vidar Petursson

Hi

How is the file selected?
What about if the selected file is in a hidden input

<form>
<input type="hidden" name="myFile" value="whatever.pcx">
<input type="button" onclick="doIt(this.form.myFile.value)" value="Convert
file">
</form>

function doIt(sFileName){
var w = window.open("pageToGo.aspx?sFile=" + sFileName,"myWindow","WINDOW
SPECS");
}

More info:
http://msdn.microsoft.com/library/d...hor/dhtml/reference/dhtml_reference_entry.asp

--
Best Regards
Vidar Petursson
==============================
Microsoft Scripting MVP
http://www.microsoft.com/technet/scriptcenter
==============================
 

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

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,189
Latest member
CryptoTaxSoftware

Latest Threads

Top