Skip to content
Loading
Here if i click on CATEGORY MANAGEMNT i want to glow(Changes the CATEGORY MANAGEMENT COLOR TO WHITE)
0
  • Midhun Tp
    0
    Hi,
    Why can't you just give li an id and add some class to that id on the click function and give style in that class, just like we done in textbox.
    0
  • 0
    without taking id is there any otherway in javascript or jquery??
    0
  • Midhun Tp
    0
    Hi,
    Try this -
    $(document).ready(function () {
    var href = window.location.href.toUpperCase();
    $("ul.treeview-menu > li > a").each(function () {
    if (href.indexOf($(this).attr("href").toUpperCase()) > 0) {
    $(this).parent('li').addClass('someclass');
    }
    });
    });
    0
  • 0
    Sir i have problem in error message..i want to show the error message properly in above code..???
    0
  • Midhun Tp
    0
    Hi,
    I didn't understand. What is the error?
    0
  • 0
    Sir i want to show a error message while no datat in text box(validation)..how??
    HERE IS MY CODE:
    Bash
    if (document.getElementById("").value.trim() == "") { document.getElementById("").innerHTML = "Please enter Category.";  document.getElementById("").focus();  document.getElementById("").classList.add("ErrorControl"); // document.getElementById("").style.outline = '1px solid red'; // document.getElmentById("").style.border = '3px solid red'; return false;  } if (document.getElementById("").value.trim() == "") { document.getElementById("").innerHTML = "Please enter Category Description."; document.getElementById("").focus(); document.getElementById("").classList.add("ErrorControl"); // document.getElementById("").style.outline = '1px solid red'; return false; } }   function checkfunction(val) { if (val != "") {  document.getElementById("").classList.remove("ErrorControl"); // document.getElementById("").style.display = 'none'; document.getElementById("").classList.remove("ErrorControl"); // document.getElementById("").style.display = 'none'; } } script>
    Java
    div class="field"> div id="dvMessage" runat="server" style="color: Red" > div>  Category Name *em> label>  asp:TextBox ID="txtCategoryName" runat="server" CssClass="form-01-control" onkeyup="checkfunction(this.value)" placeholder="Enter Category Name" >asp:TextBox> div> div id="dvMsg" runat="server" style="color: Red"> div>  Category Description *em>label>  asp:TextBox ID="txtCategoryDescription" runat="server" CssClass="form-01-control" onkeyup="checkfunction(this.value)" placeholder="Enter Category Description">asp:TextBox> div>  Parent Category label>  asp:DropDownList ID="ddlParentCategory" runat="server" Width="250px" class="form-01-control"> asp:DropDownList> div>  Category Imagelabel>  asp:FileUpload ID="fuImage" runat="server" /> asp:Image ID="imgCategory" Width="100" Height="100" runat="server" /> div> div>
    0
  • 0
    WILL SHOW A PROBLEM TAHT IF THERE IS TEXT AVAILABLE IN TEXTBOX ALSO SHOW THE ERROR MESSAGE
    0