Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

passing a result to a txt box deoending on drop down menus

Status
Not open for further replies.

stan8450

Programmer
May 3, 2002
16
CA
I am trying to pass a value of 600 into a txtbox (Approximate_fee) when sizeindex < &quot;600&quot; and typeindex==4 and ageindex==1.
this is what I have so far:

var typeindex=document.for[0].Inspection_Type.selectedIndex;
var ageindex=document.forms[0].House_Age.selectedIndex;
var sizeindex=document.forms[0].House_Sqft.value;
if (sizeindex < &quot;600&quot; && typeindex==4 && ageindex==1)
{
document.forms[0].Approximate_Fee.value=&quot;600&quot;;
}


any help appreciated
 
Does this work?
if ((sizeindex < 600) && (typeindex==4) && (ageindex==1)){
document.forms[0].Approximate_Fee.value=&quot;600&quot;;
}
Also, do you want this?
var typeindex=document.for[0].Inspection_Type.selectedIndex;
or
var typeindex=document.forms[0].Inspection_Type.selectedIndex;



Rick if(($question==&quot;has been bugging me&quot;
AND $answer==&quot;fixed the problem&quot;) OR $answer==&quot;really good post&quot;){
print(&quot;Star&quot;);
}else{
print(&quot;Thanks.&quot;);
}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top