Pixelpost

Authentic Photoblog Flavour


Go Back   Pixelpost Forum > SUPPORT / INFORMATION > Pixelpost Help

Post Reply
 
Thread Tools
  #1  
Old 04-06-2008, 01:17 PM
photography's Avatar
photography Offline
pp regular
 
Join Date: Apr 2008
Location: Romania
Posts: 25
Send a message via Yahoo to photography
Disable a certain javascript for an operating system?

Hello everyone,

I've discovered that on linux image_fade.js from simplicious templates has a strange behavior. In Windows everything is smooth, but on linux is a real headache, an image needs ~10 seconds to appear.

Is there a way to test if the user uses linux and to use that .js in case he does?

Thanks!
__________________
· I'm sorry if I make some mistakes here and there, english is not my native language.
· Successfully using this method to fight spam since 01.03.2008. Spam comments encountered so far: 0.
· photography - my website
Reply With Quote
  #2  
Old 04-06-2008, 02:40 PM
photography's Avatar
photography Offline
pp regular
 
Join Date: Apr 2008
Location: Romania
Posts: 25
Send a message via Yahoo to photography
*solved using jfgi method*

Code:
var OSName="Unknown OS";
if (navigator.appVersion.indexOf("Win")!=-1) OSName="Windows";
if (navigator.appVersion.indexOf("Mac")!=-1) OSName="MacOS";
if (navigator.appVersion.indexOf("X11")!=-1) OSName="UNIX";
if (navigator.appVersion.indexOf("Linux")!=-1) OSName="Linux";

document.write('Your OS: '+OSName);
Now I have in image_fade.js something like this:

HTML Code:
function initImage() {
	if (navigator.appVersion.indexOf("Win")!=-1) {
	imageId = 'photo';
	image = document.getElementById(imageId);
	setOpacity(image, 0);
	image.style.visibility = "visible";
	fadeIn(imageId,0);
	}
	
	else
		{
	imageId = 'photo';
	image = document.getElementById(imageId);
	setOpacity(image, 100)
	image.style.visibility = "visible";
			}

}
i hope will be useful for someone.
__________________
· I'm sorry if I make some mistakes here and there, english is not my native language.
· Successfully using this method to fight spam since 01.03.2008. Spam comments encountered so far: 0.
· photography - my website
Reply With Quote
Post Reply


Thread Tools




All times are GMT. The time now is 08:04 PM.

Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd. | Style Design: d3 designs