Page 2 of 2 FirstFirst 12
Results 11 to 12 of 12

Thread: Displaying text via a button

  1. #11
    Join Date
    Apr 2007
    Location
    Southwest France
    Posts
    29
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    No believe it or not, my (dream list) is 3 drop down menus
    with thousands, hundreds, and I think the tens & units as the last.
    so by selecting say.

    2000 500 45

    it will return

    two thousand five hundred forty five

    have I been sniffing too many red wine bottle, or is it all possible,
    I know there will be some laborious coding but I can handle that.

    and many thanks chaps for your time.
    less then a hour ago I was scratching my head, and now I've two working scrips, thanks again

    Steve C.

  2. #12
    Join Date
    Apr 2007
    Location
    Southwest France
    Posts
    29
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Hi all
    Stuck again I've played with all the buttons and still nothing , (No male female jokes please ) anyway can any one help me stop the text over text, I've tried radio buttons and a few other things still no joy, I have also positioned the 1st 3 within the <div> tag.

    regards

    Steve c.

    here's the code.

    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
    "http://www.w3.org/TR/html4/strict.dtd">
    
    <html>
     <head>
    <script type="text/javascript">
    
    function showNumber(number) {
    
    obj = document.getElementById(number);
    
      if (obj.style.display == "none") {
        obj.style.display = '';
      }
    
      else {
        obj.style.display = 'none';
      }
    }
    </script>
     </head>
    <body>
     Thousands
    <form>
    <input name="Thousands" type="radio" onclick="showNumber('une mille');" value="1000" ><br>
    <input name="Thousands" type="radio" onclick="showNumber('deux milles');" value="2000"><br>
    <input name="Thousands" type="radio" onclick="showNumber('trois milles');" value="3000"><br>
    <input name="Thousands" type="button" onclick="showNumber('quatre milles');" value="4000"><br>
    <input name="Thousands" type="button" onclick="showNumber('cinq milles');" value="5000"><br>
    <input name="Thousands" type="button" onclick="showNumber('six milles');" value="6000"><br>
    <input name="Thousands" type="button" onclick="showNumber('sept milles');" value="7000"><br>
    <input name="Thousands" type="button" onclick="showNumber('huit milles');" value="8000"><br>
    <input name="Thousands" type="button" onclick="showNumber('neuf milles');" value="9000"><br>
    <input name="Thousands" type="button" onclick="showNumber('dix milles');" value="10,000"><br>
    
    
    
    <div id="une mille" style="display: none; position:absolute; left:15px; top:300px; width:170px; height:40px;"><h2>une mille</h2></div>
    <div id="deux milles" style="display: none; position:absolute; left:15px; top:300px; width:170px; height:40px;"><h2>deux milles</h2></div>
    <div id="trois milles" style="display: none; position:absolute; left:15px; top:300px; width:170px; height:40px;"><h2>trois milles</h2></div>
    <div id="quatre milles" style="display: none;"><h2>quatre milles</h2></div>
    <div id="cinq milles" style="display: none;"><h2>cinq milles</h2></div>
    <div id="six milles" style="display: none;"><h2>six milles</h2></div>
    <div id="sept milles" style="display: none;"><h2>sept milles</h2></div>
    <div id="huit milles" style="display: none;"><h2>huit milles</h2></div>
    <div id="neuf milles" style="display: none;"><h2>neuf milles</h2></div>
    <div id="dix milles" style="display: none;"><h2>dix milles</h2></div>
    
    
    
    
    </form>
    
    
    
    </body>
    </html>

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
  •