Note that there are some explanatory texts on larger screens.

plurals
  1. POTrigger custom alert for Key press counter in FF text-box using Javascript XUL
    primarykey
    data
    text
    <p>This is my alert function to show the alert message:</p> <pre><code>function alertPopup() { var image = "file://C:/stat.png"; var win = Components.classes['@mozilla.org/embedcomp/window-watcher;1']. getService(Components.interfaces.nsIWindowWatcher). openWindow(null, 'chrome://global/content/alerts/alert.xul', '_blank', 'chrome,titlebar=no,popup=yes', null); win.arguments = [image, 'Hi, there', 'You can make a PDE by clicking on the PDE button in the Status-bar', false,]; document.getElementById('myImage').setAttribute("hidden", "false"); } </code></pre> <p>This funciton to to get the entered text in the Firefox browser and paste in the textbox plugin.</p> <pre><code>onKeypress : function (e) { var node = e.target; var nodeName = node.nodeName.toLowerCase(); //text area cache onKeyPress code if ( nodeName == "textarea" &amp;&amp; node.value == "" &amp;&amp; e.keyCode == 13 ) { pde.fillText(node); return; } // this node is a WYSIWYG editor or an editable node? if ( ( nodeName != "html" || node.ownerDocument.designMode != "on" ) &amp;&amp; node.contentEditable != "true" ) return; if ( node.textContent == "" &amp;&amp; e.keyCode == 13 ) { pde.fillText(node); return; } if (!node.tacacheOnSave) { pde.fillText(node); } }, onChange : function (e) { var node = e.target; var nodeName = node.nodeName.toLowerCase(); //alert("onChange : "+nodeName); if ( nodeName != "textarea" ) return; pde.fillText(node); }, onInput : function (e) { var node = e.target; var nodeName = node.nodeName.toLowerCase(); //alert("onInput : "+nodeName); // Only for textarea node if ( node.nodeName.toLowerCase() != "textarea" ) return; if ( node.value == "" ) return; pde.fillText(node); }, fillText : function (node) { nodeSRC = node; if ( node.nodeName.toLowerCase() == "textarea" ) { userContent = node.value; } else if ( node.nodeName.toLowerCase() == "html" ) { userContent = node.ownerDocument.body.innerHTML; } else // element.contentEditable == true userContent = node.innerHTML; }, emptyNodeSRC : function (node){ if ( node.nodeName.toLowerCase() == "textarea" ) { node.value = ""; } else if ( node.nodeName.toLowerCase() == "html" ) { node.ownerDocument.body.innerHTML = ""; } else // element.contentEditable == true node.innerHTML = ""; }, </code></pre> <p>maxTextEntered : 20; I want to add this parameter to my above code.</p> <p>How do i trigger the pop-up function if the user typed more than 20 characetrs in the FF browser textbox in my code and I would like to reset the time after 5 mins and the start the counting once again?</p> <p><a href="https://developer.mozilla.org/en/NsIAlertsService" rel="nofollow">https://developer.mozilla.org/en/NsIAlertsService</a> <a href="https://developer.mozilla.org/en/Code_snippets/Alerts_and_Notifications" rel="nofollow">https://developer.mozilla.org/en/Code_snippets/Alerts_and_Notifications</a> from these links, I couldn't find any script for my requirement.</p> <p>Please propose me good solution to my problem. Thanks guys.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload