onclick MLFileOpen question

Forum for discussing building user interfaces for controlling MLServer using the iPhone or iPod Touch.
Andyt
Newbie
Newbie
Posts: 13
Joined: Mon Apr 26, 2010 4:57 am
Contact:

onclick MLFileOpen question

Postby Andyt » Wed May 12, 2010 9:07 pm

I have a page that has a picture, and when you press it it calls a sound file.

It works fine like this:
<li><a mlcmd="MLFileOpen|\\Halserver\Halserver shared docs\sound files\Balloon Pop.wav" href="Index.html" >Baloon Pop</a></li>

but the problem is that i want the page to stay where it is so I dont want a href. So I tried this line:

<td width="25%" align="center"><img onclick="doCommand('Halserver|MLFileOpen|\\Halserver\Halserver shared docs\sound files\Balloon Pop.wav')" src="images/balloon.png" width=70 height=70 border="0"></td>

Which works apart from the fact that it strips out the \\\ 's so in the server event log it shows this:
MLCommand~Halserver|MLFileOpen|\HalserverHalserver shared docssound filesBalloon Pop.wav

See its dropped the \'s

Can someone tell me whats wrong or tell me another way of calling MLfileopen without having it redirect to a href after it finishes

Thanks

User avatar
CinemarDave
Site Admin
Site Admin
Posts: 10535
Joined: Fri Feb 07, 2003 8:56 am
Location: Planet Earth
Contact:

Re: onclick MLFileOpen question

Postby CinemarDave » Wed May 12, 2010 10:31 pm

For every one \ you need use \\ because the backslash is a javascript escape character.


Return to “iPhone / iPod Touch Beta”

Who is online

Users browsing this forum: No registered users and 1 guest