Forums
This topic is locked
Dynamic SELECT in File Genie List Menu
Posted 25 Jan 2005 11:20:36
1
has voted
25 Jan 2005 11:20:36 JB Willers posted:
Hi there,I researched this... but DMXZone had very little so far on answering it.
OK. I've written a CMS and one of the pages is an 'edit' page that updates a table called tblSkillProgrammes. One of the fields is fldProfile which is the name of a PDF document that can be downloaded from the details page.
Ok so there's list/menu box populated by File Genie in the update page. Everythings works fine but I want the current value stored in fldProfile to be SELECTED in the list/menu box. The current code looks like this but does not do the SELECTED thing. (File Genie folder name is 'Outline' & Recordset is 'rsProgramDet'):
<option value="<%=(Outline.Files("Name"





DWMX does not really help out much when it comes to initially selecting the current value. I get a 'The chosen menu already has a Dynamic Menu server behaviour applied to it' message.
Any help would be appreciated since it seems there's a lot of guys out there with the same problem.
Thanks
JB Willers
Replies
Replied 25 Jan 2005 19:59:29
25 Jan 2005 19:59:29 Chris Charlton replied:
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>...list/menu box populated by File Genie...I want the current value stored in fldProfile to be SELECTED in the list/menu box....
<pre id=code><font face=courier size=2 id=code><option value="<%=(Outline.Files("Name"
)%>" <%If (Outline.Files("Name"
) = (rsProgramDet.Fields.Item("fldOutline"
.Value) Then Response.Write("checked"
END IF%>><%=Outline.Files("FileName"
%></option></font id=code></pre id=code><hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>
Your code says Response.Write("checked"
, and that's for checkboxes. Change to:
<pre id=code><font face=courier size=2 id=code>Response.Write("selected"
</font id=code></pre id=code>
Also, for XHTML compliancy, you can do:
<pre id=code><font face=courier size=2 id=code>Response.Write('selected="selected"')</font id=code></pre id=code>
www.w3schools.com/tags/tag_option.asp
<pre id=code><font face=courier size=2 id=code><option value="<%=(Outline.Files("Name"





Your code says Response.Write("checked"

<pre id=code><font face=courier size=2 id=code>Response.Write("selected"

Also, for XHTML compliancy, you can do:
<pre id=code><font face=courier size=2 id=code>Response.Write('selected="selected"')</font id=code></pre id=code>
www.w3schools.com/tags/tag_option.asp
Replied 26 Jan 2005 08:58:12
26 Jan 2005 08:58:12 JB Willers replied:
Doh!
I'll wear my silly had for three days non-stop for that one....
Thanks Chris
I'll wear my silly had for three days non-stop for that one....
Thanks Chris
Replied 26 Jan 2005 12:14:20
26 Jan 2005 12:14:20 Chris Charlton replied:
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>I'll wear my silly had for three days non-stop for that one....Thanks Chris<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>
<i>Been there, done that!</i> I have my silly hat near my desk every day, just-in-case, you never know. <img src=../images/dmxzone/forum/icon_smile_tongue.gif border=0 align=middle> <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>
<i>Been there, done that!</i> I have my silly hat near my desk every day, just-in-case, you never know. <img src=../images/dmxzone/forum/icon_smile_tongue.gif border=0 align=middle> <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>