Dropdown list to Enable Text Box

Sam81

New member
Local time
Tomorrow, 08:13
Joined
Mar 10, 2009
Messages
9
Hey guys,

Just wanted to know if you guys can help with this:

I want a drop down box. One of the options being "Waiting on BoH area", if "Waiting on BoH area" is selected then a textbox adjacent to the drop down is enabled.
Also please note, the list is from an access table so it wasn’t written in the form.
It also needs to be in JavaScript like below:

Here is an example:

<SCRIPT language=javascript>

function BOHAREA ()
{
if (TIOFORM.DropdownList1.value == "Waiting on BoH area")
{
TIOFORM.Textbox1.disabled = false;
}
}
</SCRIPT>

You would think this would work but for some reason it doesn’t and it’s been doing my head in.
If you can see where I went wrong and be able to guide to a solution, it would be very much appreciated.
:):):)

And one last thing... PLEASE HELP
 
Wheteher Javascript or not I would imagine that:


if (TIOFORM.DropdownList1.value == "Waiting on BoH area")

The ="Waiting on BoH area" is the text displayed but usually in dropdown lists the "actual" .value is the bound column of the source eg. 1= Test1, 2= Test2 etc..

May be wroung but look at the row source for your drop down list to confirm this.

good luck john
 
Thanks John,
I tried if (TIOFORM.DropdownList1.value == 2) but it still didn't work for me. I'm new to this and not to sure what you meant by "row source ". Maybe I didn't provide enough information.
I'm buiding a form from Access using the Page as an interface. I've also created a table for my dropdown list to refer to instead of manually writting them onto the dropdown list itself. I tried finding the row source but all it I got for my dropdown list was:

id=DropdownList1
style="Z-INDEX: 124; LEFT: 4.206cm; VISIBILITY: inherit; WIDTH: 11.705cm; POSITION: absolute; TOP: 16.485cm; HEIGHT: 0.502cm"
onclick=BOHAREA() tabIndex=14>
 
Sorry java is not my bag but if I knew what you were trying to do eg. why it must be java and why access might be able to help?
 
I'm using Access as my database. So I've created a form using Page within Access. I guess I could have used something else, but I have very limited licences to use anything else.
 

Users who are viewing this thread

Back
Top Bottom