PHP Developers Network

A community of PHP developers offering assistance, advice, discussion, and friendship.
It is currently Thu Sep 24, 2020 4:45 pm

All times are UTC - 5 hours

Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: Fri Nov 13, 2015 4:31 pm 
Forum Contributor

Joined: Thu Apr 16, 2015 7:55 am
Posts: 110
Hi There,

I'm trying to create a modal form. I've jqgrid. in Jqgrid, on click of a button a dialog box fires up, with abc details, form.

The form looks like:
That is fiv id - dialog-analysis
Syntax: [ Download ] [ Hide ]
<div id="dialog-analysis" title="Add Analysis">
<form >

      <label for="name">Name</label>
      <input type="text" name="name" id="name" value="" class="text ui-widget-content ui-corner-all"></br>
      <label for="email">Email</label>
      <input type="text" name="email" id="email" value="" class="text ui-widget-content ui-corner-all"></br>
      <label for="password">Password</label>
      <input type="password" name="password" id="password" value="" class="text ui-widget-content ui-corner-all"></br>
      <!-- Allow form submission with keyboard without duplicating the dialog button -->
      <input type="submit" tabindex="-1" style="position:absolute; top:-1000px">


My javascript looks like:

Syntax: [ Download ] [ Hide ]


                caption:"Add Analysis",
                onClickButton: function()
                        var dialog = $("#dialog-analysis").dialog({
                              autoOpen: false,
                              height: 300,
                              width: 350,
                              modal: true,
                              buttons: {
                                  'Cancel': function() {
                                      dialog.dialog( "close" );
                                    'Confirm': function(){

However, I've to write:

document.getElementById("dialog-analysis").style.display="none"; at the top to not to display the form until the button is clicked. Upon clicked, fine windows pops out.

I was wonder if there's any other way to hide?
I used the sample from:

And here, the code doesn't use (or similar):

That is what interests me.

Kindly help.

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC - 5 hours

Who is online

Users browsing this forum: No registered users and 6 guests

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group