Pop-Up window

  • Thread starter Thread starter Steve Caliendo
  • Start date Start date
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
 
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
 
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
 
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
==============================
 
Back
Top