473,466 Members | 1,395 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

JavaScript code works in IE but not in firefox

19 New Member
Expand|Select|Wrap|Line Numbers
  1. function storePosition () {
  2.  
  3.  
  4.  
  5.       if(g_state.aName == 'TABLE' || g_state.aName == 'IMG')
  6.         return;
  7.  
  8.     var sel = this.selection;
  9.     if (!sel) {
  10.         if(!is_browserName_IE)
  11.         {
  12.             sel = document.getElementById("myEditor").contentDocument.getSelection();
  13.             rng=sel;
  14.         }
  15.         else
  16.         {
  17.             sel = document.frames["myEditor"].document.selection;
  18.             rng = sel.createRange();
  19.         }
  20.     }
  21.  
  22.  
  23.  
  24.     if (!rng) {
  25.         return;
  26.     }
  27.  
  28.     if (caretPos) {
  29.         prevPos = caretPos;    
  30.     }
  31.  
  32.     // Special case when the selection is a div:
  33.     if(rng.length) {
  34.         // This is a controlRange
  35.          var oElm = rng(0);
  36.          g_state.clickedElement = oElm;
  37.      }
  38.      else {
  39.         caretPos = rng.duplicate();    
  40.          g_state.clickedElement = caretPos.parentElement();
  41.  
  42.      }
  43.     return;    
  44.  
Jun 3 '10 #1
34 3312
Dormilich
8,658 Recognized Expert Moderator Expert
are there any messages in the Error Console?
Jun 3 '10 #2
tweetz
19 New Member
@Dormilich
yeah...it just came "rng is not a function" in error console.Plz help me
Jun 3 '10 #3
Dormilich
8,658 Recognized Expert Moderator Expert
line #35: you call rng() as a function, but it’s a Selection object. maybe you mean rng[0]?
Jun 3 '10 #4
tweetz
19 New Member
@Dormilich
yeah the error is showing @line 35( var oElm = rng(0);)and error msg is rng is not a function
Jun 3 '10 #5
Dormilich
8,658 Recognized Expert Moderator Expert
did you apply the fix?
Jun 3 '10 #6
tweetz
19 New Member
@Dormilich
Nop...Just struggling with this.I am new to this.So I hav no idea.Also I am gettin 1 more error in another js file.I have to fix these two errors..Please help me fixing this.Tomorrow is a deadline
Jun 3 '10 #7
Dormilich
8,658 Recognized Expert Moderator Expert
maybe you mean rng[0]?
this fix!
Jun 3 '10 #8
tweetz
19 New Member
@Dormilich
ok..thanks a lot..also I hav 1 more error @ the first line and the error msg is text is undefined.Please help me in this too


if(text.indexOf("<TABLE") >=0 || text.indexOf("<table") >=0)
return 'table';
Jun 3 '10 #9
Dormilich
8,658 Recognized Expert Moderator Expert
well, it’s just as the message says, the text variable is neither a string literal, nor object. thus you can’t apply the methods to it.
Jun 3 '10 #10
tweetz
19 New Member
@Dormilich
what else can I do? Can't fix this?plz provide me a solution
Jun 3 '10 #11
Dormilich
8,658 Recognized Expert Moderator Expert
provide me with a code first ;)
Jun 3 '10 #12
tweetz
19 New Member
@Dormilich
this is the function.If u want me to send the entire code den I will send it..Thanks



Expand|Select|Wrap|Line Numbers
  1. function hasTagsInText(text)
  2. {
  3.  
  4.     if(text.indexOf("<TABLE") >=0 || text.indexOf("<table") >=0)
  5.         return 'table';
  6.  
  7.     if(text.indexOf("<TD") >=0 || text.indexOf("<td") >=0)
  8.         return 'column';    
  9.  
  10.     if(text.indexOf("<IMG") >=0 || text.indexOf("<img") >=0)
  11.         return 'image';
  12.  
  13.     if(text.indexOf("<H2") >=0 || text.indexOf("<h2") >=0)
  14.         return 'h2';
  15.  
  16.     if(text.indexOf("<DIV") >=0 || text.indexOf("<div") >=0)
  17.         return 'div';
  18.  
  19.     if(text.indexOf("<A") >=0 || text.indexOf("<a") >=0)
  20.         return 'link';   
  21.  
  22.     if(text.indexOf("<FORM") >=0 || text.indexOf("<form") >=0)
  23.         return 'form';
  24.  
  25.     if(text.indexOf("<P>") >=0 || text.indexOf("<p>") >=0)
  26.         return 'invisible paragraph-mark';
  27.  
  28.     if(text.indexOf("<BR>") >=0 || text.indexOf("<br>") >=0)
  29.         return 'invisible new-line-mark';
  30.  
  31.     return '';
  32. }
Jun 3 '10 #13
Dormilich
8,658 Recognized Expert Moderator Expert
how do you call the function?
Jun 3 '10 #14
tweetz
19 New Member
@Dormilich
In Java I dont hav much idea..In C/C++ we do call function by name or referrence
Jun 3 '10 #15
Dormilich
8,658 Recognized Expert Moderator Expert
this is neither Java nor C/C++, it’s JavaScript (subtle but important difference).

to apply logic, somewhere in your HTML you call that function, otherwise it wouldn’t be executed (and as far as I see it doesn’t have a parse error). I need to know that part.

you could also provide a page, it would make it a bit easier for me.
Jun 3 '10 #16
tweetz
19 New Member
@Dormilich
thank you so much ..I applied that fix(rng[0]) and it worked..
Jun 3 '10 #17
Dormilich
8,658 Recognized Expert Moderator Expert
that fix was obvious (for the expert).
Jun 3 '10 #18
tweetz
19 New Member
@Dormilich
I am new to this.So I am unaware of that.anyways thanks a lot.Can u help me in another error?

Expand|Select|Wrap|Line Numbers
  1. var is_browserName_IE = navigator.appName == "Microsoft Internet Explorer"? true : false;
  2. function editView_init(){
  3.  
  4.  
  5.     g_state = new _CState();
  6.     fixSizeTB();
  7.     if(!is_browserName_IE)
  8.         st = document.getElementById("myEditor").contentDocument;
  9.     else
  10.         st = frames.myEditor.document;
  11.     if (typeof testing == 'undefined') {
  12.         finalURL = "webcomposer/editor";
  13.     }
  14.     else {
  15.         if (testing) { // build testing url
  16.             finalURL = testURL;
  17.         }
  18.         else { // build production url
  19.             finalURL = prodURL;
  20.         }
  21.  
  22.     }
  23.  
  24.     if (isW3Mode) {
  25.         var strMethodName = "common.js::init()";
  26.         debugMsg(strMethodName);
  27.         if (typeof(window['template']) == "undefined") {
  28.             template = "";
  29.         }
  30.         if (template != null && template == 'w3_innovation') 
  31.             loadEditorCss("http://v25http104.mkm.can.ibm.com/innovation/wctCss/style.css");
  32.  
  33.         var ooDiaWin = document.createElement("DIV");
  34.         ooDiaWin.id = "diaWin";
  35.         ooDiaWin.className = "diaWinstyle";
  36.         document.body.appendChild(ooDiaWin);
  37.         checkLocation();
  38.  
  39.  
  40.  
  41.         if(!is_browserName_IE)
  42.         {
  43.  
  44.             addCSS(finalURL + "/css/screen.css");
  45.             addCSS(finalURL + "/css/interior.css");
  46.             addCSS(finalURL + "/css/icons.css");
  47.             addCSS(finalURL + "/css/tables.css");
  48.  
  49.         }
  50.         else
  51.         {
  52.             styleSheet = st.createStyleSheet();
  53.             styleSheet.addImport(finalURL + "/css/screen.css");
  54.             styleSheet.addImport(finalURL + "/css/interior.css");
  55.             styleSheet.addImport(finalURL + "/css/icons.css");
  56.             styleSheet.addImport(finalURL + "/css/tables.css");
  57.         }
  58.  
  59.         var oNode = st.createElement("div");
  60.         oNode.id = "content";
  61.  
  62.         if(!is_browserName_IE)
  63.         {
  64.             st.body.insertBefore(oNode,null);
  65.         }
  66.         else
  67.         {
  68.             st.body.insertBefore(oNode);
  69.         st.execCommand("2D-Position", true, true);
  70.         st.execCommand("MultipleSelection", true, true);
  71.         st.execCommand("LiveResize", true, true);
  72.         }
  73.         if(!is_browserName_IE)
  74.             var body = document.getElementById("myEditor").contentDocument.body;
  75.         else
  76.             var body = document.frames.myEditor.document.body;
  77.         body.className = "article";
  78.  
  79.         st = st.getElementById("content");
  80.         st.contentEditable = "True";
  81.         for (i = 0; i < document.all.length; i++) 
  82.             document.all(i).unselectable = "on";
  83.         OCode.unselectable = "off";
  84.  
  85.         // st.innerHTML=stdata;
  86.         st.innerHTML = stdata_v8;// + endOfLayout;
  87.         // remove terms of use.
  88.         removeTerms();
  89.         // set the attributes of this layout
  90.         setLayout(st);
  91.         // storePosition();
  92.  
  93.         if(!is_browserName_IE){
  94.  
  95.  
  96.             var ele=document.getElementById("myEditor").contentDocument.createRange();
  97.             //alert("selection--"+ele);
  98.             caretPos=ele;
  99.             //alert(caretPos);
  100.             prevPos=document.getElementById("myEditor").contentDocument.createRange();
  101.             //prevPos = document.getElementById("myEditor").contentDocument.getSelection();
  102.         }
  103.         else{
  104.             caretPos = document.frames["myEditor"].document.body.createTextRange();
  105.             prevPos = document.frames["myEditor"].document.body.createTextRange();
  106.         }
  107.         insertCaretPlaceholder();
  108.         if(!is_browserName_IE)
  109.             st = document.getElementById("myEditor").contentDocument.body;
  110.         else
  111.             st = document.frames.myEditor.document.body;
  112.  
  113.         setRange();
  114.         if(is_browserName_IE)
  115.         oRange.execCommand("Unselect", true, true);
  116.         if(!is_browserName_IE)
  117.             st = document.getElementById("myEditor").contentDocument.getElementById("content");
  118.         else
  119.             st = frames.myEditor.document.getElementById("content");
  120.  
  121.         debugMsg("PreProcessing");
  122.         if(!is_browserName_IE)
  123.             var oElemContentHead = document.getElementById("myEditor").contentDocument.getElementById("content-head");
  124.         else
  125.             var oElemContentHead = frames.myEditor.document.getElementById("content-head");
  126.  
  127.         if ((oElemContentHead != null) && (oElemContentHead.children.length > 0)) {
  128.             debugMsg(strMethodName + ":oElemContentHead != null and children > 0 ");
  129.             debugDumpChildrenList(oElemContentHead);
  130.  
  131.             AddAttributeLanguageToggle(oElemContentHead.firstChild);
  132.  
  133.             cleanupPlugin(oElemContentHead);
  134.  
  135.         }
  136.         else {
  137.  
  138.             debugMsg(strMethodName + "oElemContentHead is null or null or there are no children elem");
  139.  
  140.         }
  141.     }
  142.     else {
  143.         var ooDiaWin = document.createElement("DIV");
  144.         ooDiaWin.id = "diaWin";
  145.         ooDiaWin.className = "diaWinstyle";
  146.         document.body.appendChild(ooDiaWin);
  147.         st.createStyleSheet(finalURL + "/css/v16/all.css");
  148.         st.createStyleSheet(finalURL + "/css/v16/screen.css");
  149.         st.createStyleSheet(finalURL + "/css/v16/screen-uas.css");
  150.         st.createStyleSheet(finalURL + "/css/v16/handheld.css");
  151.         st.createStyleSheet(finalURL + "/css/v16/print.css");
  152.         st.createStyleSheet(finalURL + "/css/v16/screen-fonts.css");
  153.  
  154.         var oNode = st.createElement("div");
  155.         oNode.id = "Oedit";
  156.         st.body.insertBefore(oNode);
  157.         st.execCommand("2D-Position", true, true);
  158.         st.execCommand("MultipleSelection", true, true);
  159.         st.execCommand("LiveResize", true, true);
  160.         st = st.getElementById("Oedit");
  161.         st.contentEditable = "True";
  162.         for (i = 0; i < document.all.length; i++) 
  163.             document.all(i).unselectable = "on";
  164.         OCode.unselectable = "off";
  165.         st.innerHTML = stdata;
  166.         if(!is_browserName_IE)
  167.             st = document.getElementById("myEditor").contentDocument.body;
  168.         else
  169.             st = document.frames.myEditor.document.body;
  170.         setRange();
  171.         oRange.execCommand("Unselect", true, true);
  172.  
  173.         if(!is_browserName_IE){
  174.             caretPos = document.getElementById("myEditor").contentDocument.createTextRange();
  175.             prevPos = document.getElementById("myEditor").contentDocument.createTextRange();
  176.         }
  177.         else{
  178.             caretPos = document.frames["myEditor"].document.body.createTextRange();
  179.             prevPos = document.frames["myEditor"].document.body.createTextRange();
  180.         }
  181.         insertCaretPlaceholder();
  182.  
  183.         st = frames.myEditor.document.getElementById("Oedit");
  184.     }
  185.  
  186.     // event handlers
  187.     st.ondblclick = _Editor_DblClickHandler
  188.     st.onpaste = _Editor_PasteHandler
  189.     st.onmousedown = _Editor_ClickHandler
  190.     st.onmouseup = _Editor_MouseUpHandler
  191.     st.onkeydown = _Editor_KeyDownHandler
  192.     st.onkeyup = _Editor_KeyUpHandler
  193.     st.ondragstart = _Editor_DragStartHandler
  194.     st.ondrop = _Editor_DropHandler
  195.     st.oncontextmenu = _Editor_OnContextMenuHandler
  196.     st.ondeactivate = _Editor_OnDeactiveHandler
  197.     st.onbeforedeactivate = _Editor_OnBlurHandler
  198.     st.onselectstart = _Editor_OnSelectStartHandler
  199.     st.oncopy = _Editor_OnCopyHandler
  200.     st.oncut = _Editor_OnCutHandler
  201.     st.onclick = _StorePosition;
  202.     st.onselect = _StorePosition;
  203.     st.oncontrolselect = _ControlSelectHandler;
  204.  
  205.     params[0] = finalURL;
  206.     params[1] = isW3Mode;
  207.  
  208.     // @REDOUNDO
  209.     // Initializes the Redo/Undo feature:
  210.     initUndoRedo();
  211.  
  212.     //START: Fix for SIS site include page
  213.     var content = st.innerHTML;
  214.     if (content.match(/&lt;%=\w+%&gt;/gi)) {
  215.         content = content.replace(/<\s*div\s*id=ibm-pcon\s*>/i, "");
  216.         content = content.replace(/<\s*div\s*id=ibm-content\s*>/i, "");
  217.         content = content.replace(/<\/div>$/i, "");
  218.         content = content.replace(/<\/div>$/i, "");
  219.         st.innerHTML = content;
  220.     }
  221.     //END: Fix for SIS site include pages
  222.  
  223.  
  224. } // end function
  225.  
  226.  
  227.  
  228.  
  229. function init_loader() {
  230.       window.onbeforeunload=beforeUnload;
  231.         if(isW3Mode){
  232.             document.getElementById("www_content_editor").parentElement.removeChild(document.getElementById("www_content_editor"));
  233.             document.getElementById("w3_content_editor").style.display="block";
  234.             stdata_v8=CELayout.innerHTML;
  235.             stdata="";
  236.             init();
  237.             checkLocation();
  238.             lib_bwcheck();
  239.         }else{
  240.             document.getElementById("w3_content_editor").parentElement.removeChild(document.getElementById("w3_content_editor"));
  241.             document.getElementById("www_content_editor").style.display="block";
  242.             stdata=CELayout.innerHTML;
  243.             stdata_v8="";
  244.             init();
  245.         }
  246. }
  247.  
  248. function init_text_list() {
  249.         if(isW3Mode){
  250.             document.getElementById("www_text_list").parentElement.removeChild(document.getElementById("www_text_list"));
  251.             document.getElementById("w3_text_list").style.display="block";
  252.             document.body.className = elements[3];
  253.             resizeMe("240px", "440px");
  254.         }else{
  255.             document.getElementById("w3_text_list").parentElement.removeChild(document.getElementById("w3_text_list"));
  256.             document.getElementById("www_text_list").style.display="block";
  257.             resizeMe("327px", "265px");
  258.             resizeBody(320);
  259.         }  
  260. }
  261.  
  262. function init_image_data() {
  263.   if(isW3Mode){
  264.         document.getElementById("www_image_data").parentElement.removeChild(document.getElementById("www_image_data"));
  265.         document.getElementById("w3_image_data").style.display="block";
  266.     resizeMe("600px", "400px");
  267.     }else{
  268.         document.getElementById("w3_image_data").parentElement.removeChild(document.getElementById("w3_image_data"));
  269.         document.getElementById("www_image_data").style.display="block";
  270.     }
  271. }
  272.  
  273. function init_link_data() {
  274.   if(isW3Mode){
  275.         var mainbody = document.getElementsByTagName("body")[0];
  276.         mainbody.innerHTML = w3Content;
  277.     document.body.className = elements[1];
  278.         resizeMe("550px", "400px");
  279.     }else{
  280.         var mainbody = document.getElementsByTagName("body")[0];
  281.         mainbody.innerHTML = wwwContent;
  282.     resizeMe("375px", "510px");
  283.     }  
  284.  
  285. }
  286.  
  287. function init_edit_link_data() {
  288.   if(isW3Mode){
  289.             var mainDiv = document.getElementById("mainDiv");
  290.             link = getLink();
  291.             var formStr = '<table border="1" cellspacing="0">\n' + '<tr><td colspan="4" id="message"></td></tr>\n';
  292.             formStr += generateLabelField() + '\n';
  293.             formStr += generateURLField() + '\n';
  294.             formStr += '</table>\n';
  295.             mainDiv.innerHTML = formStr;
  296.  
  297.             if (isBookmarkLink()){
  298.                document.getElementById('name').value = link.name;
  299.             }
  300.             else {
  301.                 document.getElementById('url').value = link.href;
  302.                 var text = "";
  303.  
  304.                 if(link.getElementsByTagName("B")[0] != undefined)
  305.                     text = link.getElementsByTagName("B")[0].getAdjacentText("afterBegin");
  306.                 else if (link.getElementsByTagName("SPAN")[0] != undefined)
  307.                     text = link.getElementsByTagName("SPAN")[0].getAdjacentText("afterBegin");
  308.                 else
  309.                     text = link.getAdjacentText("afterBegin");
  310.  
  311.                 document.getElementById('label').value = text;
  312.             }
  313.     }else{
  314.             var mainDiv = document.getElementById("mainDiv");
  315.             link = getLink();
  316.             parentType = link.parentNode.nodeName;
  317.             divBox = link.parentNode.parentNode.parentNode.className;
  318.             divBoxContent = link.parentNode.parentNode.parentNode.innerHTML;             
  319.             className = link.className;
  320.             var formStr = '<table border="1" cellspacing="0">\n' + '<tr><td colspan="4" id="message"></td></tr>\n';
  321.             formStr += generateLabelField() + '\n';
  322.             formStr += generateURLField() + '\n';
  323.  
  324.             if (className.length > 0 && className != "ibm-feature-link" ){
  325.                 // get the selected Icon index
  326.                 for (i=0; i < icons.length; i++){
  327.                     if (icons[i] == className){
  328.                         selectedIcon = i;
  329.                     }
  330.                 }
  331.  
  332.                 formStr += generateIconOptions() + '\n';            
  333.             }        
  334.  
  335.             formStr += '</table>\n';
  336.             mainDiv.innerHTML = formStr;
  337.  
  338.             if (isBookmarkLink()){
  339.                document.getElementById('name').value = link.name;
  340.             }
  341.             else {
  342.                 document.getElementById('url').value = link.href;
  343.                 var text = "";
  344.  
  345.                 if(link.getElementsByTagName("B")[0] != undefined)
  346.                     text = link.getElementsByTagName("B")[0].getAdjacentText("afterBegin");
  347.                 else if (link.getElementsByTagName("SPAN")[0] != undefined)
  348.                     text = link.getElementsByTagName("SPAN")[0].getAdjacentText("afterBegin");
  349.                 else
  350.                     text = link.getAdjacentText("afterBegin");
  351.  
  352.           if(divBox != null && (divBox=="ibm-container-body" )){
  353.             text = link.innerHTML;                    
  354.                     text1 = text.split("<BR>");
  355.                     var text2="";
  356.                     for(var i = 0; i < text1.length; i++){
  357.               text2 = text2 + text1[i];
  358.             }            
  359.             text = text2;        
  360.           }    
  361.                   document.getElementById('label').value = text;
  362.             }
  363.     }  
  364.  
  365. }
  366.  
  367. function init_table_data() {
  368.  
  369.   if (isW3Mode) 
  370.  {
  371.       //alert("in ifff");
  372.     if (!is_browserName_IE) 
  373.           document.getElementById("www_table_data").parentNode.removeChild(document.getElementById("www_table_data"));
  374.       else 
  375.           document.getElementById("www_table_data").parentElement.removeChild(document.getElementById("www_table_data"));
  376.           document.getElementById("w3_table_data").style.display = "block";
  377.           //alert(tableInfo[0]);
  378.     if (!is_browserName_IE){}
  379.          //location=location;
  380.     else
  381.         location = tableInfo[0];
  382.     //alert(location);
  383.     //alert(tableInfo[1]);
  384.       document.body.className = tableInfo[1];
  385.     //alert(document.body.className);
  386.       resizeMe("500px", "600px");
  387.     //alert("in if");
  388.  }
  389.  else {
  390.  
  391.       alert("hi in else");
  392.       if (!is_browserName_IE) 
  393.           document.getElementById("w3_table_data").parentNode.removeChild(document.getElementById("w3_table_data"));
  394.       else 
  395.           document.getElementById("w3_table_data").parentElement.removeChild(document.getElementById("w3_table_data"));
  396.       document.getElementById("www_table_data").style.display = "block";
  397.       resizeMe("550px", "550px");
  398.       // debugMsg(PACKAGE_NAME + "init()\n\tm_param_columnwidth="+
  399.             // m_param_columnwidth);
  400.             var strDisplayHTMLTable = null;
  401.             var regExp = null;
  402.  
  403.             for (i = 0; i < dataTableNames.length; i++) {
  404.                 regExp = / @@TABLE_WIDTH@@ /g;
  405.                 strDisplayHTMLTable = dataTableCodes[i].replace(regExp, DISPLAY_WIDTH);
  406.                 regExp = / @@HEADER@@ /g;
  407.                 strDisplayHTMLTable = strDisplayHTMLTable.replace(regExp, REPLACE_STRING_DISPLA_HEADER);
  408.                 regExp = / @@DATA@@ /g;
  409.                 strDisplayHTMLTable = strDisplayHTMLTable.replace(regExp, REPLACE_STRING_DISPLA_DATA);
  410.  
  411.                 if (i == 0) {
  412.                     regExp = / @@TABLE_HEADER@@ /g;
  413.                     strDisplayHTMLTable = strDisplayHTMLTable.replace(regExp, REPLACE_STRING_DISPLA_TABLE_CAPTION_DATA);
  414.                 }
  415.                 else 
  416.                     if (i == 1) {
  417.                         regExp = / @@TABLE_HEADER@@ /g;
  418.                         strDisplayHTMLTable = strDisplayHTMLTable.replace(regExp, REPLACE_STRING_DISPLA_TABLE_CAPTION_COMPLEX);
  419.                     }
  420.                     else {
  421.                         alert(PACKAGE_NAME + "init()\n\t" + ERR_1745);
  422.                     } // end if
  423.                 debugMsg(strDisplayHTMLTable);
  424.  
  425.                 if (strDisplayHTMLTable != null) {
  426.                     row = textList.insertRow()
  427.                     td = row.insertCell()
  428.                     td.insertAdjacentHTML("afterBegin", "<br /><a onclick=\"selectText(\'" + i + "\');\">" + strDisplayHTMLTable + "</a><br />");
  429.                 }
  430.                 strDisplayHTMLTable = null;
  431.                 regExp = null;
  432.             } // end for
  433.             resizeBody(530);
  434.         }
  435.  
  436. }
  437.  
  438. function init_component_data() {
  439.   if(isW3Mode){
  440.         var mainbody = document.getElementsByTagName("body")[0];
  441.         mainbody.innerHTML = w3Content;    
  442.     location = para[0];
  443.         document.body.className = para[1];
  444.         // show breadcrumbs only when the cursor is at content-head
  445.         if(location=="content-head"){
  446.             // show Page Tabs and Page Toggles
  447.             var oOption1=document.createElement("OPTION");
  448.             oOption1.value=3;
  449.             oOption1.innerHTML='&nbsp\;Page Level Tabs&nbsp\;';
  450.             document.text.type.appendChild(oOption1);
  451.             var oOption2=document.createElement("OPTION");
  452.             oOption2.value=5;
  453.             oOption2.innerHTML='&nbsp\;Page Toggles&nbsp\;';
  454.             document.text.type.appendChild(oOption2);
  455.             // show breadcrumbs
  456.             var oOption=document.createElement("OPTION");
  457.             oOption.value=4;
  458.             oOption.innerHTML='&nbsp\;Breadcrumbs&nbsp\;';
  459.             document.text.type.appendChild(oOption);
  460.         }
  461.  
  462.         if(location=="content-main") {
  463.             // show Page Tabs and Page Toggles
  464.             var oOption1=document.createElement("OPTION");
  465.             oOption1.value=3;
  466.             oOption1.innerHTML='&nbsp\;Page Level Tabs&nbsp\;';
  467.             document.text.type.appendChild(oOption1);
  468.             var oOption2=document.createElement("OPTION");
  469.             oOption2.value=5;
  470.             oOption2.innerHTML='&nbsp\;Page Toggles&nbsp\;';
  471.             document.text.type.appendChild(oOption2);
  472.         }
  473.         document.text.type.focus();
  474.         document.text.type.selectedIndex = 0;
  475.     generateText();
  476.  
  477.     }else{
  478.       // alert("www mode from rules engine");
  479.       // alert("going to resize");
  480.       resizeMe("570px", "700px");
  481.         var mainbody = document.getElementsByTagName("body")[0];
  482.         mainbody.innerHTML = wwwContent;
  483.         /*
  484.          * var div = document.createElement('div'); div.id =
  485.          * "www_component_data"; div.innerHTML = www; mainbody.appendChild(div);
  486.          */
  487.  
  488.  
  489.         if(displayMode == "content" || displayMode == "ibm-content-main"){
  490.             document.getElementById("main_column_components").style.display = "";
  491.         }else if(displayMode == "ibm-content-sidebar"){
  492.             document.getElementById("sidebar_components").style.display = "";
  493.         }else if(displayMode == "content-3-1" || displayMode == "content-3-2"){
  494.             document.getElementById("content3_components").style.display = ""
  495.         }else if(displayMode == "content-4-1" || displayMode == "content-4-2" || displayMode == "content-4-3"){
  496.             document.getElementById("content4_components").style.display = ""
  497.         }else if(displayMode == "ibm-content-head"){
  498.             document.getElementById("ibm-content-head").style.display = ""
  499.         }
  500.         else{// must be popup layout
  501.             document.getElementById("miscellaneous_components").style.display = "";
  502.         }
  503.  
  504.         window.focus();    
  505.     resizeBody(545);
  506.     initDropDown();
  507.     } 
  508. }
  509.  
  510. function init_plugin_data() {
  511.   if(isW3Mode){
  512.         document.getElementById("www_plugin_data").parentElement.removeChild(document.getElementById("www_plugin_data"));
  513.         document.getElementById("w3_plugin_data").style.display="block";
  514.         resizeMe("650px", "400px");
  515.         // displayCustomizedComponents();
  516.         generateMainPluginTable();
  517.         // displayCustomComponents();
  518.         if(isSiteServ()) {
  519.             generateSiteServPluginTable();
  520.         }
  521.         if(isDynamicTrue) {
  522.             resizeMe("850px", "525px");
  523.             // generateChsPluginTable();
  524.         }
  525.  
  526.     }else{
  527.         document.getElementById("w3_plugin_data").parentElement.removeChild(document.getElementById("w3_plugin_data"));
  528.         document.getElementById("www_plugin_data").style.display="block";
  529.         resizeMe("650px", "470px");
  530.         // displayCustomizedComponents();
  531.     generatePluginTable();
  532.     }
  533. }
  534.  
  535. function getElementOf(parent, childName, attributeName, attributeValue, getFirstFound){
  536.   var targetElement = null;
  537.   var children = parent.all;
  538.   for(var i=0; i<children.length; i++){
  539.     var child = children(i);
  540.     if(child.nodeType == 1 && child.tagName == childName){
  541.       if(attributeName == ''){
  542.         return child;
  543.       }else{
  544.         var att = child.getAttributeNode(attributeName);
  545.         if(att != null && att.nodeValue == attributeValue){
  546.           targetElement =  child;
  547.           if(getFirstFound){
  548.             return targetElement;
  549.           }
  550.         }
  551.       }
  552.     }
  553.   }
  554.   return targetElement;
  555. }
  556.  
  557.  
  558. // search for an element among all elements contained in parent
  559. // function hasChildOf() only search one level
  560. function hasElementOf(parent, childName, attributeName, attributeValue){
  561.   var children = parent.all;
  562.   for(var i=0; i<children.length; i++){
  563.     var child = children(i);
  564.     if(child.nodeType == 1 && child.tagName == childName){
  565.       if(attributeName == ""){
  566.         return true;
  567.       }
  568.       var att = child.getAttributeNode(attributeName);
  569.       if(att != null && att.nodeValue == attributeValue){
  570.         return true;
  571.       }
  572.     }
  573.   }
  574.   return false;
  575. }
  576.  
  577. function raiseButton(el) {with (el.style) {borderTop ="1 solid buttonhighlight";borderLeft ="1 solid buttonhighlight";
  578.         borderBottom ="1 solid buttonshadow";borderRight ="1 solid buttonshadow";padding ="1";}}
  579.  
  580. function normalButton(el) {with (el.style) {background = "";border = "1px solid buttonface";padding = "1";}}
  581.  
  582. function pressedButton(el) {with (el.style){ borderTop ="1 solid buttonshadow";paddingTop = "2";borderLeft ="1 solid buttonshadow";
  583.         borderBottom ="1 solid buttonhighlight";paddingBottom= "0";borderRight = "1 solid buttonhighlight";}}
  584.  
  585. function getReal(evt, type, value) {  
  586.     if (!evt) evt = window.event;
  587.     temp = evt;
  588.     while ((temp != null) && (temp.tagName != "BODY")) 
  589.     {  
  590.         if (eval("temp." + type) == value) 
  591.         {
  592.             evt = temp;return evt;
  593.         }
  594.         if(!is_browserName_IE)
  595.             temp = temp.parentNode     
  596.         else
  597.            temp = temp.parentElement;
  598.  
  599.  
  600.      }
  601.      return evt;
  602.  
  603.  }
  604.  
  605.  
  606.  
  607. function setRange()
  608. {
  609.     if(!is_browserName_IE)
  610.     {
  611.         st = document.getElementById("myEditor").contentDocument;
  612.         oSelect = st.getSelection();
  613.  
  614.         oTop=oSelect.toString().length+st.body.scrollTop;
  615.         oLeft=oSelect.toString().length+st.body.scrollLeft;
  616.  
  617.  
  618.     }
  619.     else
  620.     {
  621.         st=document.frames["myEditor"].document;
  622.         oSelect = st.selection;
  623.         oRange=oSelect.createRange();
  624.         oTop=oRange.offsetTop+st.body.scrollTop;
  625.         oLeft=oRange.offsetLeft+st.body.scrollLeft;
  626.     }
  627. }
  628.  
  629. function parentHasID_Of(idValue, childElement){
  630.   if(childElement != null){
  631.     var parent = childElement.parentElement;
  632.     if(parent != null){
  633.       if(parent.id.indexOf(idValue)!=-1){
  634.         return true
  635.       }else{
  636.         return parentHasID_Of(idValue, parent);
  637.       }
  638.     }  
  639.   }
  640.   return false;
  641. }
  642.  
  643. /**
  644.  * Position Context Menu
  645.  */
  646. function positionMenu(contextMenu, curposX, curposY, halfScreenWidth, halfScreenHeight) {    
  647.  
  648.     // Screen Quadrant
  649.     // |
  650.     // 2nd | 1st
  651.     // -------------------------
  652.     // |
  653.     // 3rd | 4th
  654.  
  655.     // check if mouse cursor is at first quadrant of the screen
  656.  
  657.     if (curposX > halfScreenWidth && curposY < halfScreenHeight) {
  658.         debugMsg("first quadrant\n\tev.clientX =" + ev.clientX + "\n\tev_clientY="+ev.clientY);
  659.         contextMenu.style.leftPos+=10;
  660.         contextMenu.style.posLeft=ev.clientX+50;
  661.     contextMenu.style.posTop=ev.clientY;
  662.     if(isW3Mode){
  663.          contextMenu.style.posTop += 100;
  664.     }
  665.     contextMenu.style.display="";
  666.         contextMenu.setCapture();    
  667.     }
  668.     // check if mouse cursor is at second quadrant of the screen
  669.     else if (curposX < halfScreenWidth && curposY < halfScreenHeight) {
  670.         debugMsg("second quadrant\n\tev.clientX =" + ev.clientX + "\n\tev_clientY="+ev.clientY);
  671.         contextMenu.style.leftPos+=10;
  672.         contextMenu.style.posLeft=ev.clientX+200;
  673.         contextMenu.style.posTop=ev.clientY;
  674.         if(isW3Mode){
  675.          contextMenu.style.posTop += 100;
  676.     }
  677.         contextMenu.style.display="";
  678.         contextMenu.setCapture();    
  679.     }
  680.     // check if mouse cursor is at 3rd quadrant of the screen
  681.     else if (curposX < halfScreenWidth && curposY > halfScreenHeight) {
  682.         debugMsg("thrid quadrant\n\tev.clientX =" + ev.clientX + "\n\tev_clientY="+ev.clientY);
  683.         contextMenu.style.leftPos+=10;
  684.         contextMenu.style.posLeft=ev.clientX+200;
  685.         contextMenu.style.posTop=ev.clientY-120;
  686.         contextMenu.style.display="";
  687.         contextMenu.setCapture();    
  688.     }
  689.     // check if mouse cursor is at 3rd quadrant of the screen
  690.     else if (curposX > halfScreenWidth && curposY > halfScreenHeight) {
  691.         debugMsg("fourth quadrant\n\tev.clientX =" + ev.clientX + "\n\tev_clientY="+ev.clientY);
  692.         contextMenu.style.leftPos+=10;
  693.         contextMenu.style.posLeft=ev.clientX+50;
  694.         contextMenu.style.posTop=ev.clientY-120;
  695.         contextMenu.style.display="";
  696.         contextMenu.setCapture();    
  697.     }
  698. }
  699.  
  700. function validateURL(fieldObj)
  701. {
  702.     var value = fieldObj.value;
  703.     if (!isAlphaNumericSpecial(value, false)) {
  704.         // alert("The URL can only contain letters, digits, periods, colons,
  705.         // slashes, question marks, pound signs, ampersands, hyphens,
  706.         // underscores, at signs, plus signs, equal signs, percentage signs,
  707.         // semi-colons, brackets, tilters, or commas.");
  708.         alert(msg112);
  709.         return false;
  710.     }
  711.     else {
  712.         return true;
  713.     }
  714. }
  715.  
  716. function isAlphaNumericSpecial (s,defaultEmptyOK)
  717. {
  718.     if (isEmpty(s)) {
  719.         // if the user set Empty is okay, return
  720.         if (defaultEmptyOK == true)
  721.             return true;
  722.         // Otherwise, false
  723.         else
  724.             return false;
  725.     }
  726.  
  727.     // Search through string's characters one by one
  728.     // until we find a non-alphanumeric character.
  729.     // When we do, return false; if we don't, return true.
  730.     for (var i = 0; i < s.length; i++)
  731.     {
  732.         // Check that current character is number or letter.
  733.         var c = s.charAt(i);
  734.         if (!(isLetter(c) || isDigit(c)))
  735.         {
  736.             if((c==".") || (c==":") || (c=="/") || (c=="?") || (c=="#") || (c=="&") || (c=="-") || (c=="_") || (c=="@") || (c=="+") || (c=="=") || (c=="%") || (c==";") || (c=="(") || (c==")") || (c=="~") || (c==",")) // these
  737.                                                                                                                                                                                                                             // characters
  738.                                                                                                                                                                                                                             // are
  739.                                                                                                                                                                                                                             // OK
  740.                 continue;
  741.             else
  742.                 return false;
  743.         }
  744.     }
  745.  
  746.     // All characters are numbers or letters.
  747.     return true;
  748. }
  749.  
  750.  
  751. function isEmpty(s)
  752. {
  753.     return ((s == null) || (s.length == 0));
  754. }
  755.  
  756. // Returns true if character c is an English letter (A .. Z, a..z).
  757. function isLetter (c)
  758. {
  759.     return ( ((c >= "a") && (c <= "z")) || ((c >= "A") && (c <= "Z")) );
  760. }
  761.  
  762. // Returns true if character c is a digit (0 .. 9).
  763. function isDigit (c)
  764. {
  765.     return ((c >= "0") && (c <= "9"));
  766. }
  767.  
  768. // find the first occurance of TD tag
  769. function findTD(el) {
  770.     var tempElem=el;
  771.     while(tempElem!=null) {        
  772.         if(tempElem.tagName=="TD") {
  773.             return tempElem;
  774.         }
  775.         else if (tempElem.tagName=="TH") {
  776.             return tempElem;
  777.         }
  778.         else {
  779.             // do nothing
  780.         }
  781.  
  782.         // otherwise search the parent element
  783.         tempElem=tempElem.parentElement;    
  784.  
  785.         // return when it reaches the top of the code
  786.         if(tempElem.tagName=="HTML") {
  787.             return el;
  788.         }        
  789.  
  790.     }
  791.  
  792.  
  793.     return tempElem;    
  794. }
  795.  
  796. function fixTBpos()
  797.  
  798. var OCode = document.getElementById('OCode');
  799.  
  800. var ODiv  = document.getElementById('ODiv');
  801.  
  802.     st=document.body;
  803.     if(isW3Mode)
  804.         OCode.style.height=ODiv.style.height=st.clientHeight-119;
  805.     else
  806.         OCode.style.height=ODiv.style.height=st.clientHeight-113;
  807.  
  808.     typeof(toc) == "undefined" ? '':Resizetoc();
  809. }
  810.  
  811. function hasTagsInText(text)
  812. {
  813.  
  814.     if(text.indexOf("<TABLE") >=0 || text.indexOf("<table") >=0)
  815.         return 'table';
  816.  
  817.     if(text.indexOf("<TD") >=0 || text.indexOf("<td") >=0)
  818.         return 'column';    
  819.  
  820.     if(text.indexOf("<IMG") >=0 || text.indexOf("<img") >=0)
  821.         return 'image';
  822.  
  823.     if(text.indexOf("<H2") >=0 || text.indexOf("<h2") >=0)
  824.         return 'h2';
  825.  
  826.     if(text.indexOf("<DIV") >=0 || text.indexOf("<div") >=0)
  827.         return 'div';
  828.  
  829.     if(text.indexOf("<A") >=0 || text.indexOf("<a") >=0)
  830.         return 'link';   
  831.  
  832.     if(text.indexOf("<FORM") >=0 || text.indexOf("<form") >=0)
  833.         return 'form';
  834.  
  835.     if(text.indexOf("<P>") >=0 || text.indexOf("<p>") >=0)
  836.         return 'invisible paragraph-mark';
  837.  
  838.     if(text.indexOf("<BR>") >=0 || text.indexOf("<br>") >=0)
  839.         return 'invisible new-line-mark';
  840.  
  841.     return '';
  842. }
  843.  
  844. function hasFormatInText(text)
  845. {
  846.     var format = ''
  847.     if(text.indexOf("id=subtitle") >=0)
  848.         format+= 'id=subtitle'    
  849.  
  850.     if(text.indexOf("class=greytext") >=0)
  851.         format+= 'class=greytext'    
  852.     if(text.indexOf("class=prices") >=0)
  853.         format+= 'class=prices'    
  854.     if(text.indexOf("class=small") >=0)
  855.         format+= 'class=small'    
  856.     if(text.indexOf("class=bct") >=0)
  857.         format+= 'class=bct'    
  858.  
  859. // jae added
  860.     if(text.indexOf("class=price") >=0)
  861.     format+= 'class=price'
  862.  
  863.     if(text.indexOf("class=error") >=0)
  864.     format+= 'class=error'
  865. // to here
  866.  
  867.     if(text.indexOf("<BLOCKQUOTE ") >=0 || text.indexOf("<BLOCKQUOTE>") >=0)
  868.         format+= 'header=blockquote'        
  869.  
  870.  
  871.     if(text.indexOf("formatted-text") >=0 || text.indexOf("class=")>=0)
  872.         format+= 'id=misctext'    
  873.  
  874.     if(text.indexOf("<SPAN ") >=0 || text.indexOf("<SPAN>") >=0)
  875.         format+= 'span'
  876.  
  877.     if(text.indexOf("<H1 ") >=0 || text.indexOf("<H1>") >=0)
  878.         format+= 'header=h1'
  879.  
  880.     if(text.indexOf("<H2 ") >=0 || text.indexOf("<H2>") >=0)
  881.         format+= 'header=h2'
  882.  
  883.     if(text.indexOf("<H3 ") >=0 || text.indexOf("<H3>") >=0)
  884.         format+= 'header=h1'
  885.  
  886.     if(text.indexOf("<H4 ") >=0 || text.indexOf("<H4>") >=0)
  887.         format+= 'header=h2'    
  888.  
  889.     if(text.indexOf("<EM ") >=0 || text.indexOf("<EM>") >=0)
  890.         format+= 'style=em'
  891.  
  892.     if(text.indexOf("<B ") >=0 || text.indexOf("<B>") >=0)
  893.         format+= 'style=b'
  894.     if(text.indexOf("<STRONG ") >=0 || text.indexOf("<STRONG>") >=0)
  895.         format+= 'style=strong'
  896.     if(text.indexOf("<I ") >=0 || text.indexOf("<I>") >=0)
  897.         format+= 'style=i'
  898.  
  899.     if(text.indexOf("<U ") >=0 || text.indexOf("<U>") >=0)
  900.         format+= 'style=u'
  901.     if(text.indexOf("<FONT ") >=0 || text.indexOf("<FONT>") >=0)
  902.         format+= 'style=font'    
  903.  
  904.     return format     
  905. }
  906.  
  907.  
Jun 3 '10 #19
tweetz
19 New Member
Please help me in that text undefined error....Because I cannot get a better and polite expert like u
Jun 3 '10 #20
Dormilich
8,658 Recognized Expert Moderator Expert
I need to see the relevant HTML (which contains the function call) or a working link to the page.
Jun 3 '10 #21
tweetz
19 New Member
@Dormilich
Actually When I apply that fix I am getting many errors like doUp is not defined doDown doOver doOut not defined..Its all in one line
Jun 3 '10 #22
Dormilich
8,658 Recognized Expert Moderator Expert
those may have the same reasons.
Jun 3 '10 #23
tweetz
19 New Member
@Dormilich
I have all those errors in this single line..how 2 fix this?
Jun 3 '10 #24
Dormilich
8,658 Recognized Expert Moderator Expert
I don’t know without code.
Jun 3 '10 #25
tweetz
19 New Member
@Dormilich
how to fire the errors using firebug in firefox?
Jun 4 '10 #26
Dormilich
8,658 Recognized Expert Moderator Expert
that question does not make sense to me. please explain.
Jun 4 '10 #27
tweetz
19 New Member
@Dormilich
Actually I installed firebug add-on in firefox,how to work with that..Showing the same error text undefined
Jun 4 '10 #28
Dormilich
8,658 Recognized Expert Moderator Expert
that’s what Firebug does (among others). I think there’s a tutorial at the Firebug website about how to use it.

I only can help you further if I can see your page.
Jun 4 '10 #29
tweetz
19 New Member
@Dormilich
Expand|Select|Wrap|Line Numbers
  1. tml><head><title><%= zget("/user/url")%></title>
  2. <script type="text/javaScript" src="content_editor/js/scripts.js"></script>
  3.  
  4. <link rel="stylesheet" type="text/css" href="content_editor/css/editorcss/v4-screen.css" />
  5. <style type="text/css" media="all">
  6. <!--
  7. @import url("content_editor/css/editorcss/screen.css");
  8. @import url("content_editor/css/editorcss/interior.css");
  9. @import url("content_editor/css/editorcss/icons.css");
  10. -->
  11. </style>
  12. <script type="text/javaScript"> 
  13. var wct_version = 6.0;
  14. var isW3Mode = <%= zget("/user/isW3Mode")%>;
  15. var is_browserName_IE = navigator.appName == "Microsoft Internet Explorer"? true : false;
  16.  
  17. <% String content = zget("/user/SELECTEDPAGEDATA");
  18.     content = content.replace("&apos;","\'");
  19.     String w3Content = "";
  20.     String wwwContent = "";
  21.      if(zget("/user/isW3Mode")){
  22.          w3Content = content;
  23.      }else{
  24.          wwwContent = content;
  25.      }
  26. %>
  27. </script>
  28.  
  29. <!-- print stylesheet MUST follow imported stylesheets -->
  30. <link rel="stylesheet" type="text/css" media="print" href="content_editor/css/editorcss/print.css" />
  31. <script type="text/javaScript"  src="content_editor/js/buildurl.js" ></script>
  32. <script type="text/javascript" language="JavaScript" id="tagURL" src="content_editor/js/css.js"></script>
  33. <script type="text/javaScript"  src="content_editor/config/config.js" ></script>
  34. <script type="text/javaScript"  src="content_editor/js/static-messages.js" ></script>
  35. <script type="text/javaScript"  src="content_editor/js/events.js" ></script>
  36. <script type="text/javaScript"  src="content_editor/js/common.js" ></script>
  37. <script type="text/javaScript"  src="content_editor/js/common_utils.js" ></script>
  38. <script type="text/javaScript"  src="content_editor/js/common_menu.js" ></script>
  39. <script type="text/javaScript"  src="content_editor/js/content_menu.js" ></script>
  40. <script type="text/javaScript"  src="content_editor/js/context_menu.js" ></script>
  41. <script type="text/javaScript"  src="content_editor/js/rules_engine.js" ></script>
  42. <script type="text/javaScript"  src="content_editor/js/PluginService.js" charset="iso-8859-1"></script>
  43. <script type="text/javaScript"  src="content_editor/js/editview.js" ></script>
  44. <script type="text/javascript" src="/js/upload.js"></script>
  45. <script type="text/javascript" src="/js/ajax.js"></script>
  46. <script type="text/javascript" src="/js/popuplauncher.js"></script>
  47. <script type="text/javascript" src="/js/shared.js"></script>
  48.  
  49. <link rel="stylesheet" href="content_editor/css/r1.css" type="text/css"/>
  50. </head>
  51.  
  52.  
  53. <body bgcolor="white" style="margin: 0; border: 0" onload="init_loader()"  >
  54. <div id="loadingMsg" align="center" style="display:none"><strong>Loading...Please wait</strong></div>
  55. <DIV id="www_content_editor" style = "display : none;" >
  56.     <form name="form0" action="" method="post" target="_top"></form>
  57.         <div id="header" style="position:absolute;top:43;left:0;height:100%;width:100%;">
  58.             <img id="tagURL" src="content_editor/media/v16_header.jpg" width="930" height="80" border="0" alt="v16_header.jpg">
  59.         </div>
  60.         <div id="navbar" style="text-align:left;position:absolute;top:115;left:0;height:184;width:389;">
  61.             <img id="tagURL" src="content_editor/media/v16_left_nav.gif" width="184" height="389" border="0" alt="v16_left_nav.gif">
  62.         </div>
  63.         <div id="ODiv" style="position:absolute;top:115;left:149;width:780;height:600;border:1px inset black">
  64.             <iframe id="myEditor"width="100%" height="100%" frameborder="0" marginheight="0" marginwidth="0" scrolling="yes" style="display:''">
  65.             </iframe>
  66.             <textarea id="OCode" style="border:none;font-size:8pt;width:100%;height:100%;display:'none'">
  67.             </textarea>
  68.         </div>
  69.         <div id="CELayout" style="display:none;"><%= wwwContent%></div>
  70. </div>
  71.  
  72. <DIV id="w3_content_editor" style = "display : none" >
  73.  
  74.         <form name="form0" action="" method="post" target="_top"></form>
  75.         <!-- TO-DO -->
  76.         <!-- To enable Shortcut menu bar, plese set "top:42" for <div id=header> -->
  77.         <div id ="header" style="background:#FFFFFF;position:absolute;top:43;left:0;height:100%;width:100%;">
  78.         <!-- start popup masthead //////////////////////////////////////////// -->
  79.         <div id="popup-masthead" style="display:none">
  80.             <img id="popup-w3-sitemark" src="content_editor/media/id-w3-sitemark-small.gif" alt="" width="182" height="26" />
  81.         </div>
  82.         <!-- stop popup masthead //////////////////////////////////////////// -->
  83.         <!-- start masthead -->
  84.  
  85.         <div id="masthead" UNSELECTABLE="on">
  86.             <h2 class="access">Start of masthead</h2>
  87.             <div id="prt-w3-sitemark"><img src="content_editor/media/id-w3-sitemark-simple.gif" alt="" width="54" height="33" /></div>
  88.             <div id="prt-logo"><img src="content_editor/media/id-logo-black.gif" alt="Logo" width="44" height="15" /></div>
  89.             <div id="w3-sitemark"><img src="content_editor/media/id-w3-sitemark-large.gif" alt="" width="266" height="70" usemap="#sitemark_map" /><map id="sitemark_map" name="sitemark_map"><area shape="rect" alt="Link to W3 Home Page" coords="0,0,130,70" accesskey="1" /></map></div>
  90.             <div id="site-title-only">WebComposer Content Editor</div>
  91.             <div id="logo"><img src="content_editor/media/id-logo.gif" alt="Logo" width="44" height="15" /></div>
  92.             <div id="persistent-nav"><a id="w3home" href="http://w3.com/"> w3 Home </a><a id="bluepages"> BluePages </a><a id="helpnow"> HelpNow </a><a id="feedback" href="http://w3.com/feedback/" accesskey="9"> Feedback </a></div>
  93.             <div id="header-search">
  94.                 <form action="" method="get" id="search">
  95.                 <table cellspacing="0" cellpadding="0" class="header-search">
  96.                 <tr><td class="label"><label for="header-search-field">Search w3</label></td><td class="field"><input id="header-search-field" name="qt" type="text" accesskey="4" disabled/></td><td class="submit"><input id="header-search-btn" type="image" alt="Go" src="content_editor/media/btn-go-dark.gif" disabled/></td></tr>
  97.                 </table>
  98.                 </form>
  99.             </div>
  100.             <div id="browser-warning"><img src="content_editor/media/icon-system-status-alert.gif" alt="Error" width="12" height="10" /> This Web page is best used in a modern browser. Since your browser is no longer supported by , please upgrade your web browser at the <a href="http://w3.com/download/">ISSI site</a>.</div>
  101.         </div>
  102.         <!-- stop masthead -->
  103.         </div>
  104.         <!-- TO-DO -->
  105.         <!-- To enable Shortcut menu bar, plese set "top:42" for <div id=navbar> -->
  106.         <div id ="navbar" style="position:absolute;top:43;left:0;height:445;width:1;border:1">
  107.         <!-- start navigation -->
  108.         <div id="navigation">
  109.             <h2 class="access">Start of left navigation</h2>
  110.             <!-- left nav -->
  111.             <div id="left-nav">
  112.                 <img src="content_editor/media/w3v8_navbar.jpg" width="142" height="393" border="0">
  113.             </div>
  114.         </div>
  115.         <!-- stop navigation -->
  116.         </div>
  117.         <div id="ODiv" style="position:absolute;top:115;left:50;height:100%;border:1px inset black">
  118.             <iframe width=100% height=100% frameborder=0 scrolling="yes" ID=myEditor style="display:''"></iframe>
  119.             <textArea id=OCode style="border:none;font-size:8pt;width:100%;height:100%;display:'none'" rows="1" cols="20"></textarea>
  120.         </div>
  121.         <!-- For display in Content Editor -->
  122.         <div id="CELayout" style="display:none"><%= w3Content%></div>
  123.  
  124. </div>
  125. <script type="text/javascript">
  126. writemenus();
  127. <!-- For removing plugin code from Content Editor and keep placeholder images -->
  128. new PluginService ().removePluginCode(document.getElementById("CELayout"));
  129. </script>
  130. </body></html>
  131.  
Jun 4 '10 #30
tweetz
19 New Member
@Dormilich
I have sent you the HTML of that page
Jun 4 '10 #31
tweetz
19 New Member
@Dormilich
Is that code helps to fix the error....help plz
Jun 4 '10 #32
Dormilich
8,658 Recognized Expert Moderator Expert
unfortunately I could not find the mentioned function. could you give me a link to the page?
Jun 4 '10 #33
tweetz
19 New Member
@Dormilich
hi..this code is not working in firefox ..its just coming addCSS is not defined..Please help me


addCSS(finalURL + "/css/screen.css");
addCSS(finalURL + "/css/interior.css");
addCSS(finalURL + "/css/icons.css");
addCSS(finalURL + "/css/tables.css");
Jun 7 '10 #34
Dormilich
8,658 Recognized Expert Moderator Expert
..its just coming addCSS is not defined..Please help me
I need a link to the page, there seem to be so many cross-references, that it’s impossible to just post the code.

for now I can only say, you can only call functions you have defined earlier or which are built-in.
Jun 7 '10 #35

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Razarr69 | last post by:
I have a ASP application that I am using for my company and it is currently running on a Windows 2000 server box with IIS 5. The code works perfectly there (except for handling large files - due...
4
by: lawrence | last post by:
Can anyone tell me why this code works in Netscape 7.1 but not in IE??? <SCRIPT type='text/javascript'> function makeVisible(nameOfDiv) {...
1
by: Avi | last post by:
Hi All. This code works very fine in Firefox but not in I.E. Can anybody help me out? it gives ... "Unknown Runtime Error" in I.E. This code ... Stores N*2 Matrix at Client Side & provide the...
6
by: Crash | last post by:
C# VS 2003 ..Net Framework V1.1 SP1 SQL Server 2000 SP3 Enterprise Library June 2005 I'm working with some code {not of my creation} that performs the following sequence of actions: - Open...
1
by: tweety | last post by:
wat does "native code" in firefox dom inspector mean? function hasAttribute() { } can anyone help me with this? Thanks in advance,
3
by: smartic | last post by:
I'm having problem with this code in firefox but in the Internet Explorer Browser works fine on it what is the wrong in my code ? <html> <head> <title>Like_mail</title> <script...
1
by: reemamg | last post by:
I've two frames in a page. On the left Frame i've buttons , if we click on button the particular pages will be loaded in the middle Frame. This code works perfectly in Firefox but not in IE ... ...
1
by: reemamg | last post by:
Have a piece of code which works in Firefox however doesnt work in IE <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML> <HEAD> <TITLE> New Document </TITLE> <meta...
4
by: Anz | last post by:
I used the javascript functions as shown below. <a href="javascript:;;;" onclick="this.style.behavior='url(#default#homepage)'; this.setHomePage(location.href);"> But this code works for IE,...
3
by: PrabodhanP | last post by:
I hv following javascript form validation code works in IE but not in Mozilla-Firefox ...please suggest <script type="text/javascript"> function IsNumeric(strString) // check for valid...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.