on a list page with inline edit i have used the following to hide/ display 3 of the columns so it opens in edit mode, save all saves the values and switches 3 of the data columns
this works fine in chrome browser but the save function doesnt in firefox and internet explorer v8 doesnt reliably save and seems to need another click with the mouse in an open area to finish loading
- any ideas on firefox/ie compatibility appreciated
- ideas to save and redirect without modifying php runner source also appreciated
- Ive published the code as others with similar problem may find it useful and not get as frustrated as i am!
- top of page:--
<script>
function toggle(thisname) {
document.getElementById('saveall_edited1').click()
td=document.getElementsByTagName('div')
for (i=0;i<td.length;i++){
if (td[i].getAttribute(thisname)){
if ( td[i].style.display=='none' ){
td[i].style.display = '';
}
else {
td[i].style.display = 'none';
}
}
}
}
</SCRIPT>
- bottom of page
{BEGIN record_controls}<SPAN id="record_controls{$id}"><SPAN
class=buttonborder>
<DIV name1="toggle"><INPUT class=button onclick="toggle('name1');" value="Save and View Results" type=button></DIV></SPAN><SPAN
class=buttonborder>
<DIV style="DISPLAY: none" name1="toggle"><INPUT class=button onclick=window.location.reload() value="Re-edit Entered Results" type=button></DIV></SPAN><SPAN><INPUT
style="DISPLAY: none" id=saveall_edited1 type=hidden name=saveall_edited1><IMG
alt=bullet src="images/icon_required.gif"> - Required fields</SPAN>
</SPAN>{END record_controls}
3) columns as required:-
<TH style="BACKGROUND-COLOR: #535484; WIDTH: 111px; WHITE-SPACE: nowrap" class=headerlist align=middle>
<DIV name1="toggle">{BEGIN Load_Time_fieldheader}<A class=tablelinks
name1="toggle" {$Load_Time_orderlinkattrs}><FONT color=#ffffff>Load
Time</FONT></A>{END Load_Time_fieldheader}</DIV>
<DIV style="DISPLAY: none" name1="toggle"><A class=tablelinks
{$Progress_orderlinkattrs}><FONT color=#ffffff>Status</FONT></A> </DIV></TH>
<TD style="BORDER-BOTTOM: black 1px solid; BACKGROUND-COLOR: #ffffff; WIDTH: 111px; WHITE-SPACE: nowrap" vAlign=middle>
<DIV style="TEXT-ALIGN: center" name1="toggle"> {$Load_Time_value} sec</DIV>
<DIV style="TEXT-ALIGN: center; DISPLAY: none" name1="toggle"> {$Progress_value} </DIV></TD>