Client Side Things
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsOther TechnologiesClient Side Things

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
  #1  
Old April 4th, 2005, 09:24 PM
garrettgriess garrettgriess is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 14 garrettgriess User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Javascript Scroll

Hi, I'm working on a javascript. There are two links that call the functions, which in turn moves an iframe left or right. My only question is, how do I make it work in Internet Explorer? THANKS!

<script language="javascript" type="text/javascript">
function goLeft() {
intx = portfolio.pageXOffset;
while (portfolio.pageXOffset>intx-150&portfolio.pageXOffset>0) {
portfolio.scroll(portfolio.pageXOffset-1,0)
}
}
function goRight() {
intx = portfolio.pageXOffset;
while (portfolio.pageXOffset<intx+150&portfolio.pageXOffset<1350) {
portfolio.scroll(portfolio.pageXOffset+1,0)
}
}
</script>

Reply With Quote
  #2  
Old April 6th, 2005, 05:41 PM
Yian Yian is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: UK
Posts: 279 Yian User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
RE: Javascript Scroll

Does it work in any other browser?

Reply With Quote
  #3  
Old April 6th, 2005, 06:58 PM
garrettgriess garrettgriess is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 14 garrettgriess User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
RE: Javascript Scroll

yes, instead of using pageXoffset like crazy (it doesn't work with MSIE) here's what i did:

if (navigator.appName == "Microsoft Internet Explorer") {
x = portfolio.document.body.scrollLeft;
} else {
x = portfolio.pageXOffset;
}

Reply With Quote
Reply

Viewing: Codewalkers ForumsOther TechnologiesClient Side Things > Javascript Scroll


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
Stay green...Green IT