...

View Full Version : popup box that auto populates



lisa2
05-26-2005, 02:03 PM
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????

:confused:

Mr J
05-26-2005, 03:02 PM
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



<script>
function createcom( i ){

qcomm = "Question #" + i + ":"
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?

lisa2
05-26-2005, 03:25 PM
The popup window will appear when the options NA(not applicable) is select from a dropdown list box.

jbot
05-26-2005, 03:56 PM
is this a college assignment?

lisa2
05-26-2005, 05:34 PM
for my work.

jbot
05-26-2005, 05:47 PM
so, how come you and another user have asked the same question, then?

Mr J
05-26-2005, 05:52 PM
There does seem to be an increasing number of "Homework" questions on the forums these days :(

lisa2
05-26-2005, 06:51 PM
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.

Vapor
05-26-2005, 10:10 PM
busted



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum