Cheap Flights - Charity Gifts - Fast Loans - Credit Card - Credit Cards

PDA

View Full Version : I need help with a little js


adsensenewb
Nov 17th 2006, 5:40 pm
Okay

I wrote a Javascript function to disable a text box when a certain item is selected from a select box.

The problem:

I wrote an "IF statement to disable the box if a certain item is selected, but when you choose a new item from the select box it's not passed to the function.

I'll need to resubmit the page whenever a new item is selected.

Code:

<script language="javascript">

function enableField()
document.SearchForm.submit();<!---Here I''m attempting to resubmit the page whenever the function is called to resubmit the page-->
{
<cfset Section_ID = #GetSections.SECTION_ID#> <!--This value needs to be updated whenever a new item is selected--->

<cfif #Section_ID# NEQ 'value'>
document.SearchForm.Level6.disabled=false;
<cfelse>
document.SearchForm.Level6.disabled=true;
</cfif>
}
</script>