w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
validation for drop down menu
You should disable your link in addition to button. This code should work: $(function() { var button = $('.submit_small').prop('disabled', true), link = button.find('a'); $('#country').on('change', function(event) { if (event.currentTarget.value != '') { button.prop('disabled', false); link.off('.quiz'); } }); link.on('click.quiz', function(event) { if (button.prop('disabled')) { event.preventDefault(); } }); }) Example on jsfiddle: http://jsfiddle.net/ant_Ti/hYNxs/

Categories : Javascript

Do I still have to use JQuery to populate my second drop down menu even if the values are the same as the first drop down menu?
I would try to convert all that logic into a single query that returns all the data you need at once. Then pass it to a JavaScript variable and play around 100% client-side. No need to hammer your DB constantly for something this simple.

Categories : PHP

Php drop down menu. If value exists in mysql, it is the selected value in drop down menu
Very difficult to read.. there might be an extra bracket or a bracket missing but ... foreach ( $transaction_type as $i => $opt1 ) : $option = '<option value="' .htmlspecialchars($opt1) .'"'; if(($result[VatReturnTransactionType01] != '' AND htmlspecialchars($opt1) == htmlspecialchars($result[VatReturnTransactionType01])) OR htmlspecialchars($opt1) == htmlspecialchars($_POST['transaction_type'][$i])) { $option .= 'selected'; } $option .= '>'.htmlspecialchars($opt1) .'</option>'; endforeach;

Categories : PHP

css drop down menu :: sub menu is appearing within main menu after hover
You have to make some changes in the code. Fiddle css .menu{ width:70%; background:green; position:relative; } .menu ul{list-style:none;} .menu ul li{ margin-left:20px;position:relative; float:left} .menu ul ul{display:none;} .menu ul li:hover ul{display:block; background:black; position: absolute; margin: -2px 0 0 0; z-index: 11110;} .menu ul li:hover ul li{ float:none; height:20px; } Updated Fiddle Changes: display: inline-block; occupies the combined width of the inner container. position:relative; using it in menu will cause increase in the height of the outer container. you can read it at w3school

Categories : HTML

Javascript 3 drop down menus. On change of one drop down menu set default value for other two drop down menus. Need optimization
here is my solution. Much simpler. However, I have change to html layout as well. HTML update: (have onchange in select tag) <select id="month_id" name="monthid" onchange="update_other_dd ( 'month_id' )"> ... <select id="quarter_id" name="quarterid" onchange="update_other_dd ( 'quarter_id' )"> ... <select id="halfyear_id" name="halfyearid" onchange="update_other_dd ( 'halfyear_id' )"> ... Javascript update: (reduced to 9 lines) var dd_array = ['month_id', 'quarter_id', 'halfyear_id']; function update_other_dd ( dd_id ) { for(i=0;i<dd_array.length;i++){ if(dd_array[i] != dd_id){ var array_to_reset = document.getElementById( dd_array[i] ); array_to_reset.options[0].selected = 1; } } }

Categories : PHP

Drop down menu using .load; JavaScript using PHP generated Drop down issues
Change the below function. Appending "+" is missing in this function function udLoad(sel){ var value = sel.value; alert(value + ' page selected'); $('#result').load('devUpdates/'value' #container'); } to function udLoad(sel){ var value = sel; alert(value + ' page selected'); $('#result').load('devUpdates/' + value +' #container'); }

Categories : PHP

PHP while, foreach drop down menu the same selected value in all drop dow menus
foreach ($entry_id_selector_topic as $entry_id_selector_i=>$entry_id_selector_topic_value ) : echo (($i1 == $entry_id_selector_topic_value)? 'selected' : ""); endforeach; This part is not correct, your name should be <select name="entry_id_selector[$counter]"> you shouldn add another array if multiple values are impossible, then you should do so if ($entry_id_selector_topic[$counter] == $i) echo ' selected '; Giving, such a long names its not preferable. Also you can write foreach ($entry_id_selector_topic as $entry_id_selector_topic_value ) :

Categories : PHP

Show previous visited drop down menu item color different than other menu items.
If I understand your question correctly then you want to use the :visited selector in your css. Hard to give specifics without you providing some code, but this is the general idea: a:visted { color: orange; } You can go Here for an example. That link also contains examples for other related selectors which might be useful to you, such as :hover

Categories : CSS

Clicking on a list item containing sub menu in a drop down menu, closes the rest but doesn't expand the new one
Made a little change here: http://jsfiddle.net/JWMarchant/nUrjy/7/ Simplified the code to this: $('#main-navigation a').click(function (e) { /* Finding the drop down list that corresponds to the current section: */ var dropdownMenu = $(this).next(); if ($(this).parent('li').children('.sub-menu').length > 0) { $('.sub-menu').not(dropdownMenu).not(dropdownMenu.parents()).slideUp('fast'); $(dropdownMenu).slideToggle('fast'); } });

Categories : Javascript

Drop Down CSS menu children showing up over parent menu option
It is because your submenu has position:absolute;, which defaults to top:0. Try this CSS: #menu ul li { height:50px; } #menu ul ul { position: absolute; top:50px; left:0; } Notice I gave the top menu items a specific height, so that you could place the submenu that exact height from the top. Also, notice I gave both a top and left declaration for the submenu; proper position:absolute; usage requires both an X and Y placement. Browsers have default of 0 for both, but animations on Firefox will bork if you don't have both declared explicitly. Side Note I don't have a lot of time to go into everything, but you should really give your items a class and use the class as a selector, rather than rely on all that parent child crap. It would make your CSS something like this:

Categories : CSS

How to add options tabbed menu to mega drop-down menu?
It is because you have tabbable element inside navbar, and some of css styles referring to tabs are corrupted by navbar styles. Try adding this style: .navbar .tabs-left>.nav-tabs>li { float: none; } And search for other styles that gets corrupted. Although this could not be all that is not working well.

Categories : Jquery

How to move drop down menu, menu to the left?
Try to put the menu in a div container and Then set this container float:left; Or you could set width and use margin:0 auto;to center it. And you need to delete the position: absoulte;from .head_menu http://jsfiddle.net/Ucvbu/

Categories : HTML

CSS3 (Drop down menu) second Sub-menu doesn't appear
You have to wrap your li around the sub-nav ul. You can't just chuck a ul in a ul. It goes ul > li > ul > li That's part of your problem. Edit: Also, get rid of all those browser-prefixes. Those things are bad news. Pretty much anything cool you want to do with your CSS, all modern browsers support. There are exceptions. This site is your friend: http://caniuse.com/ If a browser doesn't support something you're doing, my suggestion is to make it work in that browser, but as far as it looking awesome - not necessary. They have an old/bad browser. They are used to things not looking awesome.

Categories : HTML

Drop down menu items won't drop down
Try removing #menu ul li ul li { display: none; } and adding ul.column-1 li ul { display:none; } ul.column-1 li:hover ul { display:block; } Heres a js-fiddle http://jsfiddle.net/tousif123/brBj5/

Categories : HTML

How to add drop down menu using CSS?
Better to use jQuery plugin like Superfish http://users.tpg.com.au/j_birch/plugins/superfish/ //link to the CSS files for this menu type <link rel="stylesheet" media="screen" href="superfish.css"> // link to the JavaScript files (hoverIntent is optional) // if you use hoverIntent, use the updated r7 version (see FAQ) <script src="hoverIntent.js"></script> <script src="superfish.js"></script> // initialise Superfish <script> jQuery(document).ready(function(){ jQuery('#menu ul').superfish(); }); </script>

Categories : CSS

Validation of a drop down list in PHP
In addition to checking if the variable is set, you need to check if it's not empty: if (!isset($_POST['cboproduit']) || $_POST['cboproduit'] === '') { $message .= "Vous devez sélectionner un téléphone <br />"; }

Categories : PHP

Add row to drop down menu that comes from a datasource?
You need to handle the DataBound event of the dropdown list (which occurs after all of the values from the database have been put into the dropdown list), like this: Markup: <asp:DropDownList ID="searchApplicationDropDown" runat="server" DataSourceID="SqlDataSource8" DataTextField="AppName" DataValueField="PK_Application" OnDataBound="searchApplicationDropDown_DataBound"></asp:DropDownList> Code-behind: protected void searchApplicationDropDown_DataBound(object sender, EventArgs e) { DropDownList list = sender as DropDownList; if (list != null) { list.Items.Insert(0, "--Select One--"); } }

Categories : C#

drop-down menu with errors
You can use: .sub-menu { position:absolute; } So that the sub menus are taken out of the page flow. Their top and left positions are default to where they'd be in the regular page flow, but they will no longer push down the page nor extend their nav container. You will have to style them accordingly after this change. That is, the parent li's padding still pushes them to the right while they use the default top/left positions. You may give the sub menus a negative margin, or more cleanly, remove the padding from the li and wrap their heading text into an element with padding e.g.: <li class="menu_li show-sub-menu"> <span>Veículos</span> <ul class="sub-menu"> <li><a href="#">Estoque</a></li> <li><a href="

Categories : Jquery

drop down menu won't go horizontal
li { width: 850px; //<-- This is your problem. margin:0px auto 0px auto; } If you remove the width the li-elements will float next to each other, until there isnt anymore room for it to float, then it will break onto a new row.

Categories : HTML

drop down menu html
Try This <select> <option value="">Select an Option</option> <option rel="othervalue1" value="one">Option 1</option> <option rel="othervalue2" value="two">Option 2</option> </select>

Categories : HTML

Drop Down Menu "Mouseleave"
try this http://jsfiddle.net/eANHr/1/ $(document).ready(function () { $("a[id*='DropDown_Menu_ID_']").hover(function () { var DropDown_ID = $(this).attr("id"); var ID_Split = DropDown_ID.split('_'); var Box_Data_ID = ID_Split[3]; var Button_Value = $('#DropDown_Menu_ID_' + Box_Data_ID).attr("value"); $('#DropDown_Box_ID_' + Box_Data_ID).show(); }) $("a[id*='DropDown_Menu_ID_']").mouseleave(function () { var DropDown_ID = $(this).attr("id"); var ID_Split = DropDown_ID.split('_'); var Box_Data_ID = ID_Split[3]; $('#DropDown_Box_ID_' + Box_Data_ID).hide(); }); });

Categories : Javascript

Drop down menu with different background
Through CSS, the best way is to give you heading li tag an id and set all li items colors except the heading as red. However, if you want to do this as the headings change, and in your JavaScript, you could keep track of which list item is the "head" and every time "head" changes, change the background colors accordingly.

Categories : HTML

Android drop down menu
Spinners are available in LC: http://forums.runrev.com/phpBB2/viewtopic.php?f=53&t=14543 But they may be overkill for your needs. Have you thought about using a set of grouped buttons? Combined with a "move" command you can add the animation. Simon

Categories : Android

Issues with drop down menu only on IE9
The problem is that IE9 does not support css transitions. On all other browsers, when you mouse over RECENT PAGES, you will have .3 seconds (as defined in your css) to reach the submenu before it disappears, and once reached it won't disappear. Since IE9 does not support transform, you basically have 0 seconds until you mouse over the submenu. So the only way to fix this in IE9, is to have the submenu touching the link RECENT PAGES. If you add in #meta_menu > ul > li > ul the following margin-top: -30px; padding-top: 30px; You will see what I am talking about. Of course this code will mess with the design of the submenu, but you can accomplish the same by using a container around the UL having the same effect.

Categories : HTML

drop down menu trouble
This line is useless : document.find('ul').style.display = 'block'; in : meni.on('mouseenter', 'li', function(){ document.find('ul').style.display = 'block'; ($(this).find('ul').stop().slideDown('fast')); }) Try to comment It, this should work. And for esthetic matter: nav ul.top_nav_lv2{ top:80px; }

Categories : PHP

How to center drop down menu?
adding a width to your ul li centers the child nav. working fiddle here: http://jsfiddle.net/ktFJg/ .nav ul { font-size:12px; width:1140px; text-align:center; display:table; } .nav ul, .nav ul li { float:none; } .nav ul li { margin-left:20px; width:100px; } .nav ul li ul { text-align:left; display:-inline-block; border:none; } .nav li { float:none; display:inline-block; display:table-cell; vertical-align:middle; color:#000; } .nav ul li a, nav ul li a:active { color:#000; } .nav ul li a:hover { color:#c0c0c0; }

Categories : HTML

CSS drop down menu styling
Try this (nav-menu-gaming.css:113) .menu > li:hover in place of .menu li:hover From nav-menu-gaming.css:126, change .products a to .products > a

Categories : CSS

IE Drop menu not working
I have checked with your code and it is working in my system. I have checked in IE7,8 and 9. Another suggestion just change below css and check again: I have just changed from "ul#menu li ul.sub-menu:hover" to "ul#menu li:hover ul.sub-menu" ul#menu li:hover ul.sub-menu { display:block; color: #573A2F; z-index:100001; }

Categories : PHP

CSS navigation drop down menu
This might help: #nav li .sub-menu:hover, #nav li:hover .sub-menu { background: #cbf68d; border: #000 solid; border-width: 1px; display: block; position: absolute; left: 100px; }

Categories : CSS

CSS Drop Down Menu Not working
JSFIDDLE screen capture: Use correct HTML buddy: <ul id="navmenu"> <li><a href="#">Hyperlink 1</a></li> <li><a href="#">Hyperlink 2</a> <ul id="sub1"> <li><a href="#">Hyperlink 2.1</a></li> <li><a href="#">Hyperlink 2.2</a></li> </ul> </li> <li><a href="#">Hyperlink 3</a></li> <li><a href="#">Hyperlink 4</a></li> </ul> And, add this CSS: li ul{ display:none; } li:hover ul{ display:block; }

Categories : CSS

Drop down menu on UITextField?
I have done what you are trying to do and used ActionSheetPicker. I extended it and added an ActionSheetMultiPicker, but it sounds like the single component would work for you. This works really well and results in a nice ActionSheet style picker that is presented from the bottom. Also, I used the following to set a current property that I then resigned first responder in the method that instantiated the ActionSheetPicker. - (BOOL)textFieldShouldBeginEditing:(UITextField *)textField { curTextUIObject = textField; return YES; } I then wired up the editingDidBegin to an IBAction for presenting the ASPicker: - (IBAction)relationshipPickerButtonPressed:(id)sender { [curTextUIObject resignFirstResponder]; [ActionSheetStringPicker showPickerWithTitle:@"Select Relations

Categories : IOS

Drop Down Menu Stacking
Write it in a page called A.html. On every page where you want to put it, use an <iframe src="A.html"> Make sure you remove the borders of the <iframe>, and also the scrollbars and make it look natural

Categories : HTML

drop down menu bootstrap
There are so many ways that dont work well. You can visit and try implementing the code as in http://jsfprimefacesblog.blogspot.com/2012/05/bootstrap-multilevel-dropdown-menu.html

Categories : HTML

Validation of a single select drop down in MVC 4
You could try two approaches, firstly [Required, Range(1, Int32.MaxValue)] public int SingleSelect { get; set; } or change your SelectList: ViewBag.SingleSelectList = new SelectList(new[] { new {ID="0",Name="-- Select --", Value=""}, new {ID="1",Name="Select 1"}, new{ID="2",Name="Select 2"}, new{ID="3",Name="Select 3"}, }, "ID", "Name", 0);

Categories : C#

I can't get my Drop Down menu show the in two lines
You can just wrap the contents of the <a>s in a <span>, like: <li><a href="#"> <span><span>Very very very long Sub-Category 3</span></span> </a></li> Then in your CSS add something like this: .supplier_top_link li ul li a span { width: 150px !important; display: inline-block; } and probably remove the "height" attribute of the <a>s to look nicer: .supplier_top_link li ul li a { ... /* height: 28px; <-- Remove this */ ... See, also, this live example.

Categories : HTML

Drop down menu image next to object
Prepend with image html markup? if($(this).next().find(".current").html() != null){ $(this).prepend( $('<img />').attr({ 'src': 'plus.gif', 'alt': '', 'height': '25' }) ); } else { $(this).prepend( $('<img />').attr({ 'src': 'minus.gif', 'alt': '', 'height': '25' }) ) }; Edit: I have only just noticed you check html substring 1 for + or -. You could just add an id attribute to those images above and check the length of the element.

Categories : Javascript

Trying to hide my drop down menu in default
Add a css rule .user-account { display: none } or hide it using jQuery on page load jQuery(function(){ var $ua = jQuery('.user-account').hide(); //cache the selector since it is used multiple times jQuery(".hoverli").hover( function () { $ua.slideDown('slow'); }, function () { $ua.slideUp('slow'); } ); });

Categories : Jquery

Unique values for drop-down menu
Create a new dataset with below query: select DISTINCT temp.Warehouse from ( SELECT DISTINCT Site, Warehouse FROM T1 UNION SELECT DISTINCT Site, Warehouse FROM T2 UNION SELECT DISTINCT Site, Warehouse FROM T3 ) temp Pass this query to availible values in parameter properties of "Warehouse" if needed give in default values also.

Categories : SQL

css drop down menu not working on hover
As I said in comments, your code works fine in IE9. The reason, press F12 to get developer tools and change the document type. As you said it is in Quirks mode !-- Force IE to use the latest version of its rendering engine --> <meta http-equiv="X-UA-Compatible" content="IE=edge"> By telling IE to use the latest version of its rendering engine in your page. Incase if your user has only IE8 browser? This will certainly fails. You can check this in MSDN Library. Hope you understand.

Categories : CSS

Mobile compatible drop down menu
If you want to do this with pure javascript and css, in nutshell, this is what you need to do: override touchstart and touchend event on whole navigation navigation.addEventListener("touchend", function (e) { e.preventDefault(); // other code here }, false); In this point you have to add code to open navigation. Note that any links in navigation wont work at this point. handle every link click (or second link click on navigation main item) with javascript and use window.location.href = link.url; to navigate throw pages. I hope this helps even if its not much. You can also check already made libraries if there is any help there. One last tip: check newest iOS default behavior on drop-down menus and try to imitate functionality there. Good luck! :)

Categories : HTML



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.