Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Special Interests > Visual Media > Web Design and Development

Reply
 
Thread Tools Search this Thread Display Modes
Old Oct 15, 2012, 10:59 PM   #1
Tech198
macrumors 68040
 
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...
__________________
15" Macbook Pro i7 750Gig HD 8Gig Ram, Apple TV (3rd-Gen.), iPhone 4S 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 07:32 AM.
Tech198 is offline   0 Reply With Quote
Old Oct 16, 2012, 07:01 AM   #2
960design
macrumors 6502
 
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, 07:31 AM   #3
Tech198
Thread Starter
macrumors 68040
 
Join Date: Mar 2011
Location: Australia, Perth
Website is :- www.chromagrafx.com.au
__________________
15" Macbook Pro i7 750Gig HD 8Gig Ram, Apple TV (3rd-Gen.), iPhone 4S 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, 07:42 AM   #4
960design
macrumors 6502
 
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, 10: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

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 04:41 AM.

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

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