SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Member
    Join Date
    Mar 2004
    Location
    malaysia
    Posts
    13
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    cursor and disable

    is there any coding in php or javascript whereby whenever i put the cursor in the input box, the image buttons for bold or italic will not be appear?

  2. #2
    SitePoint Enthusiast RaS!'s Avatar
    Join Date
    Mar 2004
    Location
    Italy
    Posts
    25
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Exclamation

    Quote Originally Posted by firestar_lene
    is there any coding in php or javascript whereby whenever i put the cursor in the input box, the image buttons for bold or italic will not be appear?
    Where should be are the image button for bold/italic??

  3. #3
    Non-Member
    Join Date
    Jan 2004
    Location
    Planet Earth
    Posts
    1,764
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Wrong forum, this is definitely one for Javascript

  4. #4
    SitePoint Wizard silver trophy
    Join Date
    May 2003
    Posts
    1,843
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    <html>
    <head>
    <style type="text/css">
    
    #bold, #italic {
    	position: relative;
    	top: 3px;
    }
    
    </style>
    <script type="text/javascript">
    
    function hidem()
    {
    	for (var el, a = 0; a < arguments.length; ++a)
    		if (el = document.getElementById(arguments[a]))
    			el.style.visibility = 'hidden';
    }
    
    function showem()
    {
    	for (var el, a = 0; a < arguments.length; ++a)
    		if (el = document.getElementById(arguments[a]))
    			el.style.visibility = 'visible';
    }
    
    </script>
    </head>
    <body>
    <form>
    <input type="text" onfocus="hidem('bold','italic')" onblur="showem('bold','italic')" />
    <img id="bold" width="24" src="http://www.jmu.edu/computing/tutorials/microsoft/excel/images/Using%2026.gif" />
    <img id="italic" width="24" src="http://www.jmu.edu/computing/tutorials/microsoft/excel/images/Using%2023.gif" />
    </body>
    </html>
    ::: certified wild guess :::


Bookmarks

Posting Permissions

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