Forms 从jquery.ui对话框中的条目访问文本

Forms 从jquery.ui对话框中的条目访问文本,forms,text,jquery-ui-dialog,Forms,Text,Jquery Ui Dialog,如何从jquery.ui对话框中获取文本数据? 我挑出了不起作用的调用,并包含了所有脚本链接,以显示我正在使用的内容。尽管进入对话框的文本条目有效,但它不会传递给包含它的表单。如您所见,我试图将其复制到对话框外的字段中,但这不起作用。我真正想做的是像表单中的其他数据一样将其发布到操作页面 以下是网址: 代码: 这条线 $($input#blabel”).val($($input#enterlabel;).val() 应该是 $($($input#blabel”).val($($($input#

如何从jquery.ui对话框中获取文本数据? 我挑出了不起作用的调用,并包含了所有脚本链接,以显示我正在使用的内容。尽管进入对话框的文本条目有效,但它不会传递给包含它的表单。如您所见,我试图将其复制到对话框外的字段中,但这不起作用。我真正想做的是像表单中的其他数据一样将其发布到操作页面

以下是网址:

代码:


这条线

$($input#blabel”).val($($input#enterlabel;).val()

应该是

$($($input#blabel”).val($($($input#enterlabel”).val())


抓得好!我必须把代码通读几遍才能看到那个小“;”笨蛋!但这并不能解决问题,我找到了解决的办法。让我分享一下,希望它能帮助别人。我将标记放在调用对话框(id“labelStgdialog”)的div之后。该对话框有一个id为=“enterlabel”的文本输入字段(不是表单字段)。然后,我将对话框“OK”按钮的代码更改为复制字段id“enterlabel”“添加到表单中绑定到数据库的表单字段id“blabel”。当我让页面的其余部分完全工作时,我会发布一个链接。
<?php require_once('Connections/bizCon.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") 
{
  if (PHP_VERSION < 6) {
    $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
  }

  $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

  switch ($theType) {
    case "text":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;    
    case "long":
    case "int":
      $theValue = ($theValue != "") ? intval($theValue) : "NULL";
      break;
    case "double":
      $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
      break;
    case "date":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;
    case "defined":
      $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
      break;
  }
  return $theValue;
}
}
mysql_select_db($database_bizCon, $bizCon);
$query_buttonPrefsSet = "SELECT buttonprefs.iduserid, buttonprefs.btop, buttonprefs.bleft, buttonprefs.bcolor, buttonprefs.blabel, buttonprefs.newvisitors, buttonprefs.bdelay, buttonprefs.brepeats, buttonprefs.btype, buttonprefs.bphonetarget FROM buttonprefs ORDER BY buttonprefs.iduserid DESC LIMIT 1";
$buttonPrefsSet = mysql_query($query_buttonPrefsSet, $bizCon) or die(mysql_error());
$row_buttonPrefsSet = mysql_fetch_assoc($buttonPrefsSet);
$totalRows_buttonPrefsSet = mysql_num_rows($buttonPrefsSet);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<title>Bizzo Control Panel</title>
<link href="css/plan.css" rel="stylesheet" type="text/css"/>
<link rel="stylesheet" href="css/BizzocallPopup.css" type="text/css"/>
<link href="css/cpanel.css" rel="stylesheet" type="text/css"/>
<link href="css/BizzocallPopup.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="js/jquery-1.6.2.min.js"></script>
<script src="Draggable/development-bundle/ui/jquery.ui.core.js"></script>
<script src="Draggable/development-bundle/ui/jquery.ui.widget.js"></script>
<script src="Draggable/development-bundle/ui/jquery.ui.mouse.js"></script>
<script src="Draggable/development-bundle/ui/jquery.ui.draggable.js"></script>
<link type="text/css" href="css/jquery-ui-1.8.16.custom.css" rel="stylesheet" />
<script type="text/javascript" src="/js/jquery-ui-1.8.16.custom.min.js"></script>
<script type="text/javascript">
            $(function(){
                // Dialog           
                $('#labelStgdialog').dialog({
                    autoOpen: false,
                    width: 400,
                    buttons: {
                        "OK": function() { 

                            $(this).dialog("close"); 
                        } 
                    }
                });

                // Dialog Link
                $('#labelSetgbtn').click(function(){
                    $('#labelStgdialog').dialog('open');
                    return false;
                });

            });

            $('#enterlabel').change(function() {
             $("input#blabel").val($("input#enterlabel;").val());
});
        </script>
</head>
<body>
<div class="contentWrapper">
  <form action="cp-BizzoEmbedCodeSIMPLE.php" method="post" enctype="multipart/form-data" name="buttonprefform" target="_top">
    <div id="labelSetgbtn" class="button gray LabelSettings"><a href="#">LABEL SETTINGS</a></div>
    <div id="labelStgdialog" class="DialogBox">
      <div class="boldtxt">ENTER YOUR CUSTOM LABEL</div>
      <div class="labeltxtblack">CALL&nbsp;&nbsp;&nbsp;</div>
      <input name="enterlabel" type="text" id="enterlabel" class="enterlabel" value=" > 10 char "  maxlength="9" length="10"/>
      <div class="clearer"></div>
      <div class="space10"></div>
      <div class="bcpopuptop">
        <div class="bcsquare">
          <div class="innersquare"></div>
        </div>
        <div class="btnlabeltxt">CALL NOW</div>
      </div>
    </div>
    <input id="blabel" name="blabel" type="text" value="<?php echo strtoupper($row_buttonPrefsSet['blabel']); ?>" />
    <button name="mysubmitbutton" id="mysubmitbutton" type="submit" class="createbizzobutton"> </button>
  </form>
</div>
<!--END contentwrapper-->
</body>
</html>