Function for Input Boxes
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: Function for Input Boxes

Threaded View

  1. #1
    Join Date
    Mar 2013
    Posts
    1

    Unhappy Function for Input Boxes

    Hi,

    Summary of task: Click on text, it appears in input box 1. Click on another text, it appears in box 2. Click again, box 3. If the first box has text in it, it will appear in the second, and so on.

    However in the function below, the text never goes to Box 3. I don't know how to fix it!


    Code:
    var hasbeenset = false;
    
    function setInput(id){
    if(hasbeenset)
    {
    document.getElementById("myinput2").value= id;
    }
    else if
    (hasbeenset=true)
    
    {
    document.getElementById("myinput").value=id;
    
    }
    else 
    
    {
    document.getElementById("myinput3").value=id;
    
    }
    
    
    }
    Attached Files Attached Files

Tags for this Thread

Posting Permissions

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


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center