Sudhakar,

I believe a "tap" event in a Javascript page viewed in Safari fires normal
"click" handlers, so you could use the built-in attachEvent() function in
javascript or set an onclick="" attribute in HTML -- or you could use a
mini-framework like Zepto (https://github.com/madrobby/zepto#readme).

As far as playing a sound, there are a couple ways to play a sound natively
(http://www.phon.ucl.ac.uk/home/mark/audio/play.htm), but most of these
techniques will only work for uncompressed WAV files (and of course the IE &
Java approaches won't work on iOS). The usual approach is to use a free
embeddable flash-based player
(http://designshack.co.uk/articles/html/four-quick-and-easy-ways-to-embed-mp
3-files-into-your-site), but this won't work on iOS either.
 
-- peter 

-----Original Message-----
From: [email protected] [mailto:[email protected]]
On Behalf Of Sudhakar
Sent: Thursday, January 06, 2011 5:19 AM
To: iPhoneWebDev
Subject: touch events using javascript

i would like to use an app when i tap on a button when this event
occurs only i would like an audio file to play which is only for 2-3
seconds like a beep sound

using html and javascript only and not in xcode how can i use an event
so that when i tap on a button i can call a javascript function which
will play the audio file for few seconds

-- 
You received this message because you are subscribed to the Google Groups
"iPhoneWebDev" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/iphonewebdev?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"iPhoneWebDev" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/iphonewebdev?hl=en.

Reply via email to