Jump to content

denno020

Members
  • Posts

    761
  • Joined

  • Last visited

  • Days Won

    3

Community Answers

  1. denno020's post in Set width to multiSelect was marked as the answer   
    Is there a reason you're using JS to set the width and not CSS?
     
    It looks like you're targeting the <select> element, but due to the use of some multi-select plugin, the <select> element is actually hidden and will be updated automatically by the plugins' Javascript when you select one of the multi-select items (which are actually just rendered as <li>'s)
     
    Try targeting the element "#ms-multi_categories_list" when setting the width, and you should see things change.
    $("#ms-multi_categories_list").css('width', '1000px'); Ideally, however, you would add this width information to your stylesheet
     
    Denno
  2. denno020's post in auto fill in input tag from date selected was marked as the answer   
    Sure can.. You'll need to put it into a Javascript function, and set that function to run when the input is changed:
    document.querySelector("input[name='date']").addEventListener('change', function(e) {   var dateInput = e.target;   var date = dateInput.value; }) There you will have the date value that they selected.
     
    From there, you create a new instance of the Javascript Date class, passing the date in as a paramater, and then call getDay() on it.. getDay() will return an integer, corresponding to the day of the week, with Sunday = 0 (see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date)
     
    Have a crack at finishing that function off, and if you need more help, let us know.
  3. denno020's post in Auto calculation not happening for dynamic rows was marked as the answer   
    Here you go: https://jsfiddle.net/cwmoo4hm/1/
     
    Turns out the rows you were injecting into the HTML didn't have the classes that you attached your event listener to (.price, .tax, .quantity etc).
     
    There's another issue with the new row that is added, as the new row seems to have an extra input, but at least your calculation is working as you requested
  4. denno020's post in Login redirect seriously acting up was marked as the answer   
    Are you talking about the if statement if($used_paid=='Y')?
     
    If so, have you checked that $used_paid isn't a lowercase y? Because y doesn't equal Y.
     
    Also, is $used_paid a typo? Is it supposed to be $user_paid?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.