Announcement

Collapse
No announcement yet.

Current Date Prompt

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #16
    I have just posted that piece of code into the options we have set up in the order checkout process and it showed the option as weds 22nd oct. Can't you do it as some sort of
    Code:
    <option> javascript code </option>
    ??

    D
    Donna

    Chief bunting supplier to Take That!

    Comment


      #17
      The way the drop down works requires additional code into the <option> tag itself eg <option selected="selected">.... this is proving the tricky part as this is no apparent way to break into the list generating the <option> .... in other lists ListIndex or a UDV can break the iteration and do something different ... these pesky drop downs are not playing by the same rules.


      Bikster
      SellerDeck Designs and Responsive Themes

      Comment


        #18
        I'm not clever enough to play with the java code and the version I have is too long but ... could you embed the java code into the html name for the option in the choice? I know you'd have to put it in each one (choice) but could you get round it that way? I know this wouldn't be the sophisticated way of doing it and obviously I don't even know it would work but as a non techie way of looking at it would that be possible? D
        Donna

        Chief bunting supplier to Take That!

        Comment


          #19
          Alas no as the drop down is for the day / month / year and these are not generated the same way ... if they were I would be laughing.


          Bikster
          SellerDeck Designs and Responsive Themes

          Comment


            #20
            Hi Jont,

            I had asked our developers to look at this based on your original post and they've given me the following javascript:

            Code:
            <script language="javascript" type="text/javascript">
               var date = new Date();
               date.setDate( date.getDate() + 7 );
                    var year = date.getYear();
                    var month = date.getMonth();
                    var day = date.getDate();
                    document.all.Y_<Actinic:Variable Name="ProductID"/>.selectedIndex 
            = year - <actinic:variable name="MinYearValue" />;
                    document.all.M_<Actinic:Variable Name="ProductID"/>.selectedIndex 
            = month;
                    document.all.DAY_<Actinic:Variable 
            Name="ProductID"/>.selectedIndex = day-1;
            </script>
            Put it in the product layout(s) after:

            Code:
            <actinic:variable name="DayList" /><actinic:variable name="MonthList" 
            /><actinic:variable name="YearList" />
            but before the closing block tag.

            This sets the date prompt to today + one week but you can change it where you see '+ 7'. This obviously doesn't account for "or Monday if a Friday etc. etc." but maybe it can be adapted.
            ********************
            Tracey
            SellerDeck

            Comment


              #21
              Thanks for the elbow out of the <select> list and into the product layout - this was the impetus needed


              Bikster
              SellerDeck Designs and Responsive Themes

              Comment

              Working...
              X