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 9 of 9
  1. #1
    New Coder
    Join Date
    May 2005
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    popup box that auto populates

    I am new to this forum, I have a popbox that I am trying to make autopopulate when a user select NA from a dropdown selection. I have to popup part working but it i will not show the text in the box.
    Here is my code, i have it commented out because is not working:

    function createcom( i )
    {

    opencreatecompopup()



    //var qcomm;
    //if (qcomm == "")
    //{
    //qcomm = qcomm + "; Q #" + i + ":";(Question #" + i + ":";-This is what it is suppose to put in the popup box)
    //document.form.txtqcomments.value = qcomm;
    //}

    //else
    //{
    //qcomm = qcomm + "; Q #" + i + ":";
    //document.form.txtqcomments.value = qcomm;

    //}

    }
    Can anyone help????


  • #2
    Senior Coder
    Join Date
    Aug 2002
    Location
    UK
    Posts
    2,789
    Thanks
    2
    Thanked 14 Times in 14 Posts
    You will have to be more specific with your question and code.

    In the code you posted the if/else statements do exactly the same thing.

    The variable qcomm is never given a value and function opencreatecompopup() does not exist.

    All you can do with that code is


    PHP Code:
    <script>
    function 
    createcom){

    qcomm "Question #" ":"
    document.form1.txtqcomments.value qcomm

    }
    </script>

    <form name="form1">
    <textarea name="txtqcomments"></textarea>
    <input type="button" value="Q 1" onclick="createcom(1)">
    <input type="button" value="Q 2" onclick="createcom(2)">
    </form> 
    Also do not assume that everyone will know what a popbox is, is it a div or a window?
    The silent one.

    The most dangerous thing in the world is an idea.
    The most dangerous person in the world is the one with an idea.

  • #3
    New Coder
    Join Date
    May 2005
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    popup box(window) that autopopulate

    The popup window will appear when the options NA(not applicable) is select from a dropdown list box.
    Last edited by lisa2; 05-26-2005 at 02:28 PM.

  • #4
    Senior Coder
    Join Date
    Feb 2004
    Location
    Edinburgh
    Posts
    1,352
    Thanks
    0
    Thanked 0 Times in 0 Posts
    is this a college assignment?
    *keep it simple (TM)

  • #5
    New Coder
    Join Date
    May 2005
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts
    for my work.

  • #6
    Senior Coder
    Join Date
    Feb 2004
    Location
    Edinburgh
    Posts
    1,352
    Thanks
    0
    Thanked 0 Times in 0 Posts
    so, how come you and another user have asked the same question, then?
    *keep it simple (TM)

  • #7
    Senior Coder
    Join Date
    Aug 2002
    Location
    UK
    Posts
    2,789
    Thanks
    2
    Thanked 14 Times in 14 Posts
    There does seem to be an increasing number of "Homework" questions on the forums these days
    The silent one.

    The most dangerous thing in the world is an idea.
    The most dangerous person in the world is the one with an idea.

  • #8
    New Coder
    Join Date
    May 2005
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts
    She's my friend and she posted the question for me, until I got registered. I have some screen shots that will give a better idea of what I am trying to accomplish, but I can not post it in the forum because the doc. was to large.

  • #9
    Regular Coder
    Join Date
    May 2005
    Posts
    220
    Thanks
    1
    Thanked 2 Times in 2 Posts
    busted


  •  

    Posting Permissions

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