Welcome to the largest and most talked about domain name forum in the World!

We are NamePros, the award-winning free community for domain name owners, buyers and website developers. Once registered, you can:
  • Post your domains for sale or for free appraisals.
  • Private message and conduct business with other domain owners.
  • View member-only forums such as 'Legal Issues' and 'Expired Domains' (NOT visible to search engines)
  • Free access our archives of posts
Join now for free


Go Back   NamePros.com > Discussion > Web Design & Development > Programming
New! Use your Facebook, Google, AIM & Yahoo accounts to securely log into this site, click logo to login  

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.



Closed Thread
 
LinkBack Thread Tools
Old 06-22-2006, 09:03 AM   #1 (permalink)
NamePros Member
 
crazyluv's Avatar
 
Join Date: Jan 2005
Posts: 98
213.00 NP$ (Donate)

crazyluv is an unknown quantity at this point



JS Scroll detecting Cross browser

I am use the following javascript code to detect the scroll movement in various browsers. Mostly IE and FF since those are the only two I got.

Code:
function getScrollMovement(){
	if (typeof(pageXOffset) != "undefined")
	{
		currentX=window.pageXOffset;
		currentY=window.pageYOffset;
	}
	else if (document.compatMode == "CSS1Compat" )
	{
		currentX=document.documentElement.scrollLeft
		currentY=document.documentElement.scrollTop
	}
	else
	{
		currentX=document.body.scrollLeft
		currentY=document.body.scrollTop
	}
}
I was wondering if this code is compatible in other browsers and for most version of the two I have already mentioned.
__________________
AEInbetween
crazyluv is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


All times are GMT -7. The time now is 04:14 PM.

Contact Us - NamePros.com - Privacy Statement - Top
Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.2