Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Apr 2013
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    simply want to delete hide/show js event

    Hey all, confident in HTML/CSS, but can't figure out how to simply remove javascript code. So your help is appreciated, cheers.
    There's a 'toggle' button when onClick shows a div. I want this button gone and the div to be permanently visible. The code is all inline.
    Code:
    <button onClick="VirtualKeyboard.toggle('text','td'); return false;" >toggle</button>
    <div id="td"></div>
    
         <form action="no.cgi" method="get">
             <textarea id="text" rows="1" onFocus="VirtualKeyboard.attachInput(this)"></textarea>
          	 <div id="td"></div>
         </form>
         <script type="text/javascript">
             EM.addEventListener(window,'domload',function(){
                 VirtualKeyboard.toggle('text','td');
             });     </script>

  • #2
    Senior Coder jmrker's Avatar
    Join Date
    Aug 2006
    Location
    FL
    Posts
    3,078
    Thanks
    38
    Thanked 498 Times in 492 Posts
    Have you tried something like this?
    Code:
    <div id="td"></div>
    
    <form action="no.cgi" method="get">
    <textarea id="text" rows="1"></textarea>
    <div id="td2"></div>
    </form>
    NOTE: You cannot have 'id's with the same value. The must be unique.

  • #3
    New to the CF scene
    Join Date
    Apr 2013
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    That didn't work, but my apologies, I didn't realize there was a js file attached to the HTML page. It contains this, hope it's not as complicated as it looks:
    Code:
    if(!window.VirtualKeyboard){VirtualKeyboard=new function(){var i=this,I=null;i.show=i.hide=i.toggle=i.attachInput=function(){window.status='VirtualKeyboard is not loaded yet.';if(!I)setTimeout(function(){window.status=''},1000);};i.isOpen=function(){return false};i.isReady=function(){return false}};(function(){var i=(function(_){var c=document.getElementsByTagName('script'),C=new RegExp('^(.*/|)('+_+')([#?]|$)');for(var l=0,e=c.length;l<e;l++){var v=String(c[l].src).match(C);if(v){if(!v[1])v[1]="";if(v[1].match(/^((https?|file|widget)\:\/{2,}|\w:[\\])/))return v[1];if(v[1].indexOf("/")==0)return v[1];var V=document.getElementsByTagName('base');if(V[0]&&V[0].href)return V[0].href+v[1];return(document.location.href.replace(/[?#].+$/,'').match(/(.*[\/\\])/)[0]+v[1]).replace(/^\/+/,"");}}return null})('vk_loader.js');var I=["extensions/e.js"];for(var l=0,o=I.length;l<o;l++)I[l]=i+I[l];I[l++]=i+'virtualkeyboard.js';I[l]=i+'layouts/layouts.js';if(window.ScriptQueue){ScriptQueue.queue(I);}else{if(!(window.ScriptQueueIncludes instanceof Array))window.ScriptQueueIncludes=[];window.ScriptQueueIncludes=window.ScriptQueueIncludes.concat(I);if(document.body){var O=document.createElement('script');O.type="text/javascript";O.src=i+'extensions/scriptqueue.js';var Q=document.getElementsByTagName("head")[0];Q.appendChild(O);}else{document.write("<scr"+"ipt type=\"text/javascript\" src=\""+i+'extensions/scriptqueue.js'+"\"></scr"+"ipt>");}}})();}

  • #4
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    25,216
    Thanks
    75
    Thanked 4,344 Times in 4,310 Posts
    So remove that JS file from the page. Why is it there if you don't want to use it?
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •