General :  K-Meleon Web Browser Forum
General discussion about K-Meleon 
Photo cannot be enlarged
Posted by: caprivi
Date: December 18, 2008 06:11PM

On this page

http://www.vesseltracker.com/de/ShipPhotos/162512-Sirius-Star-9384198.html

you find aship's photo which can be enlarged by clicking on it. Doing so KM oprns a new window which is totally blank.

Any other browser however shows specific ship in an enlarged vision.

What do I have to do to bring KM showing the same ?



Edited 1 time(s). Last edit at 12/18/2008 06:12PM by caprivi.

Options: ReplyQuote
Re: Photo cannot be enlarged
Posted by: guenter
Date: December 19, 2008 07:04AM

Ship must be gone. Go to ships via:
http://www.vesseltracker.com/

Options: ReplyQuote
Re: Photo cannot be enlarged
Posted by: desga2
Date: December 19, 2008 06:01PM

This must be related with web code used.

Firefox 2.0.0.18 show the image in a new window with image size but this show in title: "about:blank" - <Image's title>
The source code of this new window with the image is a blank page source code.

This is an example of the JavaScript code used for website to open new window:

<div style="position:relative;">
	<img src="http://images.vesseltracker.com/images/vessels/midres/158930.jpg"; onclick="javascript: showPopup('http://images.vesseltracker.com/images/vessels/hires/158930.jpg',750,562,'Cargo Ship Bornrif IMO 9405368 by schiff'); return false;" style="cursor: pointer; " alt="Cargo Ship Bornrif IMO 9405368 by schiff" />
	<!--<div jwcid="@ImageEdit" shipPhoto="ognl: photo"/>-->

</div>

The problem to show this images in new windows also happend in K-Meleon 1.1.6, 1.5.0 and 1.5.2RC2.
JavaScript showPopup() function code:
ShipPhotoDisplay.js
function showPopup(img_url,width,height,alt_text)
{
	popup=window.open('','','width='+width+',height='+height+',dependent=yes');
	popup.document.body.style.padding='0px;';
	popup.document.body.style.margin='0px;';
	popup.document.title = alt_text;
	popup.document.body.innerHTML='<img src="' + img_url + '"' +
		' alt="'+ alt_text + '"' +
		' onclick="window.close()"'+
		' style="cursor: pointer;"/>';
		
}

I hope this can help to solved this problem/bug.

Look this developer.mozilla.org documentation: element.innerHTML.

K-Meleon in Spanish



Edited 8 time(s). Last edit at 12/19/2008 06:47PM by desga2.

Options: ReplyQuote
Re: Photo cannot be enlarged
Posted by: JohnHell
Date: December 19, 2008 07:05PM

... why the hell can't he use window.open instead of a function to virtually create a page??...

I think this mustn't be posted as a bug. It's just a web bug, not a K-meleon problem.

Options: ReplyQuote
Re: Photo cannot be enlarged
Posted by: disrupted
Date: December 20, 2008 01:05AM

i agree john.. the code is not well-written.. so you're right about it being a bug with the page's source code but a browser most also ensure to ignore such errors and remedy the code if it's possible ofcourse.. that's what firefox ,opera and webkit browsers did.. they saw the bug yet overcame it and were able to display the image. kmeleon is not very forgiving with badly written pages.. so it sez ok, you want me to download that image.. fine!i will but your code for displaying it is wrong and i will not accept it.

Options: ReplyQuote
Re: Photo cannot be enlarged
Posted by: JohnHell
Date: December 20, 2008 03:40PM

I'll tell you something that maybe you don't know:

innerHTML IS NOT a web standard call procedure, it is an invented way from Microsoft and its Internet Explorer to insert html with javascript (and probably, I don't know, VBS with ASP). W3C said, use DOM to create elements, instead innerHTML.

(I'm not against Microsoft and IE, just pointing you it)

One thing is let the browsers to render that function. Indeed K-meleon does it. I have an script with innerHTML and it works. But one thing is (from Gecko) "ok, we accept the innerHTML call, even if it is not a standard" and other "the innerHTML call is bad written and we'll fix it, even if it is not a standard".

What will be next?

Now, for example, the getElementById isn't accepted if it is not written as I did now, should we let the call as getelementbyid? no, it is getElementById.

Options: ReplyQuote
Re: Photo cannot be enlarged
Posted by: disrupted(unlogged)
Date: December 20, 2008 11:07PM

it's a microsoft(ie) compliant code.. not standard, pathetic i know :mad:.
unfortunately lot of stupid pages are 'ie-compliant'(which is an excuse for ill code) and although it is sad.. browsers try to accommodate such pages as much as possible... hopefully, one day.. the internet will be clean from all this code rubbish and developers will not have to worry about supporting badly written pages anymore.

Options: ReplyQuote


K-Meleon forum is powered by Phorum.