我遇到了jquery颜色选择器的问题。当我单击框以显示面板时,它会在firebug上显示错误消息:
TypeError:dhe.get(...)在javascript文件中未定义,名称为idrag.js
这是idrag.js的代码:
eval(function(p,a,c,k,e,d){e=function(c){return(c<a?"":e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[(function(e){return d[e]})];e=(function(){return'\\w+'});c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('8.a={m:W,7:W,2d:u(){n c.2A(u(){9(c.22){c.1c=W;8(c).21(\'2o\',8.a.29)}})},2r:u(e){9(8.a.7!=W){8.a.1y(e);n d}25 6=c.1c;8(19).1R(\'2x\',8.a.26).1R(\'2y\',8.a.1y);6.5.A=8.D.2P(e);6.5.S=6.5.A;6.5.1H=d;6.5.3o=c!=c.1c;8.a.7=6;9(6.5.10&&c!=c.1c){23=8.D.2a(6.1i);1N=8.D.1w(6);1O={x:q(8.z(6,\'I\'))||0,y:q(8.z(6,\'H\'))||0};g=6.5.S.x-23.x-1N.18/2-1O.x;j=6.5.S.y-23.y-1N.V/2-1O.y;8.1L.2Y(6,[g,j])}n d},29:u(e){6=8.a.7;6.5.1H=F;1z=6.E;6.5.1F=8.z(6,\'R\');6.5.1j=8.z(6,\'1r\');9(!6.5.2e)6.5.2e=6.5.1j;6.5.p={x:q(8.z(6,\'I\'))||0,y:q(8.z(6,\'H\'))||0};6.5.1o=0;6.5.1p=0;9(8.1l.1S){1X=8.D.1W(6,F);6.5.1o=1X.l||0;6.5.1p=1X.t||0}6.5.f=8.1G(8.D.2a(6),8.D.1w(6));9(6.5.1j!=\'2f\'&&6.5.1j!=\'2n\'){1z.1r=\'2f\'}8.a.m.2s();K=6.2Z(F);8(K).z({R:\'2g\',I:\'14\',H:\'14\'});K.E.2b=\'0\';K.E.2h=\'0\';K.E.2c=\'0\';K.E.2i=\'0\';8.a.m.1I(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==\'1s\'){6.5.s=8.1G({x:0,y:0},8.D.1w(6.1i));1g=8.D.1W(6.1i,F);6.5.s.w=6.5.s.18-1g.l-1g.r;6.5.s.h=6.5.s.V-1g.t-1g.b}L 9(6.5.k==\'19\'){20=8.D.37();6.5.s={x:0,y:0,w:20.w,h:20.h}}}L 9(6.5.k.J==2B){6.5.s={x:q(6.5.k[0])||0,y:q(6.5.k[1])||0,w:q(6.5.k[2])||0,h:q(6.5.k[3])||0}}6.5.s.g=6.5.s.x-6.5.f.x;6.5.s.j=6.5.s.y-6.5.f.y},1B:u(7){9(7.5.1b||7.5.k==\'1s\'){8(\'2j\',19).1I(8.a.m.U(0))}8.a.m.2s().3b().z(\'N\',1);9(1C.1D){8.a.m.z(\'2u\',\'2v(N=2w)\')}},1y:u(e){8(19).21(\'2x\',8.a.26).21(\'2y\',8.a.1y);9(8.a.7==W){n}7=8.a.7;8.a.7=W;9(7.5.1H==d){n d}9(7.5.1K==F){8(7).z(\'1r\',7.5.1j)}1z=7.E;9(7.10){8.a.m.z(\'2p\',\'2q\')}9(7.5.28==d){9(7.5.P>0){9(!7.5.B||7.5.B==\'1u\'){x=2M 8.P(7,7.5.P,\'I\');x.2z(7.5.p.x,7.5.1e)}9(!7.5.B||7.5.B==\'1A\'){y=2M 8.P(7,7.5.P,\'H\');y.2z(7.5.p.y,7.5.1f)}}L{9(!7.5.B||7.5.B==\'1u\')7.E.I=7.5.1e+\'M\';9(!7.5.B||7.5.B==\'1A\')7.E.H=7.5.1f+\'M\'}8.a.1B(7);9(7.5.16==d){8(7).z(\'R\',7.5.1F)}}L 9(7.5.P>0){7.5.1v=F;9(8.G&&8.G.2D&&8.1E){1a=8.D.2a(8.1E.m.U(0))}L{1a=d}8.a.m.3f({I:1a?1a.x:7.5.f.x,H:1a?1a.y:7.5.f.y},7.5.P,u(){7.5.1v=d;9(7.5.16==d){7.E.R=7.5.1F}8.a.1B(7)})}L{8.a.1B(7);9(7.5.16==d){8(7).z(\'R\',7.5.1F)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'<2k 34="2l"></2k>\');8.a.m=8(\'#2l\');1x=8.a.m.U(0);X=1x.E;X.1r=\'2n\';X.R=\'1m\';X.2p=\'2q\';X.38=\'1m\';X.3a=\'3c\';9(1C.1D){1x.2E=u(){n d};1x.2F=u(){n d}}L{X.3d=\'1m\';X.3e=\'1m\'}}9(!o){o={}}n c.2A(u(){9(c.22||!8.D)n;9(1C.1D){c.2E=u(){n d};c.2F=u(){n d}}25 1P=o.2N?8(c).3l(o.2N):8(c);c.5={28:o.28?F:d,16:o.16?F:d,1K:o.1K?o.1K:d,10:o.10?o.10:d,1b:o.1b?o.1b:d,11:o.11?q(o.11)||0:d,N:o.N?2W(o.N):d,P:q(o.P)||W,1M:o.1M?o.1M:d,Q:{},A:{},17:o.17&&o.17.J==1h?o.17:d,13:o.13&&o.13.J==1h?o.13:d,Y:o.Y&&o.Y.J==1h?o.Y:d,B:/1A|1u/.31(o.B)?o.B:d,1t:o.1t?q(o.1t)||0:0,v:o.v?o.v:d,1V:o.1V?F:d};9(o.Q&&o.Q.J==1h)c.5.Q.1Y=o.Q;9(o.k&&((o.k.J==2t&&(o.k==\'1s\'||o.k==\'19\'))||(o.k.J==2B&&o.k.2S==4))){c.5.k=o.k}9(o.24){c.5.24=o.24}9(o.T){9(3k o.T==\'3m\'){c.5.12=q(o.T)||1;c.5.1d=q(o.T)||1}L 9(o.T.2S==2){c.5.12=q(o.T[0])||1;c.5.1d=q(o.T[1])||1}}9(o.15&&o.15.J==1h){c.5.15=o.15}c.22=F;1P.U(0).1c=c;1P.1R(\'2o\',8.a.2r)})}};8.3g.1G({2X:8.a.2d,39:8.a.2L});',62,211,'|||||dragCfg|elm|dragged|jQuery|if|iDrag||this|false||oC|dx|||dy|containment||helper|return||oR|parseInt||cont||function|cursorAt||||css|pointer|axis|dhs|iUtil|style|true|iDrop|top|left|constructor|clonedEl|else|px|opacity|Math|fx|onDrag|display|currentPointer|grid|get|hb|null|els|onChange|newCoords|si|zIndex|gx|onStop|0px|onSlide|ghosting|onStart|wb|document|dh|insideParent|dragElem|gy|nRx|nRy|contBorders|Function|parentNode|oP|parentBorders|browser|none|apply|diffX|diffY|nx|position|parent|snapDistance|horizontally|prot|getSize|el|dragstop|dEs|vertically|hidehelper|window|ActiveXObject|iSort|oD|extend|init|append|ny|so|iSlider|hpc|sliderSize|sliderPos|dhe|right|bind|msie|width|height|autoSize|getBorder|oldBorder|user|count|clnt|unbind|isDraggable|parentPos|fractions|var|dragmove|bottom|revert|dragstart|getPosition|marginTop|marginBottom|destroy|initialPosition|relative|block|marginRight|marginLeft|body|div|dragHelper|getContainment|absolute|mousedown|cursor|move|draginit|empty|String|filter|alpha|100|mousemove|mouseup|custom|each|Array|opera|overzone|onselectstart|ondragstart|snapToGrid|abs|fitToContainer|min|max|build|new|handle|auto|getPointer|pow|distance|length|for|in|Object|parseFloat|DraggableDestroy|dragmoveBy|cloneNode|checkhover|test|offsetLeft|offsetTop|id|modifyContainer|highlight|getClient|listStyle|Draggable|overflow|hide|hidden|mozUserSelect|userSelect|animate|fn|checkdrop|check|lastSi|typeof|find|number|sqrt|fromHandler'.split('|'),0,{}))
颜色选择器页面的代码是:
<?php
$myData = mysql_query('SELECT * FROM ui_table order by settings_id');
?>
<table id="rounded-corner" style="width: 100%" summary="2007 Major IT Companies' Profit">
<thead>
<tr>
<th scope="col" class="rounded" align=center>name</th>
<th scope="col" class="rounded" align=center>value</th>
<th scope="col" class="rounded" align=center>update</th>
</tr>
</thead>
<tfoot>
<tr>
<td colspan="6" class="rounded-foot-left"><em>table</em></td>
<td class="rounded-foot-right"> </td>
</tr>
</tfoot>
<?php while($row = mysql_fetch_array($myData, MYSQL_ASSOC)){?>
<tbody>
<?php echo '<tr id="row_'.$row['settings_id'].'">';
echo '<td align=center><input type="text" name="settings_key" id="settings_key_'.$row['settings_id'].'" style="text-align: center" value="' . $row['settings_key'] . '" size=30/></td>';
echo '<td align=center><input type="text" readonly=readonly id="settings_value_'.$row['settings_id'].'" style="text-align: center" value="' . $row['settings_value'] . '" size=30/>';
if (($row['settings_key'] == 'background-color') || ($row['settings_key'] == 'color')) {
echo '<a href="javascript:void(0);" rel="colorpicker&objcode=settings_value_'.$row['settings_id'].'&objshow=myshowcolor_'.$row['settings_id'].'&showrgb=1" style="text-decoration:none;" ><div id="myshowcolor_'.$row['settings_id'].'" style="width:15px;height:15px;border:1px solid black;"> </div></a></div></td>';}
echo '<td align=center><a href="#" onclick="ajaxFunction_ui('.$row['settings_id'].', this.id)" id="update"><img src="includes/images/user_edit.png" alt="" title="" border="0" /></a></td>';
echo "</tr>";
}
echo "<tr>";
echo '<td align="center"></td>';
echo '<td align="center"><input type="text" name="settings_key_new" id="settings_key_new" style="text-align: center" size="30" value="" /></td>';
echo '<td align="center"><input type="text" name="settings_value_new" id="settings_value_new" style="text-align: center" value="" size="30"/></td>';
echo '<td><input type="button" id="addnew" name="addnew" onclick="addNewRecord_ui()" value="add!!" /></td>';
echo '<td></td>';
echo '</tr>';
?>
</tbody>
<script language="Javascript" type="text/javascript">
//init colorpicker
$(document).ready(
function()
{
$.ColorPicker.init();
}
);
</script>
</table>
头部位于index.php的页面。如果head与上面的代码在同一页面中,一切正常。
index.php中的头部代码是:
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>admin panel</title>
<link rel="stylesheet" type="text/css" href="includes/admin_style.css" />
<link rel="stylesheet" type="text/css" media="all" href="includes/niceforms-default.css" />
<script language="javascript" type="text/javascript" src="includes/niceforms.js"></script>
<script type="text/javascript" src="includes/jquery.min.js"></script>
<script src="js_color_picker/jquery/jquery.js" type="text/javascript"></script>
<script src="js_color_picker/jquery/ifx.js" type="text/javascript"></script>
<script src="js_color_picker/jquery/idrop.js" type="text/javascript"></script>
<script src="js_color_picker/jquery/idrag.js" type="text/javascript"></script>
<script src="js_color_picker/jquery/iutil.js" type="text/javascript"></script>
<script src="js_color_picker/jquery/islider.js" type="text/javascript"></script>
<script src="js_color_picker/jquery/color_picker/color_picker.js" type="text/javascript"></script>
<link href="js_color_picker/jquery/color_picker/color_picker.css" rel="stylesheet" type="text/css">
<script src="jquery.jclock-1.2.0.js.txt" type="text/javascript"></script>
<script type="text/javascript" src="includes/jconfirmaction.jquery.js"></script>