Simple Default value for drop down menu
Does anyone know why this would be happening?
I have a drop down menu on my Quality page for PDF_Creation_Doc_Control_Approval_Initials (I’ll shorten this to Doc Initials so you know what I’m talking about). Right now it is defaulted to be blank if nothing has been chosen for it yet. If initials are chosen, the initials will display when the page is loaded. The problem I’m having is that I want the “None” option to display as the default if the SW_Model_Only is 1. I’m just trying to get “None” to be the default for these. The code below does work if I hit the refresh button, but it does not work when I just click on the Quality link. Why would this be? How do I fix it? Below is the code for this drop down on the Quality Page. I added this If Statement:
<cfif SW_Model_Only Is 1>
<option value="None"></option>
<cfelse>
<option value=""></option>
</cfif>
The option value="" was already there.
<cfset PDFCreationDocControlInitials = DocumentationSearch.PDF_Creation_Doc_Control_Initials>
<td align="center">
<cfif Quality_Mgr_Initials Is Not "" and Quality_Mgr_Initials EQ cookie.UserInitials<!--- and SW_Model_Only Is 0 --->>
<select name="PDF_Creation_Doc_Control_Approval_Initials#ItemID#" id="PDF_Creation_Doc_Control_Approval_Initials#ItemID#">
<cfif SW_Model_Only Is 1>
<option value="None"></option>
<cfelse>
<option value=""></option>
</cfif>
<cfloop query="ShowInitials">
<option value="#Initials#"
<cfif #Initials# EQ PDFCreationDocControlInitials>selected</cfif>>#Initials#</option>
</cfloop>
</select>
<cfelse>
</cfif>
</td>
Thanks for your help.
Andy
