framework7

Open full view…

Done button in KEYPAD not working – Andorid

thilinadinithfonseka
Mon, 09 Jan 2017 07:30:06 GMT

i have used var mykeypad =app.keypad({ input: ‘#NoofBags’, valueMaxLength: 10, dotButton: false, toolbar:true, toolbarCloseText:'Done', type:'numpad', }); but don't get the button in andorid OS P.S i initialized myapp as app

NikolayKuznetsov
Mon, 09 Jan 2017 07:45:07 GMT

Look errors in debug console (emulator)

thilinadinithfonseka
Mon, 09 Jan 2017 08:05:45 GMT

not getting any errors :( only thing is i don't get "done" button

Kerry D
Mon, 09 Jan 2017 10:49:25 GMT

Did you include *framework7.keypad.css* and *framework7.keypad.js*?

thilinadinithfonseka
Tue, 10 Jan 2017 09:21:42 GMT

hi Kerry i added `<link rel="stylesheet" href="css/framework7.keypad.min.css">` and `<link rel="stylesheet" href="css/framework7.keypad.min.js">`

Kerry D
Tue, 10 Jan 2017 10:32:58 GMT

You've done it wrong... Javascript files are embedded as <script> tags, not <link> tags. You should instead use ---html <script type="text/javascript" src="js/framework7.keypad.min.js"></script> --- And make sure that it goes _after_ the Framework 7 Javascript file (see http://framework7.io/docs/app-layout.html for how to include the Javascript tags at the end of your document)

thilinadinithfonseka
Tue, 10 Jan 2017 10:34:36 GMT

sorry it is a typing mistake in my code i have it as `<script type="text/javascript" src="js/framework7.keypad.min.js"></script>`

Kerry D
Tue, 10 Jan 2017 10:34:56 GMT

Is it at the end of your document?

thilinadinithfonseka
Tue, 10 Jan 2017 10:40:32 GMT

yes i hereby attach image of it also [2017-01-10_16](//muut.com/u/framework7/s3/:framework7:ckZ7:20170110_16.03.331.png.jpg)

Kerry D
Tue, 10 Jan 2017 10:42:27 GMT

Well, the first thing I'd suggest is remove the extra ',' (comma) after _type:'numpad'_ ...You don't need another comma if it's the last key/value pair in the set.

thilinadinithfonseka
Tue, 10 Jan 2017 10:48:43 GMT

i did i hereby attach index.html and page init code as well as well [Abcde](//muut.com/u/framework7/s1/:framework7:mghb:abcde.png.jpg) [Aeeeeee](//muut.com/u/framework7/s1/:framework7:TGjA:aeeeeee.png.jpg)

Kerry D
Tue, 10 Jan 2017 10:52:44 GMT

The problem is in your onPageInit code. It's not the same as what you posted in your first forum post. You're missing setting a variable... You have: ---js app.keypad({ --- ....but you need to instead have: ---js var myKeypad = app.keypad({ ---js

thilinadinithfonseka
Tue, 10 Jan 2017 11:43:28 GMT

--- app.keypad({ …but you need to instead have: var myKeypad = app.keypad({ --- i added this and still its the same and i dont use var myKeypad variable in my code thats why i didn't put in the code

Kerry D
Tue, 10 Jan 2017 19:22:43 GMT

It doesn't matter whether you call it 'myKeypad' or 'myGorilla', you can call it anything you want. The point is you still need to declare it in order for it to be used.

plpl
Tue, 10 Jan 2017 19:39:16 GMT

you cant see it because it's *white*. css: --- .toolbar .right .close-picker {color: #000000;} ---

thilinadinithfonseka
Wed, 11 Jan 2017 05:55:54 GMT

damn !! thats it !! thats alot plpl it was white and i could see it. i was worried about why it didnt come without any error even. you saved me again :)