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

Discussion in 'iBooks' started by aanavaras, Dec 12, 2011.

  1. aanavaras
    Offline

    aanavaras iPF Noob

    Joined:
    Dec 8, 2011
    Messages:
    4
    Thanks Received:
    0
    Trophy Points:
    0
    Location:
    India
    Ratings:
    +0 / 0
    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.
  2. twerppoet
    Offline

    twerppoet iPad Legend

    Joined:
    Jan 8, 2011
    Messages:
    16,191
    Thanks Received:
    1,944
    Trophy Points:
    113
    Location:
    Walla Walla, WA
    Ratings:
    +2,147 / 1
    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. ;)
  3. aanavaras
    Offline

    aanavaras iPF Noob

    Joined:
    Dec 8, 2011
    Messages:
    4
    Thanks Received:
    0
    Trophy Points:
    0
    Location:
    India
    Ratings:
    +0 / 0

    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.
  4. SweetPoison
    Offline

    SweetPoison iPad Legend

    Joined:
    Jun 20, 2010
    Messages:
    14,940
    Thanks Received:
    132
    Trophy Points:
    0
    Location:
    Sacramento, California
    Ratings:
    +132 / 0
    Too funny!
  5. thewitt
    Offline

    thewitt iPad Ninja

    Joined:
    Jun 5, 2011
    Messages:
    1,631
    Thanks Received:
    70
    Trophy Points:
    0
    Ratings:
    +70 / 0
    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.
  6. twerppoet
    Offline

    twerppoet iPad Legend

    Joined:
    Jan 8, 2011
    Messages:
    16,191
    Thanks Received:
    1,944
    Trophy Points:
    113
    Location:
    Walla Walla, WA
    Ratings:
    +2,147 / 1
    Cool, I learned something new today. :D
  7. gandhikumar86
    Offline

    gandhikumar86 iPF Noob

    Joined:
    Jul 18, 2012
    Messages:
    2
    Thanks Received:
    0
    Trophy Points:
    0
    Location:
    Tirunelveli
    Ratings:
    +0 / 0
    Hi. I am searching solution for the same question. Have you got that? If so, please let me know the solution.
    Last edited: Sep 3, 2012
  8. aanavaras
    Offline

    aanavaras iPF Noob

    Joined:
    Dec 8, 2011
    Messages:
    4
    Thanks Received:
    0
    Trophy Points:
    0
    Location:
    India
    Ratings:
    +0 / 0
    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.
  9. gandhikumar86
    Offline

    gandhikumar86 iPF Noob

    Joined:
    Jul 18, 2012
    Messages:
    2
    Thanks Received:
    0
    Trophy Points:
    0
    Location:
    Tirunelveli
    Ratings:
    +0 / 0
    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: Sep 5, 2012
  10. aanavaras
    Offline

    aanavaras iPF Noob

    Joined:
    Dec 8, 2011
    Messages:
    4
    Thanks Received:
    0
    Trophy Points:
    0
    Location:
    India
    Ratings:
    +0 / 0
    Wow.! at last, we got a solution. Thanks to Sumit...

Share This Page

Search tags for this page
css3 transition ibooks javascript trigger event ipad
,
epub ibooks keyboard
,
ibooks epub3 javascript textarea input
,

javascript ipad keyboard

,

javascript ipad keybord show

,
javascript show ipad keyboard