Community Forums 

Main Content

external drop down boxes

    Jan 31 2009 17:28:50

    #1

    howard

    Join date : 2008-09-18      Posts : 10

    i was wondering if anyone out there can help me. i have about 100 items but every item is avaiable in about 50 scents
    so i want to have an external drop down box with the scents and have it post with the item choose
    i know to use <select="productpr1">
    but how do i label the scent box if it is one external file that goes to all the products



    Jan 31 2009 18:51:47

    #2

    anon

    Join date : 2008-09-18      Posts : 488

    You don't want to use productpr1 for the scents. Use product1[]. The format is:
    <select name='product1[]'>



    Jan 31 2009 19:07:39

    #3

    howard

    Join date : 2008-09-18      Posts : 10

    ok but if the external file is the same in many places how do i label each area or do i have to make a external file for every area i want it
    goal is to update one file and have it update all the drop down boxes named with the scents



    Feb 01 2009 17:46:36

    #4

    anon

    Join date : 2008-09-18      Posts : 488

    I'm not sure I understand your issue. I'm guessing that maybe you are using addmulti and you want a product1, product2, etc. all to have a scent option.

    If that is the case, put the <select name='productX[]'> on your page and just the options in your external file.

    BTW, the maximum number of items on a single addmulti form is 50.



    Feb 02 2009 07:06:15

    #5

    howard

    Join date : 2008-09-18      Posts : 10

    good to know that i can only do 50 thank you
    so on the external page i go straight to the option tag and put the select tag in the html doc.?
    so it would be something like this in the html am i correct
    <select name="productpr2>
    <option value="11 oz STANDARD JAR*:11.00">11 oz STANDARD JAR</option>
    <option value="15 oz STANDARD JAR*:15.00">15 oz STANDARD JAR</option>
    </select>
    <select name="product2" src="scents.?">
    </select>
    <input name="qty2" type="num" size="4" maxlength="6" value="0"/>



    Feb 02 2009 13:27:15

    #6

    anon

    Join date : 2008-09-18      Posts : 488

    No, it won't go in the select tag. You'll need to use a server side include or php include between the <select name='product2[]'> and </select>. Notice product2[] is an array.



    Feb 02 2009 17:55:36

    #7

    howard

    Join date : 2008-09-18      Posts : 10

    can i use a javascript to do that?
    and where can i go to get the informantion to make this work?



    Feb 02 2009 19:05:36

    #8

    anon

    Join date : 2008-09-18      Posts : 488

    Javascript is another way to do it.

    See: http://webdesign.about.com/od/javascript/ht/htjsincludehtm.htm