3 Replies - 4375 Views - Last Post: 30 January 2012 - 03:42 PM

#1 dbbdp  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 24-January 12

Issue with a horizontal layout and javascript in Chrome

Posted 24 January 2012 - 02:11 PM

I've got a pretty simple horizontal html layout with a javascript scroll command. It works perfectly on phones, tablets, and every browser except for Chrome.

For example,
javascript:pageScroll(975)
to go forward and
javascript:pageScroll(-975)
to go backwards.

How do I get this to work in Chrome?
Is This A Good Question/Topic? 0
  • +

Replies To: Issue with a horizontal layout and javascript in Chrome

#2 SittingonDucks  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 64
  • Joined: 23-December 11

Re: Issue with a horizontal layout and javascript in Chrome

Posted 28 January 2012 - 10:08 AM

I wouldn't use that... it's somewhat outdated. use window.scroll(int x, int y); instead of that.

Also, there is a Javascript forum. I recommend using it.
Was This Post Helpful? 0
  • +
  • -

#3 enjoibp3  Icon User is offline

  • New D.I.C Head

Reputation: 14
  • View blog
  • Posts: 48
  • Joined: 02-March 11

Re: Issue with a horizontal layout and javascript in Chrome

Posted 28 January 2012 - 10:41 AM

You could also use jquery $.scrollTop :turned:

http://api.jquery.com/scrollTop/
Was This Post Helpful? 0
  • +
  • -

#4 dbbdp  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 24-January 12

Re: Issue with a horizontal layout and javascript in Chrome

Posted 30 January 2012 - 03:42 PM

Thanks for the responses, guys.

Quote

I wouldn't use that... it's somewhat outdated. use window.scroll(int x, int y); instead of that.

Also, there is a Javascript forum. I recommend using it.


Thanks, but I tried this out and didn't work when previewed. Got a not found notice. Tried some variations and it would go forward, but not backwards. Can you explain how my original command is outdated? It's quick, easy, and does exactly what I need it to do.

Quote

You could also use jquery $.scrollTop :turned:


I'm using jQuery for my menu, but I've got to say that the jQuery site is a design and organizational nightmare! It has some great uses, but the tutorials and instructions can range from obtuse to outright poorly written.

Oddly enough, after firing off the file to a friend, the scroll commands magically started working. Why, I don't know. Maybe Chrome updated again during the weeks I'd last worked on the page. I've had to tear up tons of layouts due to Chrome. I've had issues with folks seeing hidden scroll bars when I don't and we all have the same version and OS.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1