andynic
08-24-2009, 02:25 AM
Hi,
I posted this on HTML client side development and am now wondering if possibly it belongs on the server side. Might the problem described below have something to do with Apache Server settings? The reason I ask here, is that everything works as it should if I open the generated HTML file directly in a browser. But if the CGI calls it via "submit", the image often does not display.
Everything is on one computer, client and server. Using Internt Explorer 8 and Safari 3, Perl v 5.8, CGI, Apache 2.2
Orignal Post:
I have what seems to me a strange problem, but then again, I'm pretty new to this stuff.
I have written a perl CGI script. The question is about a generated HTML file.
There are two HTML files, call them A and B. A pops B. The question is about B.
About file A:
=============
The A file presents the user with some input fields and buttons.
When the user clicks the following button in A, the server displays HTML file B.
<input type="button" style="font-size:10pt; color:black"
name="DGCdisplayLocal"
value="Display gallery from local database"
onClick="popWindow('/tmp/gllryToDelLocalDbVsn.html', 'width=1000', 'height=600')">
This is javascript code for popWindow:
function popWindow(theURL, width, height)
{
newWindow = window.open(theURL, "_blank",
"toolbar=no,
menubar=yes,
resizable=yes,
scrollbars=yes,
status=no,
location=no,
left=1,
top=1"+width+","+height);
}
About file B:
=============
File B (/tmp/gllryToDelLocalDbVsn.html), contains the <IMG> tag.
Please see the end of this post for an example.
When the user clicks the button shown above in A, the server pops a window that is file B.
The problem:
============
When the server pops the window, with no consistency, sometimes the image displays, and
sometime it does not. Whether or not the image displays, when the user clicks on the image area,
the server pops the requested window (a much larger version) and the image displays.
When I click on file B itself (/tmp/gllryToDelLocalDbVsn.html). the image always displays.
I have passed the file B code through the validator at http://validator.w3.org/#validateby_upload
and it shows no errors.
Why is it sporadic when the server pops the window. What is wrong with my code?
Example of how the <IMG> tag is coded in file B:
================================================
<center>
<table>
<tr style="font-family:courier; color:green" >
<td align="center">
<IMG name="img0"
src="http://lh6.ggpht.com/_Pih7W33IT_M/RqaYDhT9U3I/AAAAAAAAAAo/iqYp5vTxZYU/DSC_0026.JPG"
alt="Image not available from Picasa"
title="Image not available from Picasa"
height="100" width="33"
onMouseDown="window.open('http://lh6.ggpht.com/_Pih7W33IT_M/RqaYDhT9U3I/AAAAAAAAAAo/iqYp5vTxZYU/DSC_0026.JPG',
'_blank', 'toolbar=no, menubar=no, resizable=yes, top=0, left=200')">
</td>
<td align="left">
Url......................: http://lh6.ggpht.com/_Pih7W33IT_M/RqaYDhT9U3I/AAAAAAAAAAo/iqYp5vTxZYU/DSC_0026.JPG<br>
File uploaded to Picasa..: DSC_0026.JPG<br>
Title....................: DSC_0026.JPG<br>
Caption from Picasa......: <br>
Special caption..........:
</td>
</tr>
</table> </center>
Thanks for your help.
Andynic
I posted this on HTML client side development and am now wondering if possibly it belongs on the server side. Might the problem described below have something to do with Apache Server settings? The reason I ask here, is that everything works as it should if I open the generated HTML file directly in a browser. But if the CGI calls it via "submit", the image often does not display.
Everything is on one computer, client and server. Using Internt Explorer 8 and Safari 3, Perl v 5.8, CGI, Apache 2.2
Orignal Post:
I have what seems to me a strange problem, but then again, I'm pretty new to this stuff.
I have written a perl CGI script. The question is about a generated HTML file.
There are two HTML files, call them A and B. A pops B. The question is about B.
About file A:
=============
The A file presents the user with some input fields and buttons.
When the user clicks the following button in A, the server displays HTML file B.
<input type="button" style="font-size:10pt; color:black"
name="DGCdisplayLocal"
value="Display gallery from local database"
onClick="popWindow('/tmp/gllryToDelLocalDbVsn.html', 'width=1000', 'height=600')">
This is javascript code for popWindow:
function popWindow(theURL, width, height)
{
newWindow = window.open(theURL, "_blank",
"toolbar=no,
menubar=yes,
resizable=yes,
scrollbars=yes,
status=no,
location=no,
left=1,
top=1"+width+","+height);
}
About file B:
=============
File B (/tmp/gllryToDelLocalDbVsn.html), contains the <IMG> tag.
Please see the end of this post for an example.
When the user clicks the button shown above in A, the server pops a window that is file B.
The problem:
============
When the server pops the window, with no consistency, sometimes the image displays, and
sometime it does not. Whether or not the image displays, when the user clicks on the image area,
the server pops the requested window (a much larger version) and the image displays.
When I click on file B itself (/tmp/gllryToDelLocalDbVsn.html). the image always displays.
I have passed the file B code through the validator at http://validator.w3.org/#validateby_upload
and it shows no errors.
Why is it sporadic when the server pops the window. What is wrong with my code?
Example of how the <IMG> tag is coded in file B:
================================================
<center>
<table>
<tr style="font-family:courier; color:green" >
<td align="center">
<IMG name="img0"
src="http://lh6.ggpht.com/_Pih7W33IT_M/RqaYDhT9U3I/AAAAAAAAAAo/iqYp5vTxZYU/DSC_0026.JPG"
alt="Image not available from Picasa"
title="Image not available from Picasa"
height="100" width="33"
onMouseDown="window.open('http://lh6.ggpht.com/_Pih7W33IT_M/RqaYDhT9U3I/AAAAAAAAAAo/iqYp5vTxZYU/DSC_0026.JPG',
'_blank', 'toolbar=no, menubar=no, resizable=yes, top=0, left=200')">
</td>
<td align="left">
Url......................: http://lh6.ggpht.com/_Pih7W33IT_M/RqaYDhT9U3I/AAAAAAAAAAo/iqYp5vTxZYU/DSC_0026.JPG<br>
File uploaded to Picasa..: DSC_0026.JPG<br>
Title....................: DSC_0026.JPG<br>
Caption from Picasa......: <br>
Special caption..........:
</td>
</tr>
</table> </center>
Thanks for your help.
Andynic