Hi all, i have a problem with Firefox. As you can see bellow i am retrieving some data from sql server with the use of external method "GetPrList" and then show taht data. The data of "_['sequence-index']==2" is the full name of an image file to the file system. So i use: <a href="file///<dtml-var expr="str(_['sequence-item'])">"> <img src="file///<dtml-var expr="str(_['sequence-item'])">" alt="Alt Text" width="150" height="150" > </a> to show that image. I works fine with IE 6 (both the image shows and the link works), but when i try it with firefox it does not show the image neither the link works. The only thing i can see is the "Alt Text" marked as hyperlink, that shows like "http://localhost:81/Members/demo/Panorama/PriceList/Test_A_Voisys/file///%5C..." witch tells me that it adds "http://localhost:81/Members/demo/Panorama/PriceList/Test_A_Voisys/" to what i tell it to be. I quess this is the same reason why the image does not show. How can i tell that what i ask as src="... and href="... is not relative but absolut? Do i do something else wrong so that the image does not in Forefox only? I have tried chenging the settings of firefox about image loading but it does not seem to work... Thank you in advance... <!-- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"> <script type="text/javascript" src="/plone_javascript_variables.js"></script> <script type="text/javascript" src="/plone_javascripts.js"></script> <!-- Column style sheet. --> <style type="text/css" media="screen"><!-- @import url(/ploneColumns.css); --></style> <!-- Main style sheets for CSS2 capable browsers --> <style type="text/css" media="screen"><!-- @import url(/plone.css); --></style> <!-- Custom style sheet if available --> <style type="text/css" media="all"><!-- @import url(/ploneCustom.css); --></style> <!-- Disable IE6 image toolbar --> <meta http-equiv="imagetoolbar" content="yes" /> </head> <body> <table id="sortable" class="listing" summary="Content listing" cellpadding="0" cellspacing="0"> <thead> <tr> <th><b> ΚΩΔΙΚΟΣ </b></th> <th><b> ΟΝΟΜΑΣΙΑ </b></th> <th><b> ΕΙΚΟΝΑ </b></th> </tr> </thead> <tbody> <dtml-in expr="GetPrList(sysDSN=dsnName,usr=usrID,mypass=passWD)"> <dtml-if sequence-even> <tr class="even"> <dtml-else> <tr class="odd"> </dtml-if> <dtml-in sequence-item> <dtml-if expr="_['sequence-index']==2"> <td> <a href="file///<dtml-var expr="str(_['sequence-item'])">"> <img src="file///<dtml-var expr="str(_['sequence-item'])">" alt="Alt Text" width="150" height="150" > </a> </td> <dtml-else> <td> <dtml-var expr="str(_['sequence-item'] or '').decode('iso-8859-7').encode('utf-8')"> </td> </dtml-if> </dtml-in> </tr> </dtml-in> </tbody> </table> <body> <html> --> much respeact, Thomas G. Apostolou
1. You're not closing the <img> tag correctly. 2. This problem wouldn't have happened if you would have used ZPT instead of DTML 3. Don't crosspost to multiple lists. On 10/25/05, Thomas G. Apostolou <thomas.info@hol.gr> wrote:
Hi all,
i have a problem with Firefox. As you can see bellow i am retrieving some data from sql server with the use of external method "GetPrList" and then show taht data. The data of "_['sequence-index']==2" is the full name of an image file to the file system. So i use: <a href="file///<dtml-var expr="str(_['sequence-item'])">"> <img src="file///<dtml-var expr="str(_['sequence-item'])">" alt="Alt Text" width="150" height="150" > </a> to show that image. I works fine with IE 6 (both the image shows and the link works), but when i try it with firefox it does not show the image neither the link works. The only thing i can see is the "Alt Text" marked as hyperlink, that shows like "http://localhost:81/Members/demo/Panorama/PriceList/Test_A_Voisys/file///%5C..." witch tells me that it adds "http://localhost:81/Members/demo/Panorama/PriceList/Test_A_Voisys/" to what i tell it to be.
I quess this is the same reason why the image does not show. How can i tell that what i ask as src="... and href="... is not relative but absolut?
Do i do something else wrong so that the image does not in Forefox only?
I have tried chenging the settings of firefox about image loading but it does not seem to work...
Thank you in advance...
<!-- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"> <script type="text/javascript" src="/plone_javascript_variables.js"></script> <script type="text/javascript" src="/plone_javascripts.js"></script>
<!-- Column style sheet. --> <style type="text/css" media="screen"><!-- @import url(/ploneColumns.css); --></style> <!-- Main style sheets for CSS2 capable browsers --> <style type="text/css" media="screen"><!-- @import url(/plone.css); --></style> <!-- Custom style sheet if available --> <style type="text/css" media="all"><!-- @import url(/ploneCustom.css); --></style> <!-- Disable IE6 image toolbar --> <meta http-equiv="imagetoolbar" content="yes" /> </head>
<body> <table id="sortable" class="listing" summary="Content listing" cellpadding="0" cellspacing="0"> <thead> <tr> <th><b> ΚΩΔΙΚΟΣ </b></th> <th><b> ΟΝΟΜΑΣΙΑ </b></th> <th><b> ΕΙΚΟΝΑ </b></th> </tr> </thead> <tbody> <dtml-in expr="GetPrList(sysDSN=dsnName,usr=usrID,mypass=passWD)"> <dtml-if sequence-even> <tr class="even"> <dtml-else> <tr class="odd"> </dtml-if> <dtml-in sequence-item> <dtml-if expr="_['sequence-index']==2"> <td> <a href="file///<dtml-var expr="str(_['sequence-item'])">"> <img src="file///<dtml-var expr="str(_['sequence-item'])">" alt="Alt Text" width="150" height="150" > </a> </td> <dtml-else> <td> <dtml-var expr="str(_['sequence-item'] or '').decode('iso-8859-7').encode('utf-8')"> </td> </dtml-if> </dtml-in> </tr> </dtml-in> </tbody> </table> <body> <html> -->
much respeact,
Thomas G. Apostolou _______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
-- Peter Bengtsson, work www.fry-it.com home www.peterbe.com hobby www.issuetrackerproduct.com
On 25.10.05 15:18:11, Peter Bengtsson wrote:
1. You're not closing the <img> tag correctly.
Why's that? Because it's not closed? If he's using HTML 4.01 Transitional this is perfectly legal.
2. This problem wouldn't have happened if you would have used ZPT instead of DTML
Yes it would, the problem doesn't depend on DTML or ZPT, it's just that the computed URL for the Image and the Anchor is not absolute but relative. Andreas -- Don't Worry, Be Happy. -- Meher Baba
On 10/25/05, Andreas Pakulat <apaku@gmx.de> wrote:
On 25.10.05 15:18:11, Peter Bengtsson wrote:
1. You're not closing the <img> tag correctly.
Why's that? Because it's not closed? If he's using HTML 4.01 Transitional this is perfectly legal.
Because this is illegal HTML: <a href="blablabla"><img src="somethingsomething" </a>
2. This problem wouldn't have happened if you would have used ZPT instead of DTML
Yes it would, the problem doesn't depend on DTML or ZPT, it's just that the computed URL for the Image and the Anchor is not absolute but relative.
see above
Andreas
-- Don't Worry, Be Happy. -- Meher Baba _______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
-- Peter Bengtsson, work www.fry-it.com home www.peterbe.com hobby www.issuetrackerproduct.com
On 25.10.05 16:35:56, Peter Bengtsson wrote:
On 10/25/05, Andreas Pakulat <apaku@gmx.de> wrote:
On 25.10.05 15:18:11, Peter Bengtsson wrote:
1. You're not closing the <img> tag correctly.
Why's that? Because it's not closed? If he's using HTML 4.01 Transitional this is perfectly legal.
Because this is illegal HTML: <a href="blablabla"><img src="somethingsomething" </a>
Right, but the OP wrote: <a ...> <img src="file///<dtml-var expr="str(_['sequence-item'])">" alt="Alt Text" width="150" height="150" > </a> Do you see the closing ">" here^^ ? Andreas -- You will remember something that you should not have forgotten.
On 25.10.05 17:03:09, Thomas G. Apostolou wrote:
i have a problem with Firefox.
No you don't, you actually misunderstand something about URL's..
<a href="file///<dtml-var expr="str(_['sequence-item'])">">
That is not a correct URL, it's only a part of it. What you really want is: file://<dtml-var ...>
<img src="file///<dtml-var expr="str(_['sequence-item'])">" alt="Alt Text" width="150" height="150" >
Same thing here. A URL consists of a protocol, an address, a port and a path. file is the protocoll, after it there have to be ://, then you have the server address and the port (if not 80) and at last a path. With file:// there normally is no server, but only a path eventually using a drive letter on windows.
"http://localhost:81/Members/demo/Panorama/PriceList/Test_A_Voisys/file///%5C..."
Do not use file:// URL's other than for testing purposes. If you put this site online nobody will see the Images or have working links, because they don't have the files on their system. Other than that, this is the normal behaviour for relative URL's (and file///... is a relative URL), the browser prepends the current URL to it. The error is acutally on IE's side, but that is of no real concern here.
I have tried chenging the settings of firefox about image loading but it does not seem to work...
You only have to be sure to provide a correct absolute URL, no need to change anything in firefox. Andreas -- Don't relax! It's only your tension that's holding you together.
participants (4)
-
Andreas Pakulat -
Peter Bengtsson -
Peter Bengtsson -
Thomas G. Apostolou