On 6. des. 2005, at 22.52, Bob Ippolito wrote:
This is the complete _javascript_ and HTML: function styledTable(styles, rows, id) { var styleIter = cycle(styles); var table_row = function(row) { return TR({'class': styleIter.next()},map(partial(TD,{'style':'text-align:left'}),row)); }; return TABLE({'class':'grid','id':id}, THEAD(null, TR(null, TD(null,'ID'),TD(null,'NAME'),TD(null,'ACTIVE'))), TFOOT(null, TR(null, TD())), TBODY(null, map(table_row, rows)) ); }; function requestSourceColl() { alert(document.getElementById('scoll').style.display); if (document.getElementById('scoll').style.display=="block"){ var d = loadJSONDoc("${std.url('/Edit/', pageid=pageid,view=view,tg_format='json')}"); d.addCallback(showSourceColl); } } function showSourceColl(result){ swapDOM("sourcecoll",styledTable(['odd','even'],result['sourcecoll'],'sourcecoll')) } <a href="" py:attrs="style='cursor:hand;'" >Source list</a> <div py:attrs="style='display:none;',id='scoll'"> <table class="grid" cellpadding="0" cellspacing="0"> <tr> <td colspan="2" style="text-align:center;background-color:#6FB8C6;"> Source </td> </tr> <tr> <td> <table id="sourcecoll" /> </td> <td> Source list </td> </tr> </table> </div> The soho("scoll") method is a basic set visibility script. My problem is that IE calls the loadJSONDoc in function requestSourceColl once and only once. It seems like it's cached somehow. The alert message in the function is displayed every time. I have set <META HTTP-EQUIV="Pragma" CONTENT="no-cache"/>, <META HTTP-EQUIV="Expires" CONTENT="-1"/> which according to microsoft.com should negate any form of caching. regards /rune --------------------------------------------------------------------- Behind the firewall, nobody can hear you scream... |
- [mochikit] Re: IE - swapDOM Rune Hansen
- [mochikit] Re: IE - swapDOM Bob Ippolito
- [mochikit] Re: IE - swapDOM Peter Hansen
- [mochikit] Re: IE - swapDOM Bob Ippolito
- [mochikit] GET vs POST in MochiKit.Async (... Peter Hansen
- [mochikit] Re: GET vs POST in MochiKi... Josu Oyanguren
- [mochikit] Re: GET vs POST in Moc... Bob Ippolito
- [mochikit] Re: GET vs POST in MochiKi... Bob Ippolito
- [mochikit] Re: GET vs POST in Moc... John Wehr
- [mochikit] Re: GET vs POST in Moc... Ian Bicking
- [mochikit] Re: GET vs POST in Moc... Jorge Godoy
