从jQuery UI Dialog中删除三个滚动条

时间:2015-09-24 08:39:37

标签: javascript jquery html css jquery-ui

我有一个jQuery对话框,它使用hrefs根据每个表ID动态打开新的对话框。查看它的外观截图:

我不知道它为什么会这样或者如何删除滚动条。

我的jQuery对话代码:

$(document).ready(function () {
        $('a#pop').live('click', function (e) {
            e.preventDefault();
            var page = $(this).attr("href")
            var pagetitle = $(this).attr("title")
            var $dialog = $('<div></div>')
            .html('<iframe style="border: 0px; " src="' + page + '" width="400px" height="100%"></iframe>')
            .dialog({
                 title: 'Order a Team',
                 resizable: true,
                 autoOpen:false,
                 modal: true,
                 hide: 'fade',
                 width:450,
                 height:800
            });
            $dialog.dialog('open');
        });
    });`

HTML代码:

<form class="form-horizontal" role="form" method="post" action="admin/insert.php">

    <fieldset disabled>
        <div class="form-group">
          <label for="sso" class="col-sm-2 control-label">SSO ID</label>
          <div class="col-sm-10">
            <input type="text" id="disabledTextInput" class="form-control" placeholder=" <?php echo $id; ?> ">
          </div>
        </div>
    </fieldset>

        <div class="form-group">
          <label for="name" class="col-sm-2 control-label">Name</label>
          <div class="col-sm-10">
            <input type="text" class="form-control" id="name" name="first_name" placeholder="First Name" value="<?php echo $first_name; ?>">
          </div>
        </div>

        <div class="form-group">
          <label for="lastname" class="col-sm-2 control-label">Surname</label>
          <div class="col-sm-10">
            <input type="text" class="form-control" id="name" name="last_name" placeholder="Last Name" value="<?php echo $last_name; ?>">
          </div>
        </div>  

    <div class="form-group">
      <label for="team" class="col-sm-2 control-label">Team</label>
      <div class="col-sm-10">   
        <select style="width:auto;" class="btn btn-default dropdown-toggle form-control" type="button" name="team_name" value="" id="dropdownMenu1" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
         <?php
            //connect  to the database
            include 'database_connection.php';

            //query the database
            $sql_category = "SELECT DISTINCT id, team_name FROM team";

            //uses $sql_category variable to make a specific query
            $query = mysqli_query($connection, $sql_category);
        ?>

        <option value="<?php echo $team_name; ?>"><?php echo $team_name; ?></option>

        <?php
            //initilises a while loop to retrieve all the rows
            while ($row = mysqli_fetch_array($query) )
            { 
               //echos all the distinct catDesc rows into a list
               echo "<option value='" . $row['id'] . "' >".htmlspecialchars($row["team_name"])."</option>";
            }
        ?>
        </select>
      </div>
    </div>  

    <div class="form-group">
        <label for="role" class="col-sm-2 control-label">Role</label>
        <div class="col-sm-10">
            <input type="role" class="form-control" id="role" name="role" placeholder="Role" value="<?php echo $role; ?>">
        </div>
    </div>  

    <div class="form-group">
        <label for="email" class="col-sm-2 control-label">Email</label>
        <div class="col-sm-10">
            <input type="email" class="form-control" id="email" name="email" placeholder="example@domain.com" value="<?php echo $email; ?>">
        </div>
    </div>

    <div class="form-group">
        <label for="phone" class="col-sm-2 control-label">Phone Number</label>
        <div class="col-sm-10">
            <input type="phone" class="form-control" id="phone" name="phone" placeholder="Business number" value="<?php echo $phone; ?>">
        </div>
    </div>

    <div class="form-group">
        <label for="region" class="col-sm-2 control-label">Region</label>
        <div class="col-sm-10">
            <input type="region" class="form-control" id="region" name="region" placeholder="Region e.g. South" value="<?php echo $region; ?>">
        </div>
    </div>  

    <div class="form-group">
        <div class="col-sm-10 col-sm-offset-2">
            <input type="submit" value="Save" class="btn btn-primary">
        </div>
    </div>

    <div class="form-group">
        <div class="col-sm-10 col-sm-offset-2">
            <! Will be used to display an alert to the user>
        </div>
    </div>
</form>

    <?php
        //closes and stops the loop 
        }
    ?>  

如何从jQuery对话框弹出窗口中删除水平和垂直滚动条?

0 个答案:

没有答案