The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

> Hide modal forum default: jqgrid - pop up
publicGenome
post Nov 13 2015, 04:42 PM
Post #1





Group: Members
Posts: 8
Joined: 13-November 15
Member No.: 23,739



Hi HTML-ers,

Thanks for the forum. I'm a noob in HTML, and web development. Pardon my naive questions, and apologies should I violated any forum rule.

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.

That is div id - dialog-analysis
CODE

<div id="dialog-analysis" title="Add Analysis">
<form >

<form>
<fieldset>
          <div>
      <label for="name">Name</label>
      <input type="text" name="name" id="name" value="" class="text ui-widget-content ui-corner-all"></br>
      </div>
       <div>
      <label for="email">Email</label>
      <input type="text" name="email" id="email" value="" class="text ui-widget-content ui-corner-all"></br>
      </div>
       <div>
      <label for="password">Password</label>
    
      <input type="password" name="password" id="password" value="" class="text ui-widget-content ui-corner-all"></br>
      </div>

      <!-- Allow form submission with keyboard without duplicating the dialog button -->
      <input type="submit" tabindex="-1" style="position:absolute; top:-1000px">
</fieldset>
  </form>

</form>
</div>


My java script looks like:

CODE


document.getElementById("dialog-analysis").style.display="none";

        $("#grid_illume").navButtonAdd('#pager_illume',{
                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(){
                                      
                                    }
                              }
                              
                        });
                         dialog.dialog("open");
                }
              
        });


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:

http://jqueryui.com/dialog/#modal-form

And here, the code doesn't use (or similar):
document.getElementById("dialog-analysis").style.display="none";

That is what interests me.

Kindly help.
Again, thank you for your help in advance!
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Posts in this topic


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 26th March 2019 - 11:51 AM