41 users online (0 members and 41 guests)  


  Results 1 to 2 of 2

Related

  1. Replies: 15
  2. Custom scrollbars    Forum: Javascript Forum
    Replies: 5
  1. #1
    altnetwork's Avatar
    New User

    Status
    Offline
    Join Date
    Nov 2008
    Posts
    1

    Custom input forms

    Hello,

    I am looking to find how to create a custom input form field that will a number that is typed and added a two digit year at the front of this and at the end add a 2 char company code.

    Format:

    08{numbers added by end user}OR

    Thanks for any help!!!

    Doyle

  2. #2
    rangana's Avatar
    Moderator/Allstar

    Status
    Offline
    Join Date
    Feb 2008
    Location
    Cebu City Philippines
    Posts
    317

    Re: Custom input forms

    HTML Code:
    <script type="text/javascript">
    window.onload=function()
    	{
    	var el=document.getElementById('mytext');
    	el.onblur=function()
    		{
    		var prefix='08'; // Prefix string
    		var suffix='OR'; // Suffix string
    		alert(prefix+this.value+suffix); // Output
    		}
    	}
    </script>
    <input type="text" id="mytext">
    Checkout my porfolio.
    Please click the button when a member helped you.
    Take time to use Forum's Search function.



Tags for this Thread