I'm trying to build a series of 4 dynamic db driven drop down menus.  Select
yr, the second box displays main categories avail. for that yr, choosing a
main category will in turn display a list of avail. items in the 3rd list
and so on.
I am trying to do this with a hidden frame and code that I downloaded by
David Shelley.  Creating a frame set like such:
<FRAMESET ROWS="100%,0%" FRAMEBORDER=1 FRAMESPACING=0 BORDER=0>
        <FRAME SRC="<@appfile>?function=display" NAME=form FRAMEBORDER=no>
        <FRAME SRC="<@appfile>?function=hidden" NAME=query FRAMEBORDER=no>
</frameset>

I use this script to run the query in the hidden frame:
<!-- JavaScript code
        function getPopupValues() {
                document.theForm.secondPopup.length=1;
                document.theForm.secondPopup[0].text='loading...';
                parent.query.location =
'<@cgi><@appfile>?<@UserReferenceArgument>&function=menu1&selectedyear='+esc
ape(document.theForm.firstPopup[document.theForm.firstPopup.selectedIndex].v
alue);
}
// -->
</script>

and this script to pass the values back to the parent:
<script language="JavaScript"><!--
parent.window.form.document.theForm.thirdPopup.length = <@numrows
array=menu2array>;
<@rows>
parent.window.form.document.theForm.thirdPopup[<@calc
expr='<@currow>-1'>].text = '<@col 1>';
parent.window.form.document.theForm.thridPopup[<@calc
expr='<@currow>-1'>].value = '<@col 1>';
</@rows>
//-->
</script>


Upon selecting a year in menu1, using javascript onChange=some java script
function, it will run a db query in the hidden frame and return the main
cat. values via javascript back to second list menu2.  This works fine, but
the third menu is only displaying the first item of the resultset.  It's
sort of hard to describe, this link will better explain it:
http://64.32.155.99/test2.taf

Here is a sample of what the database looks like:
year    main    sub
2002    pap     news1
2002    pap     news1
2002    pap     toil1
2002    pap     toil2
2002    pulp    semi1
2002    pulp    sem2
2003    pulp    sem3
2002    wood    ply1
2002    wood    ply2


Any help would be appreciated.


--
Forestweb: The Source for Industry Intelligence
Best Content -- Most Relevant -- Best Delivery
http://www.Forestweb.com
(310)553-0008



________________________________________________________________________
TO UNSUBSCRIBE: send a plain text/US ASCII email to [EMAIL PROTECTED]
                with unsubscribe witango-talk in the message body

Reply via email to