Wednesday, 15 August 2012

javascript - Creating and submitting a form in tiptip -



javascript - Creating and submitting a form in tiptip -

i implemented tiptip , found fantastic use. want create form , utilize in tiptip tool tip user can fill , submit it.

i have created tiptip as

$('.div').tiptip({ maxwidth: 1000, defaultposition: 'right', content: function (e) { $.ajax({ url: 'tets.php', datatype: json, success: function (response) { $('#tiptip_content').html(response); $('body').append(response).fadein('1000');// var e callback function info (see above) } }); homecoming 'please wait...'; // temporary show please wait text until ajax success callback called. } });

i form in tooltip. take mouse in it, disappears (obviously, tooltip @ end). there way trying achieve??

my html

<div class="div">hover on me</div>

tets.php

<form id = "testform" method="post" action="newemptyphp.php"> <table width="400" border="0" align="center" cellpadding="5" cellspacing="0"> <tr> <td width="150">username</td> <td width="250"><input name="username" type="text" class="textfield" /></td> </tr> <tr> <td>password</td> <td><input name="password" type="password" class="textfield" /></td> </tr> <tr> <td>&nbsp;</td> <td><input name="remember" type="checkbox" value="d"> remember me</td> </tr> <tr> <td>&nbsp;</td> <td><input type="submit" name="login" value="login" /></td> </tr> </table> </form>

http://code.drewwilson.com/entry/tiptip-jquery-plugin

"keepalive: true of false (false default) - when set true tiptip fadeout when hover on actual tiptip , hover off of it."

try adding property , set true

update:

example here: http://jsbin.com/imeqes/2/

appears work fine when hover on image, hover on tip, stays there.

javascript jquery jquery-ui tooltip

No comments:

Post a Comment