|
||
<+? if(basename($_SERVER['PHP_SELF']) == 'sell.php') { ?> <+script language="Javascript" type="text/javascript" src="includes/calendar.js"> <+!-- ------------------------------------------------------------------------------------------------- -- htmlarea bug: fixed by CHARLES CRUME SOFTWARE: 07-19-05 ----------------------------------------- -- ------------------------------------------------------------------------------------------------- The following error: Problems with this Web page might prevent it from... blah, blah, blah... Line: 627 Char: 2 Error: 'offsetWidth' is null or not an object Code: 0 URL: http://www.charlescrumesoftware.com/auction/sell.php has, according to my source, plagued both the Web2035 and GPL auction software packages since the inception of the original GPL auction software. The error occurs because there is no TEXTAREA in "templates/template_sell_preview_php.html" nor in "templates/template_sell_result_php.html" for the following scripts to turn into an HTMLAREA. (There is a TEXTAREA defined in "templates/template_sell_php.html" and this is why the error DOES NOT occur when a new auction listing is begun.) As such, the inclusion of the following scripts into "sell.php" causes the error when "sell.php" is re-entered using the above mentioned templates (i.e., when the auction listing is previewed and when it is actually listed). The fix is to ONLY include the following scripts into "sell.php" when $_POST is empty (i.e., the first time "sell.php" is invoked). The line immediately below this comment block terminates the PHP code that includes "calendar.js" (which is always needed in "sell.php"). The line immediately below that includes the remaining scripts (the end of which is marked by double comment lines) into "sell.php" ONLY WHEN $_POST is empty. -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- I am a self-employed computer programmer and web site developer -- if you like this fix I would greatly appreciate a donation (my PayPal account is ccs@charlescrumesoftware.com), and... if you need some programming, web design, or custom changes to your auction software, etc., etc. please contact me... CHARLES CRUME SOFTWARE http://www.charlescrumesoftware.com P.O. Box 5054 Cincinnati, OH 45205 ccs@charlescrumesoftware.com -- htmlarea bug: fixed by CHARLES CRUME SOFTWARE: 07-19-05 ------------------------------------- --> <+? } ?> <+? if(basename($_SERVER['PHP_SELF']) == 'sell.php' && empty($_POST)) { ?> <+script type="text/javascript"> _editor_url = "./htmlarea/"; _editor_lang = "en"; <+script type="text/javascript" src="./htmlarea/htmlarea.js"> <+script type="text/javascript"> HTMLArea.loadPlugin("ContextMenu"); HTMLArea.loadPlugin("TableOperations"); HTMLArea.loadPlugin("CSS"); // Make editor a global variable var editor = new HTMLArea("description"); function initDescription() { var editor = new HTMLArea("description"); editor.registerPlugin(ContextMenu); editor.registerPlugin(TableOperations); editor.registerPlugin(CSS, { combos : [ { label: "Syntax:", // menu text // CSS class options: { "None" : "", "Code" : "code", "String" : "string", "Comment" : "comment", "Variable name" : "variable-name", "Type" : "type", "Reference" : "reference", "Preprocessor" : "preprocessor", "Keyword" : "keyword", "Function name" : "function-name", "Html tag" : "html-tag", "Html italic" : "html-helper-italic", "Warning" : "warning", "Html bold" : "html-helper-bold" }, context: "pre" }, { label: "Info:", options: { "None" : "", "Quote" : "quote", "Highlight" : "highlight", "Deprecated" : "deprecated" } } ] }); editor.generate(); } <+!-- htmlarea bug: fixed by CHARLES CRUME SOFTWARE: 07-19-05 --------------------------------- END --> <+!-- htmlarea bug: fixed by CHARLES CRUME SOFTWARE: 07-19-05 --------------------------------- END --> |
||