What's new

How can i access iPad's KeyBoard from JavaScript inside an ePub

aanavaras

iPF Noob
Hi All,

I have a ePub file with few JavaScript. There is an Input box to be filled by the User.

I don't know how to show the Keyboard from the ePub.

How can i access iPad's KeyBoard from JavaScript inside an ePub.


Please Help.
 
Well, you would need an ePub reader app that will interpret javascript. iBooks wont' do that. I'm not aware of any iPad app that will do that. I wasn't even aware that javascript was part of the ePub standard.

So, I guess I'm not much help; but at least you know someone read your post. ;)
 
Well, you would need an ePub reader app that will interpret javascript. iBooks wont' do that. I'm not aware of any iPad app that will do that. I wasn't even aware that javascript was part of the ePub standard.

So, I guess I'm not much help; but at least you know someone read your post. ;)


Dear twerppoet,

Thanks for your reply.

iBooks supports JavaScript in ePub. we have succeeded with few JavaScript functions.

I'm looking for a tutorial, or object reference guide to get access the Native Keyboard of iBook/iPad from my ePub's HTML's form.
 
I don't believe iBooks 1.5 fully supports the ePub 3.0 standard yet, however since Apple was part of the working group I would expect full support soon.
 
Dear twerppoet,

Thanks for your reply.

iBooks supports JavaScript in ePub. we have succeeded with few JavaScript functions.

I'm looking for a tutorial, or object reference guide to get access the Native Keyboard of iBook/iPad from my ePub's HTML's form.

Hi. I am searching solution for the same question. Have you got that? If so, please let me know the solution.
 
Last edited:
Hi. I am searching solution for the same question. Have you got that? If so, please let me know the solution.

not yet. we designed a html keyboard and given the input to the input box through it.
still searching for it. i'll post here immediately once i found.
 
not yet. we designed a html keyboard and given the input to the input box through it.
still searching for it. i'll post here immediately once i found.

Hi, aanavaras! I saw a solution given by Sumit Kumar in LinkedIn under your post, I think.

Here is the copy of that. It works fine.





Code:
function iPadTouchHandler(event) { 
var type = "", 
button = 0; /*left*/ 

if (event.touches.length > 1) 
return; 

switch (event.type) { 
case "touchstart": 

// OLD: On iPad2 clicking on a text input field did not show the keyboard 
//    if ($(event.changedTouches[0].target).is("select")) { 
// NEW: Now on iPad2 the touchstart-Event on input fields is ignored and everything works fine 
// change my by Roland Caspers, Scheer Management 
if ($(event.changedTouches[0].target).is("select") || $(event.changedTouches[0].target).is("input")) { 

return; 
} 
iPadTouchStart(event); /*We need to trigger two events here to support one touch drag and drop*/ 
event.preventDefault(); 
return false; 
break; 
}


Note:

Used <input type="color" name='Name' onclick="iPadTouchHandler(event)" />
instead of <input type="text" name='Name' onclick="iPadTouchHandler(event)" />
 
Last edited:

Most reactions

Latest posts

Back
Top