views:

146

answers:

2

jquery .dialog() will create a nice floating box form. if i do not want floating box form but just typical form on the page. what jquery function should i call?

+5  A: 

None, just add an html form to the page.

jeroen
if do it this way, i have to manually put in css etc.. jquery dialog() come with standard nice look and feel
cometta
+1  A: 

Something along the lines of

$('body').append('<form><input type="text"/></form>');

would add a form to the end of the page. You could also make a specific element to add the form too (like a div) or use

$('some_element').after('<form>...</form>');

to add the form after a specific element.

aepheus
if i do it this way, there will be no nice css layout . just typical form. i want to have nice look and feel like .dialog()
cometta
You can always steal the css of a dialog. Firebug (a Firefox plugin) comes in handy for things like this. "ui-dialog-content" and "ui-widget-content" are the classes applied to dialog content. Adding those classes to your form container should give the desired style.<div class="ui-dialog-content ui-widget-content"><form>...</form></div>
aepheus