• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
adding virtual keyboard to login form

#1
[eluser]kresimir[/eluser]
Hi,
i found nice keyboard.js code for using virtual keyboard on input data via touchpanel. It works great in input form like:
Code:
<h3>Login form</h3>
&lt;form action="" method="post" id="loginform"&gt;
<label for="username">Username:</label>
&lt;input type="text" name="username" id="username" class="keyboardInput"/&gt;
I tried to put it into my login input array but i dont find the way how...
Code:
<tr>
   <td >&lt;?php echo 'Username'; ?&gt;: </td>
   <td >
   &lt;?php echo form_input(array(
   'class'=>'keyboardInput',
   'name'=>'username',
   'value'=> '',
   'size'=>'20'
   )); ?&gt;
   </td>
  </tr>
Please, how to put js class="keyboardInput" into upper array ?
I found it on:http://www.greywyvern.com/code/javascript/keyboard

#2
[eluser]yacman[/eluser]
Your code is producing the following html source:

Code:
&lt;input type="text" name="username" value="" class="keyboardInput" size="20"&gt;

Make sure that you are wrapping your <table> with a &lt;form&gt; element. This may be why you don't see the JS binding.

#3
[eluser]kresimir[/eluser]
Thnx,
the problem was in a path for css and js file!
It work great...

#4
[eluser]kresimir[/eluser]
I installed "Simple Login with CodeIgniter" from:
http://www.codefactorycr.com/login-with-...r-php.html.
I installed files under ci/application folder maps:views,models and controllers.

Also i installed keyboard.js keyboard.css and keyboard.png file.
For them i opened under ci/css ci/js and ci/images maps.
In the keyboard.js i change the path for the picture keyboard.png from:"keyboard.png" to "images/keyboard.png"
On opening the local site http://localhost/ci i get login form and picture of the keyboard. All work fine till i press Login button.
Than CI change my base url from:
http://localhost/ci to http://localhost/ci/index.php/verifylogin and i lost keyboard.png picture.
In config.php i have:
Code:
$config['base_url'] = '';
$config['index_page'] = 'index.php';
In controllers/verifylogin.php , function index() cause that i get index.php/verifylogin extension to base url ( $this->load->view('login/login'); )and the link to keyboard.png keyboard.js and keyboard.css is lost.
I lost the virtual keyboard.
How can I get the same screen like on openning the initial site:
"localhost/ci" instad of the "localhost/ci/index.php/verifylogin" ?


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.