Go Back   MacRumors Forums > Special Interests > Visual Media > Web Design and Development

Reply
 
Thread Tools Search this Thread Display Modes
Old Oct 15, 2012, 11:59 PM   #1
Tech198
macrumors 601
 
Join Date: Mar 2011
Location: Australia, Perth
Javascript won't behave

Hi all

My mate has a website, the menu system is javascript driven, with 1 menu deep.

When the user goes over thiese menus, the drop dows(s) appear in IE (havan't checked on Mac yet), and it works *briefly* on iPad.

However, the drop-down apeears for a second upon the tap, before the page refreshes to show the first link in the drop menu.

The menu headings are not linked at all, and just drop down menus,

However, they "appear" as linked on the the ipad.

Can anyone tell me why this happens? Its just javascript...
__________________
13" MBPR, i5, 256Gig SDD, 8 Gig Ram, Apple TV, iPhone 5S 16Gig, iPad 4th Gen 16Gig, Mac Mini 2.3Ghz i7, 1TB HD
"There are no stupid questions, just stupid people."

Last edited by Tech198; Oct 16, 2012 at 08:32 AM.
Tech198 is offline   0 Reply With Quote
Old Oct 16, 2012, 08:01 AM   #2
960design
macrumors 6502a
 
Join Date: Apr 2012
Location: Destin, FL
Online example? I'm having a hard time picturing what is happening.

Just a random guess: iPad doesn't have a :hover, could the javascript or css? be acting on this?

just guessing
__________________
TI-99/4A, tape cassette, 12" B&W Zenith
960design is offline   0 Reply With Quote
Old Oct 16, 2012, 08:31 AM   #3
Tech198
Thread Starter
macrumors 601
 
Join Date: Mar 2011
Location: Australia, Perth
Website is :- www.chromagrafx.com.au
__________________
13" MBPR, i5, 256Gig SDD, 8 Gig Ram, Apple TV, iPhone 5S 16Gig, iPad 4th Gen 16Gig, Mac Mini 2.3Ghz i7, 1TB HD
"There are no stupid questions, just stupid people."
Tech198 is offline   0 Reply With Quote
Old Oct 16, 2012, 08:42 AM   #4
960design
macrumors 6502a
 
Join Date: Apr 2012
Location: Destin, FL
Yep, pretty common mistake.

Code:
<td width="107" align="center"><a onmouseover="cFrame.ShowMenu('Group003', 0, 0, false,'mb3|3',0);" onmouseout="cFrame.tHideAll();" href="stationery.asp"><img src="images/mb3.jpg" width=107 height=25 border=0 name="mb3"></a></td>
Eeek! Tables for design, very bad!!

Notice the "onmouseover"; that's the javascript waiting for the the mouse to hover over the button. Probably will not work so well with touch devices ( pretty much every mobile platform in existence now ).

Ask your mate to read up on mobile compatibility, this will get them started: http://developer.apple.com/library/i...ingEvents.html

good luck

PS For a quick fix you can just use a menu Subject Title that links to # to replace the stationary for example, that way hover should still pull up dropdown, click events for mobile will also display the rest of the menu without actually redirecting the user
__________________
TI-99/4A, tape cassette, 12" B&W Zenith
960design is offline   0 Reply With Quote
Old Oct 16, 2012, 11:43 AM   #5
jsm4182
macrumors 6502
 
Join Date: Apr 2006
Location: Newburgh, NY
Send a message via AIM to jsm4182
The coding on that site is pretty bad.

Javascript isn't needed to create a dropdown like that, if it was done just using CSS it would work across all major browsers including the iPad.
__________________
Mac Mini, 2.3ghz i7, 16GB RAM, 1TB HDD, ML | MacBook Air 13", 1.3ghz i5, 1GB RAM, 128GB SSD, ML | iPhone 5 32GB White | iPad 3 64GB Black
jsm4182 is offline   0 Reply With Quote

Reply
MacRumors Forums > Special Interests > Visual Media > Web Design and Development

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
Javascript Errors. iPhone Safari Won't load websites. predarkness iPhone Tips, Help and Troubleshooting 2 Oct 20, 2013 12:16 PM
Make user folders (Documents, Music, etc.) behave like Windows libraries? rk25123 OS X 10.8 Mountain Lion 3 Aug 5, 2013 02:52 PM
All iPads: How does the Mini behave in music production/instrument apps compared to the iPad? Alundra iPad 2 Feb 10, 2013 08:34 AM
How do I tweak Snow Leopard (Finder & Safari) to make it behave more like Tiger? Diamond Dave OS X 3 Jan 16, 2013 05:29 PM
Safari 6.0.2 and javascript Franciturci OS X 10.8 Mountain Lion 2 Nov 16, 2012 10:32 AM

Forum Jump

All times are GMT -5. The time now is 09:58 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC