Updating page editor hooks for v4.9.3
From Sohowiki
(Difference between revisions)
(→The Easy Way To Update) |
(→The Easy Way To Update) |
||
Line 15: | Line 15: | ||
var dataTrue = dataData.search("pixel.gif"); | var dataTrue = dataData.search("pixel.gif"); | ||
− | disOne = | + | disOne = document.getElementById('scrollname').selectedIndex; |
− | tscrollval = eval(" | + | tscrollval = eval("document.getElementById('scrollname').options["+disOne+"].value"); |
− | tscrollname = eval(" | + | tscrollname = eval("document.getElementById('scrollname').options["+disOne+"].innerHTML"); |
tscrollname = tscrollname.toString(); | tscrollname = tscrollname.toString(); | ||
Line 37: | Line 37: | ||
document.getElementById(ColRowID).style.backgroundColor= "#FFFFFF"; | document.getElementById(ColRowID).style.backgroundColor= "#FFFFFF"; | ||
} | } | ||
− | + | document.getElementById('scrollname').selectedIndex = 0; // Reset Selection to Nothing(Null) | |
if ( window.checkPageAreas ){ | if ( window.checkPageAreas ){ |
Revision as of 12:10, 27 November 2007
The Easy Way To Update
Within your object javascript simply add the following to the end, that is, after you have placed your object into the cell.
if ( window.checkPageAreas ){ checkPageAreas('start'); }
Our scrolling newsbox OkScrollData() function now looks like this.
function OkScrollData() { doOperation = 0; var dataTrue = dataData.search("pixel.gif"); disOne = document.getElementById('scrollname').selectedIndex; tscrollval = eval("document.getElementById('scrollname').options["+disOne+"].value"); tscrollname = eval("document.getElementById('scrollname').options["+disOne+"].innerHTML"); tscrollname = tscrollname.toString(); TextHeader = "<img src=images/text_header.gif width=199 height=15 border=0 align=left vspace=0 hspace=0 style='cursor: move;'><BR CLEAR=ALL>"; TableStart = "<table border=0 cellpadding=2 cellspacing=0 style='border: 1px inset black; background: #EFEFEF;'><tr><td width=199 align=center valign=top>"; TableEnd = "</td></tr></table><!-- ~~~ -->"; if (dataTrue > 0) { sText = TableStart+TextHeader+"<font style='font-family: Arial; font-size: 8pt;'><U><font color=darkblue>Scroll Box : "+tscrollname+"</font></U></FONT><!-- ##SCROLLNEWS;"+tscrollval+"## -->"+TableEnd; doOperation = 1; } else { sText = dataData+"<BR>"+TableStart+TextHeader+"<font style='font-family: Arial; font-size: 8pt;'><U><font color=darkblue>Scroll Box : "+tscrollname+"</font></U></FONT><!-- ##SCROLLNEWS;"+tscrollval+"## -->"+TableEnd; doOperation = 1; } if (doOperation == 1) { document.getElementById(ColRowID).innerHTML= sText; document.getElementById(ColRowID).style.backgroundColor= "#FFFFFF"; } document.getElementById('scrollname').selectedIndex = 0; // Reset Selection to Nothing(Null) if ( window.checkPageAreas ){ checkPageAreas('start'); } }
And thats it :)
Final note
The new page_editor.php uses a XHTML 1.0 Strict doctype and may effect the look/feel of your properties layer.