...

View Full Version : jquery inner html update



mathceleb
08-06-2010, 01:16 PM
I have a form which toggles in to the screen which is not being updated: Any thoughts?


<div id='reportmain' style="position:relative;">
<div id="advancedsearch" class="ui-jqgrid ui-widget ui-corner-all"
style="margin:35px; padding:10px; position: absolute; left:0px;
top:75px; font-size:8pt; z-index:99;
background-color:#DDECF7; color:#0E539E; width:600px">
<table width="100%" cellpadding=0 cellspacing=0 border=0>
<tr>
<td align=left>
<div onmouseover='$("#advancedsearch").draggable("enable");' onmouseout='$("#advancedsearch").draggable("option","disabled",true)'
style='cursor:move; width:20px; height:20px;'>
<img src="images/move.png"/>
</div>
</td>

<td align="right">
<span class='ui-jqgrid ui-icon ui-icon-circle-close'
style="left:" onclick='toggleAdvancedSearch();'>
</span>
</td>
</tr>
</table>
<div style="padding:5px; height:300px; background-color:#DDECF7;
color:#0E539E; font-size:9pt;">
<form id="advancedsearchform">
<table class="ui-jqgrid ui-widget">

<tr>
<td align='center'>
<input type="button" style='border:1px solid #0E539E;
background-color:#FFF;' name='Apply' value='Apply Filter'
onclick='applyAdvSearch();'>&nbsp;&nbsp;&nbsp;&nbsp;
<b>All Demographics</b>&nbsp;
<sup>
<input name='all_check' type=checkbox
onclick="if(this.checked==true){
selectNoneorAllAdvSrch(null,'all');
}
else{
selectNoneorAllAdvSrch(null,'none');
}">
</sup>
</td>

</tr>
<tr>
<td>
<div style="overflow-y:auto; overflow-x:hidden; height:275px;
width:575px; border:1px solid #555;">
<table class="advsearch" id="advsearchbox">
</table><!-- table gender -->
</div>
</td>
</tr>
</table><!-- table adv_search_demo_outer-->

</form>
</div>
</div>


with this script: I've confirmed that colname is producing values.


htmlStr = "";
htmlArr = new Array();
colen=colname.length;


htmlStr = "<table width='150' border=0 cellspacing=0 cellpadding=3 ><tr><td align=left style='border-bottom:1px solid #999;'><b>"+demoName+"</b></td><td align=right style='border-bottom:1px solid #999;'><sup><input name='all_check' type=checkbox onclick='if(this.checked==true){selectNoneorAllAdvSrch(\""+demoName+"\",\"all\");}else{selectNoneorAllAdvSrch(\""+demoName+"\",\"none\");}'> all</sup></td></tr>\n";
for(i=0; i<colen; i++)
{
valueName = colname[i];
alert(colname[i]);
//if(String(colname[i]).match(/^\s*$/)){valueName='(empty)';}
checkboxvalue = String(colname[i]).replace(/'/g,"");
htmlStr += "<tr><td valign='center' align=right><input type='checkbox' name='"+demoName+"' value='"+checkboxvalue+"'></td><td valign='center' align=left>"+valueName+"</td></tr>\n";
} // end i loop
htmlStr += "</table>\n";
htmlArr.push(htmlStr);


$("#advsearchbox").html(htmlStr);

mathceleb
08-06-2010, 09:49 PM
Solved. I had .js errors before this piece and was not sending items correctly.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum