Search Results

Search found 54311 results on 2173 pages for 'right click menu'.

Page 67/2173 | < Previous Page | 63 64 65 66 67 68 69 70 71 72 73 74  | Next Page >

  • on click checkbox set input attr

    - by Tommy Arnold
    html form with 4 columns the first 2 columns are the sizes inside input boxes with disabled ='disabled', when they click radio button to select a size a checkbox appears, when they click that checkbox I would like to change the class and disabled attr of the inputs on that table row to allow them to edit the input box <table width="388" border="1" id="product1"> <tr> <td width="100">Width</td> <td width="100">Height</td> <td width="48">Price</td> <td width="65">Select</td> </tr> <tr> <td><input type="text" disabled='disabled'value="200"/><span> CMS</span></td> <td><input disabled='disabled'type="text" value="500"/><span> CMS</span></td> <td>£50.00</td> <td><input type="radio" name="product1" value="size1" /> Customise<input type="checkbox" name="custom[size1]" class="custombox" value="1"/></td> </tr> <tr> <td>200</td> <td>1000</td> <td>£100.00</td> <td><input type="radio" name="product1" value="size2" /> Customise<input disabled='disabled' type="checkbox" name="custom[size2]" class="custombox" value="1"/></td> </tr> <tr> <td>200</td> <td>1500</td> <td>£150</td> <td><input type="radio" name="product1" value="size3" /> Customise<input type="checkbox" name="custom[size3]" class="custombox" value="1"/></td> </tr> </table> <table width="288" border="1" id="product2"> <tr> <td width="72">Width</td> <td width="75">Height</td> <td width="48">Price</td> <td width="65">&nbsp;</td> </tr> <tr> <td>200</td> <td>500</td> <td>£50.00</td> <td><input type="radio" name="product2" value="size1" /> Customise<input type="checkbox" name="custom[size1]" class="custombox" value="1"/></td> </tr> <tr> <td>200</td> <td>1000</td> <td>£100.00</td> <td><input type="radio" name="product2" value="size2" /> Customise<input type="checkbox" name="custom[size2]" class="custombox" value="1"/></td> </tr> <tr> <td>200</td> <td>1500</td> <td>£150</td> <td><input type="radio" name="product2" value="size3" /> Customise<input type="checkbox" name="custom[size3]" class="custombox" value="1"/></td> </tr> <table> CSS input[type=checkbox] { display: none; } input[type=checkbox].shown { display: inline; } input .edit{ border:1px solid red; } input[disabled='disabled'] { border:0px; width:60px; padding:5px; float:left; background:#fff; } span{float:left; width:30px; padding:5px;} Jquery $("body :checkbox").hide(); // The most obvious way is to set radio-button click handlers for each table separatly: $("#product1 :radio").click(function() { $("#product1 :checkbox").hide(); $("#product1 .cbox").hide(); $(this).parent().children(":checkbox").show(); $(this).parent().children(".cbox").show(); }); $("#product2 :radio").click(function() { $("#product2 :checkbox").hide(); $("#product2 .cbox").hide(); $(this).parent().children(":checkbox").show(); $(this).parent().children(".cbox").show(); }); This is what I thought but its not working $("#product1 :checkbox").click(function(){ $(this).parent("tr").children("td :input").attr('disabled',''); $(this).parent("tr").children("td :input").toggleClass(edit); }); $("#product2 :checkbox").click(function(){ $(this).parent("tr").children("td :input").attr('disabled',''); $(this).parent("tr").children("td :input").toggleClass(edit); }); Thanks in advance for any help.

    Read the article

  • "Run As Administrator" on program right click failing and not launching program

    - by GONeale
    This problem lies within a relatively fresh x64 Windows 7 install ~4 weeks, but is also a problem I have seen on Windows Vista machines (x86 versions). Since the other day, any programs attempted to be launched via right clicking on a shortcut (.lnk)'s context menu and pressing - "Run As Administrator" for instance, in the Quick Launch/Jump List in Windows 7 has failed, screen has not dimmed, no UAC popup. In fact the program does not even load. There is no way around this unless I use the shortcut version from "All Programs" which appears to work, very strange? I have performed no major software installs, nothing out of the ordinary. Has anybody encountered this or know what would be causing it? Here's an example of somebody else experiencing this problem in Vista with no solution: http://www.vistax64.com/vista-general/131918-strange-run-administrator-problem.html and I believe this problem is related, I also cannot right click - "Manage" on my computer): http://windows7forums.com/windows-7-support/5501-run-administrator-broken.html I am running the latest version of Avira AntiVir Virus Scanner and pretty concious of what I download, I don't think it is a virus, nor do I believe it is due to the RC Version of Windows 7, because I have seen the problem across multiple Operating Systems versions. Thanks guys.

    Read the article

  • Outlook 2007 - Right Click Email > Move To {Folder Name}

    - by HK1
    I know it seems like an elementary question. What's the simplest and fastest way to move a read/completed email to a different folder in Outlook 2007 (connected to Exchange 2007)? I have a particular user that is challenged by technology. Using keyboard shortcuts is not an option. Dragging and dropping things - forget it. And too many clicks is frustrating to him. He keeps his email inbox completely clean (OCD=True) but he does that by deleting every single email as quickly as he's done with it. If an email can't be resolved in a day or two it almost drives him to insanity. As far as he's concerned, there's only one right thing to do with an email - reply to it and then delete it. He's being asked to save emails unless they are clearly trash. I'm trying to figure out what the simplest method is to move an email to a "Saved Emails" or "Archived" folder (don't confuse "folder" with .PST file, that's irrelevant for this discussion). I envisioned that I could possibly hi-jack every delete and put the email in his Saved folder. But I don't like this option because some emails are truly trash and I don't want him saving those. What I'd really like to do is something like this: Right Click Email in List > Move To {Folder Name} Is there a simple way to do this? Maybe someone has another suggestion on how to handle this situation.

    Read the article

  • Windows Explorer Hangs on Right-Click

    - by Bryan
    I am not sure if this is the right site to post this one as I typically post coding questions on stackoverflow. But I'll ask anyways and hopefully someone can move it if it's incorrect. Currently I have a customer built PC, utilizing an Intel i7 chip, 1300WATT PSU, 8Gigs of RAM, and two video cards. Originally I had the one video card (NVIDIA) that used the PSU and had two DVI output. After purchasing a third monitor I installed another ATI) graphics card not needed any PSU connectors. After installing and restarting, I noticed that when I right-click on my desktop, or through Windows Explorer it will hang, freeze then restarted. Sometimes after Windows Explorer restarts the problem dissipates. I checked to make sure everything was connected properly and it was. I repaired the ATI Catalyst Control Center to see if that had an issue, and I checked to see if either video card required updated drivers. Nothing worked. I tried restarting my PC and that didn't work. I tried using ShellXView (I forgot what it's actually called) and tried closed processes but that didn't work. Does anyone have any idea what could have caused this orpossible solutions I should try?< Thanks in advance.

    Read the article

  • Content Container Overlaps Menu?

    - by Harold
    I'm currently working on a Joomla template using CSS divs. I have a header set up with our logo image in a div floated to the left, an adspace floated to the right, and the menu bar on the bottom. My content is divided into three div columns that are contained in "container.": the left column is floated left, the center is not floated, and the right is floated to the right. The problem is the "container" for the three content divs is overlapping the menu, as you can see in this image: http://www.ndpstudentcouncil.org/images/shot1.png Here's the HTML code: > <body> <div id="backdrop"> <div > id="wrapper"> <div id="header"> > <div id="topimage"> </div> > <div id="adspace1"><jdoc:include > type="modules" name="Ad Space #1" /> > This will be the location for our > "newsflash" items. </div> > > <div id="ddtopmenubar" > class="mattblackmenu"> > <ul> > <li><a href="http://www.ndpstudentcouncil.org">Home</a></li> > <li><a href="http://www.dynamicdrive.com/new.htm" rel="ddsubmenu1">DHTML</a></li> > <li><a href="http://www.dynamicdrive.com/style/" > rel="ddsubmenu2">CSS</a></li> > <li><a href="http://www.dynamicdrive.com/forums/">Forums</a></li> > <li><a href="http://tools.dynamicdrive.com/" > rel="ddsubmenu3">Web Tools</a></li> > </ul> > <script type="text/javascript" src="js/ddlevelsmenu.js"> > ddlevelsmenu.setup("ddtopmenubar", "topbar") > //ddlevelsmenu.setup("mainmenuid", > "topbar|sidebar") > </script> > <ul id="ddsubmenu1" class="ddsubmenustyle"> > <li><a href="#">Item 1a</a></li> > <li><a href="#">Item 2a</a></li> > <li><a href="#">Item Folder 3a</a> > <ul> > <li><a href="#">Sub Item 3.1a</a></li> > </ul> > </li> > <li><a href="#">Item 4a</a></li> > <li><a href="#">Item Folder 5a</a> > <ul> > <li><a href="#">Sub Item 5.1a</a></li> > <li><a href="#">Item Folder 5.2a</a> > <ul> > <li><a href="#">Sub Item 5.2.1a</a></li> > <li><a href="#">Sub Item 5.2.2a</a></li> > </ul> > </li> > </ul> > </a> > </li> > <li><a href="#">Item 6a</a></li> > </ul> </div> </div> > <div id="container"> <script language="javascript"> > matchHeight=function(){ > var divs,contDivs,maxHeight,divHeight,d; > // get all <div> elements in the document > divs=document.getElementsByTagName('div'); > contDivs=[]; > // initialize maximum height value > maxHeight=0; > // iterate over all <div> elements in the document > for(var i=0;i<divs.length;i++){ > // make collection with <div> elements with class attribute > 'container' > if(/\bcontainer\b/.test(divs[i].className)){ > d=divs[i]; > contDivs[contDivs.length]=d; > // determine height for <div> element > if(d.offsetHeight){ > divHeight=d.offsetHeight; > } > else if(d.style.pixelHeight){ > divHeight=d.style.pixelHeight; > } > // calculate maximum height > maxHeight=Math.max(maxHeight,divHeight); > } > } > // assign maximum height value to all of container <div> elements > for(var i=0;i<contDivs.length;i++){ > contDivs[i].style.height=maxHeight; > } > } > // execute function when page loads > window.onload=function(){ > if(document.getElementsByTagName){ > matchHeight(); > } > } > </script> <div id="left"> > <jdoc:include type="modules" name="left" /> </div> <div > id="middle"> > <jdoc:include type="component" /> </div> <div id="right"> > <jdoc:include type="modules" name="right" /> > </div> > </div> > <div id="footer" class="clear"><jdoc:include > type="modules" name="footer" /> > &copy; 2010 NDP Student Council<br > />Website Development Subcommitee > </div> </div> </div> </body> The CSS: > #backdrop { width:100%; height:100%; background: #FFFFFF > url(../images/gradient.jpg) repeat-x; > } > > #wrapper { margin:auto; width:95%; height:95%; border-right:thick solid > black; border-bottom:thick solid > black; border-top:thick solid black; > border-left:thick solid black; > background-color:white; } > > #header { height:131px; width:100%; background-color: #FFFFFF; > border-bottom:thick solid black; } > > #topimage { float:left; height:131px; width:63%; > background-image: > url("../images/ndps2.png"); > background-repeat:no-repeat; } > > #adspace1 { float:right; width:27%; height:131px; } > > #container { clear:both; } > #left{ width:20%; float:left; padding:5px; text-align:center; } > > #middle{ width:60%; padding:5px; text-align:center; } > > #right{ float:right; width:20%; padding:5px; text-align:right; } > #footer { border-top:thick solid black; width:100%; > text-align:center; } .clear { > clear:both; } Here is the CSS for the menu itself, which is from DynamicDrive.com: > .mattblackmenu ul{ margin: 0; padding: > 0; font: bold 12px Verdana; > list-style-type: none; border-bottom: > 1px solid gray; background: #414141; > overflow: hidden; width: 100%; > clear:both; } > > .mattblackmenu li{ display: inline; > margin: 0; } > > .mattblackmenu li a{ float: left; > display: block; text-decoration: none; > margin: 0; padding: 6px 8px; /*padding > inside each tab*/ border-right: 1px > solid white; /*right divider between > tabs*/ color: white; background: > #414141; Thanks for the help!

    Read the article

  • Windows Live Family Safety Service keeps closing Start Menu

    - by Jim McKeeth
    Got my kids a new Toshiba Laptop for Christmas. I was setting it all up for them so it would be ready to go. Tonight I installed Windows Live Family Safety Parental Controls. In the process of testing I discovered that on all the accounts the Start Menu closes automatically within 3 seconds (or less) of opening. It seems that it happens every 3 seconds, so sometimes it is immediate, and if I open it again then it will stay open for a full 3 seconds. This of course is rather annoying, and I need to wrap it up so it is ready to go under the tree. I disabled the Windows Live Family Safety Service, and that fixed it. Enable it again and the behavior returns. Is this a feature of the service? Can I disable that feature and keep the other features?

    Read the article

  • After restart desktop totally black, taskbar visible, can't click items in Windows Explorer

    - by Abel
    Situation: Windows Vista, latest updates. After restarting to complete an installation, I find myself looking at a totally black windows desktop without any icons. The start menu and taskbar, including quickstart icons, appears. Some, but not all task bar tray icons appear. The systems seems stable. When I open Windows Explorer and click "desktop" in the folder treeview, the cursor immediately jumps back to the previously selected item. No error. Same when clicking on my user's profile or my documents. When I try "save as" in, say, Notepad, nothing happens, the dialog box (which defaults to "my documents") doesn't even show. Again, no error. Nothing serious afaict in the event log. Typing something in Start Search shows "Search failed to initialize". Most programs, including Internet Explorer, Firefox etc work as expected. Anybody ever encountered such abomination?

    Read the article

  • Cannot find the "Create Network" menuitem in the WiFi icon menu in Mountain Lion

    - by Chuancong
    I am using Mountain Lion Developer Preview 2. I cannot find the "Create Network" menuitem in the WiFi icon menu in the menubar. It was there before when I was using Lion. It started missing since I upgraded to Mountain Lion Developer Preview 1. By the way, is there any other method to create an ad-hoc WiFi network on OS X? I tried to use Internet Sharing via WiFi, but other devices using the shared connection could not find the Mac in their local networks. I am using an early 2011 MacBook Pro 15'. Thanks.

    Read the article

  • Ubuntu 9.10 LiveCD stalls after "Install Ubuntu" selected from boot menu on eMachines

    - by nicorellius
    I am trying to install Ubuntu 9.10 from the ISO on a CD (it needs to be this version) on an eMachine with a brand new Seagate hard disk. The CD boots OK, and I choose the language. Then I am presented with the boot menu: Try Ubuntu Install Ubuntu etc I have tried the top two choices several times (trying Ubuntu and installing it), but each and every time the installation stalls and the disc stops spinning right after I hit enter after choosing the option I want. I have tried different CD/DVD drives, changing the jumpers on both CD drives, different hard drives, and nothing works. Maybe there is a BIOS setting that is choking the installation? Any help would be appreciated. Edit - I just tried running the hard drive as the master on the primary IDE and the CD drive as the slave on the primary with the same results. Maybe flash the BIOS?

    Read the article

  • Adobe Encore CS4 DVD Menu Button Not Functioning

    - by jchapa
    Hello, I've built a DVD in Adobe Encore CS4, and everything works great in the preview. However, when I go and burn to DVD, we have one issue. On the DVD menu, there are two text buttons, with no background when unselected, and have a background when selected. That allows the user to know which is selected. Like I said, everything works great in the preview, but the background that is supposed to appear when the button is selected does not. The buttons work, but there is no background when selected. Any ideas? Thanks, Jack

    Read the article

  • Blank screen after grub menu

    - by Tim
    I just rebooted an Ubuntu Server 10.04. After choosing boot options in the grub menu, though, it just displays a black screen with the blinking white underscore in the upper-left corner. The machine has had (hardware) trouble with networking before, but the problem remains after 10 minutes, so I don't think it's the problem now. Booting into recovery mode or using earlier kernels yields the same problem. This also happens if I boot from another hard-drive. I haven't yet tried to boot from CD as the machine lacks a CD reader. How should I diagnose the problem? Update: My boot options are: recordfail insmod ext2 set root='(hd0,1)' search --no-floppy --fs-uuid --set 567[redacted] linux /boot/vmlinuz-2.6.32-29-generic root=UUID=567[redacted] ro quiet splash initrd /boot/initrd.img-2.6.32-29-generic Update: Also, I cannot access the virtual terminals (ctrl+alt+Fn).

    Read the article

  • Booting ubuntu from usb hdd: GRUB menu not shown

    - by emanemos
    Hello, could anyone help me to boot ubuntu-9.04 from usb hard disk? This disk contains /boot primary partition. During ubuntu installation I used "Advanced" button and asked to install GRUB to the /boot partition. Later I checked whether GRUB files are really present in this partition. They are. However, I get stuck while trying to boot. The boot menu ("ubuntu generic version", "ubuntu recovery mode", etc...) is not shown. Instead I am thrown to GRUB minimal bash-like version. I feel at a loss and have no idea why I am pointed to this minimal version. Can anybody prompt me what to do?

    Read the article

  • Devices menu - project to second screen with only one monitor

    - by Jacob Palmer
    So I made a huge blunder. In the devices menu on Windows 8, I selected to project to a second screen only on accident. I had two monitors connected but only the primary one was actually displaying anything. So I projected it and now I can't access anything. The primary screen will show the windows icon when it loads, but then it disappears and I can't login or anything. Surely there's a way to get it back on the primary screen? Thanks a bunch. I'm really lost..

    Read the article

  • How to remove IE toolbar and menu bar

    - by Metallikanz
    We have a asp.net web application which will be used in an intranet environment on IE 6. We want to change the default configuration of the browser so that it's always rendered without the Tool Bars, Menu Bars and Address Bar, just the browser window frame and the status bar should be present. We were looking at the IEAK toolkit for IE6 but it doesn't seem to have the option of turning all this off though you can turn off certain menus and toolbar options. Any ideas of how this can be done, is there a group policy setting or something that we can utilize here to get this done? Thanks for your help.

    Read the article

  • Customising Windows 8 Start Screen Tiles

    - by Joe Taylor
    We are looking for an effective way to manage the start screen in Windows 8. So far using WSIM we can add certain start tiles by using the OOBE System - shell setup - SquareTiles and WideTiles properties. However this only seems to work for square tiles and not wide tiles, if anyone has any insight on this it would eb appreciated. However the main question is has anyone managed to modify this screen using a GPO, we can add application shortcuts to the Start menu list on the All Apps page using a create shortcut to all users start menu policy. However as we occasionally deploy apps throughout the year in line with the courses requirements we would want to be able to put a shortcut on the home screen. Is it possible?

    Read the article

  • All program links (icons, menu items) try to use Adobe Reader to run them

    - by Rob
    My mother was opening Internet Mail to check her mail on her new Windows 7 PC and a pop-up window asked her if she wanted to use Adobe Reader as the default program instead. She must have clicked yes. Now all of the Start Menu and Desktop icons have the adobe logo and appear to try and use adobe to execute the programs. Has anyone encountered this and were they able to fix it? She tried to associate another program and ended up having the Internet Explorer icon and program replacing the Adobe icons. This woman can tear up a steel ball with a rubber mallet.

    Read the article

  • Zend_Nav in zend framework issue getting menu to show up

    - by Kalle Johansson
    Hi ! First time of here, so please bare with me. I have to following problem, using zend framework, specifically zend_nav to create a reusable menu to be passed in via the layout/layout.phtml page. These are the code fragments in their respective files. first of in application/configs/navigation.xml, <configdata> <nav> <label>Home</label> <controller>index</controller> <action>index</action> <pages> <add> <label>Add</label> <controller>post</controller> <action>add</action> </add> <login> <label>Admin</label> <controller>login</controller> <action>login</action> </login> </pages> </nav> </configdata> this is then passed into an object in the Bootstrap.php file(only showing that specific method) protected function __initNavigation(){ $this->bootstrap('layout'); $layout = $this->getResource('layout'); $view = $layout->getView(); $config = new Zend_Config_Xml(APPLICATION .'/config/navigation.xml', 'nav'); $container = new Zend_Navigation($config); $view->navigation($container); } and then finally in the view layout.phtml, the object should return the menu <!-- application/layouts/scripts/layout.phtml --> <?php echo $this->doctype() ?> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Zend Blog !</title> <?php echo $this->headLink()->appendStylesheet('/css/global.css')?> </head> <body> <div id="header"> <div id="header-logo"> <b>Blog Me !</b> </div> </div> <div id="menu"> <?php echo $this->navigation()->menu() ?> </div> <div id="content"> <?php echo $this->layout()->content ?> </div> </body> </html> The menu does however not show up when i start up my app in the browser, any ideas as to might have gone wrong, is humbly received. Thanks in advance Kalle Johansson

    Read the article

  • vertical navigation that shows hidden submenu on click using JQuery

    - by user346602
    Hi, I am trying to make a menu that works like the one on this flash site: http://elevensix.de/ When I click "portfolio", only then to the subnavigation links reveal themselves. Right now I have only managed to get a typical vertical "reveal subnavigation on hover menu" working. What is required is that once the appropriate menu item it cicked, its submenu shows. This submenu remains revealed as the submenu items are hovered over then selected. When the submenu item is selected, the content shows, and both the menu and submenu remain visible (the selected menu and submenu item are given a distinct colour to show the navigation path). Whew. Here is my html: <div id="nav"> <ul> <li><a href="#">about</a></li> <li><a href="#">testimonials</a> <ul> <li><a href="#">testimonial1</a></li> <li><a href="#">testimonial2</a></li> <li><a href="#">testimonial3</a></li> <li><a href="#">testimonial4</a></li> </ul> </li> <li><a href="#">Services</a> <ul> <li><a href="#">services1</a></li> <li><a href="#">services2</a></li> <li><a href="#">services3</a></li> <li><a href="#">services4</a></li> </ul> </li> <li><a href="#">Gallery</a></li> <li><a href="#">Contact</a></li> </ul> </div><!--end #nav--> and here is my css: #nav { width:160px; position: relative; top: 250px; left: 20px; } #nav ul { margin:0px; padding:0px; } #nav ul li { line-height:24px; list-style:none; } #nav a { text-decoration: none; color: #9d9fa2; } #nav ul li a:hover { position:relative; color: #00aeef; } #nav ul ul { display:none; position:absolute; left:160px; top:4px; } #nav ul li:hover ul { display:block; color: #00aeef; } #nav ul ul li { width:160px; float:left; display:inline; line-height:16px; } .selected { color: #00aeef !important; } Should I be giving the submenus a class so that I can hide then show them? And where would the class be applied? To the ul? could I use the same class for both submenus? Am I wrong in how I am applying the display:none values for this purpose? Many thanks to all the clever people on here.

    Read the article

  • jQuery unbinding click event when maximum number of children are displayed

    - by RyanP13
    I have a personal details form that alows you to enter a certain number of dependants which is determined by the JSP application. The first dependant is visible and the user has the option to add dependants up to the maximum number. All other dependants are hidden by default and are displayed when a user clicks the 'Add another dependant button'. When the maximum number of dependants has been reached the button is greyed out and a message is generated via jQuery and displayed to tell the user exactly this. The issue i am having is when the maximum number of dependants has been reached the message is displayed but then the user can click the button to add more dependants and the message keeps on generating. I thought unbinding the click event would sort this but it seems to still be able to generate a second message. Here is the function i wrote to generate the message: // Dependant message function function maxDependMsg(msgElement) { // number of children can change per product, needs to be dynamic // count number of dependants in HTML var $dependLength = $("div.dependant").length; // add class maxAdd to grey out Button // create maximum dependants message and display, will not be created if JS turned off $(msgElement) .addClass("maxAdd") .after($('<p>') .addClass("maxMsg") .append("The selected web policy does not offer cover for more than " + $dependLength + " children, please contact our customer advisers if you wish discuss alternative policies available.")); } There is a hyperlink with a click event attached like so: $("a.add").click(function(){ // Show the next hidden table on clicking add child button $(this).closest('form').find('div.dependant:hidden:first').show(); // Get the number of hidden tables var $hiddenChildren = $('div.dependant:hidden').length; if ($hiddenChildren == 0) { // save visible state of system message $.cookies.set('cpqbMaxDependantMsg', 'visible'); // show system message that you can't add anymore dependants than what is on page maxDependMsg("a.add"); $(this).unbind("click"); } // set a cookie for the visible state of all child tables $('div.dependant').each(function(){ var $childCount = $(this).index('div.dependant'); if ($(this).is(':visible')) { $.cookies.set('cpqbTableStatus' + $childCount, 'visible'); } else { $.cookies.set('cpqbTableStatus' + $childCount, 'hidden'); } }); return false; }); All of the cookies code is for state saving when users are going back and forward through the process.

    Read the article

  • How to get the clicked element in a dynamically built JQuery Treeview?

    - by Alexander
    I have a product database with several product categories. Each category has a number of sub-categories, which has sub-sub-categories, which has... Well, quite some levels deep. The tree is too huge to load at once, so I need to built it dynamically as users select specific product categories. Here's a snapshot of the product tree. Initially, only the first level is loaded. The second level (Cat. 1.1 and cat. 1.2) is added when the user clicks on cat. 1: <ul id="navigation"> <li id="625212">Product cat. 1 <ul> <li id="625213">Product cat. 1.1 <ul></ul> </li> <li id="625109">Product cat. 1.2 <ul></ul> </li> </ul> </li> <li id="624990">Product cat. 2 <ul></ul> </li> </ul> I intend to extend the tree as users click on specific product categories. I can get the list of sub-categories from a URL that takes the parent product category ID as input and outputs HTML in the format needed by treeview. I cannot use PHP and have to make this work with the .click() event. Here's the code that I have: $(document).ready(function(){ function doSomethingWithData(htmldata, id) { var branches = $(htmldata).appendTo("#navigation #"+id+" ul"); $("#navigation").treeview({ add: branches }); } $("#navigation").treeview({ collapsed: true, unique: true, persist: "location" }); $("#navigation li[id]").click(function() { var id=$(this).attr("id"); if ($("#"+$(this).attr("id")+" ul li").size()==0) { $.get('someurl?id='+$(this).attr("id"), function(data) { doSomethingWithData(data, id); } ) } }); }); The problem I'm having is with the click-event. When clicking on cat 1.1. to extend it one level deeper, it still returns the ID of the top level product category. How can I change the click events so that it will return the ID of the clicked <LI> instead of the top one? If the product category does not have any sub-categories, how can I remove the <UL></UL> and thus inidcating that the tree cannot be expanded any further?

    Read the article

  • Create Marker Categories & Display Markers on Click Only

    - by MizAkita
    I am trying to create marker categories and display markers on click... For example, "Eat", "Banks", "Places of Interest" and clicking on them would produce only the markers in those categories. You can see it live HERE Here is a code snippet: //<![CDATA[ //<![CDATA[ var map = null; var gmarkers = []; var gicons = []; var icon = []; function initialize() { var myOptions = { zoom: 13, center: new google.maps.LatLng(37.979183,-121.302381), mapTypeControl: true, mapTypeControlOptions: {style: google.maps.MapTypeControlStyle.DROPDOWN_MENU}, navigationControl: true, mapTypeId: google.maps.MapTypeId.ROADMAP } map = new google.maps.Map(document.getElementById("map_canvas"), myOptions); google.maps.event.addListener(map, 'click', function() { infowindow.close(); }); // Add markers to the map // Set up three markers with info windows ///////////////////////// EATS ////////////////////////////////////////////// var point = new google.maps.LatLng(37.988012,-121.311901); var image = 'icons/orangepointer.png'; var marker = createMarker(point,'<div style="width:205"><center><img src="icons/tigeryogurt.jpg" /></center><br><b>Tiger Yogurt</b><small><br>4343 Pacific Avenue<br>209.952.6042<br><br><a href="http://maps.google.com/maps?saddr=&daddr=' + point.toUrlValue() + '" target ="_blank">Get Directions<\/a></small><\/div>', image); // this will be gmarkers[0] var point = new google.maps.LatLng(37.987054,-121.311655); var image = 'icons/orangepointer.png'; var marker = createMarker(point,'<div style="width:205"><center><img src="icons/mwbakery.jpg" /></center><br><b>M&W Bakery<br>Cakes & Sandwiches</b><small><br>4343 Pacific Avenue<br>209.473.3828<br><br>On the web visit:<br><a href="http://www.mandwdutchamericanbakery.com" target ="_blank">MandWDutchAmericanBakery.com<\/a><br><br><a href="http://maps.google.com/maps?saddr=&daddr=' + point.toUrlValue() + '" target ="_blank">Get Directions<\/a></small><\/div>', image); // this will be gmarkers[1] Currently, all markers display. I can easily get the markers not to display... however, i am trying to have only categories display and individual listings to display on click only! CREATE MARKER FUNCTION: } var infowindow = new google.maps.InfoWindow( { size: new google.maps.Size(150,50) }); function triggerClick(i) { google.maps.event.trigger(gmarkers[i],"click") }; function createMarker(latlng, html, img) { var contentString = html; var marker = new google.maps.Marker({ position: latlng, map: map, icon: img, zIndex: Math.round(latlng.lat()*-100000)<<5 }); google.maps.event.addListener(marker, 'click', function() { infowindow.setContent(contentString); infowindow.open(map,marker); }); gmarkers.push(marker); }

    Read the article

  • .live event doesnt work till second click

    - by ChampionChris
    I have 2 list on a page that are linked. When I drag a li element from list 1 to list 2 the live events on list 1 don't work on the first click only second click. Below is the code that adds the li (obj) to list 2. function AddToDropBox(obj) { $(obj).children(".handle").animate({ width: "20px" }).children("strong").fadeOut(); $(obj).children("span:not(.track,.play,.handle,:has(.btn-edit))").fadeOut('fast'); $(obj).children(".play").css("margin-right", "8px"); $(obj).css({ "opacity": "0.0", "width": "284px" }).animate({ opacity: "1.0" }); if ($(".sidebar-drop-box ul").children(".admin-song").length > 0) { $(".dropTitle").fadeOut("fast"); $(".sidebar-drop-box ul.admin-song-list").css("min-height", "0"); } if (typeof SetLinks == 'function') { SetLinks(); } //CBG Changes adds media ID to hidden field //checks id there is a value in field then adds comma if(document.getElementById("ctl00_cphBody_hfRemoveMedia").value==""||document.getElementById("ctl00_cphBody_hfRemoveMedia").value==null) { document.getElementById("ctl00_cphBody_hfRemoveMedia").value=(obj).attr("mediaid"); } else { var localMediaIDs=document.getElementById("ctl00_cphBody_hfRemoveMedia").value; document.getElementById("ctl00_cphBody_hfRemoveMedia").value=localMediaIDs+", "+(obj).attr("mediaid"); } // alert("hfid: "+document.getElementById("ctl00_cphBody_hfRemoveMedia").value); //END CBG Modifications } this is one of the live() events that dont fire until the second click after the drag. This live() event is in a document.ready function(). // Live for deleting. $(".btn-del").live("click", function(e) { DeleteItem(this); $(this).removeClass("btn-del").addClass("btn-add").parents("li").removeClass("alt").addClass("removed"); var oldTxt = $(this).parents("li").find(".status").text(); $(this).parents("li").find(".status").text("Removed").attr("oldstat", oldTxt); $("#timeHolder input[type=hidden]").val(($("#timeHolder input[type=hidden]").val() * 1) - ($(this).parents("li").find(".time").attr("length") * 1)); CalculateAggregates(); isDirty = false; }); EDIT @dreaton.. Im new to jquery and javascript so thanks for the last tip... Im not sure what you mean about cache the query's. ... the delegete feature is giving me this Microsoft JScript runtime error: Object doesn't support this property or method this is the way I have the code $('#ulPlaylist').delegate('.btn-del', 'click', function (e) { DeleteItem(this); $(this).removeClass("btn-del").addClass("btn-add").parents("li").removeClass("alt").addClass("removed"); var oldTxt = $(this).parents("li").find(".status").text(); $(this).parents("li").find(".status").text("Removed").attr("oldstat", oldTxt); $("#timeHolder input[type=hidden]").val(($("#timeHolder input[type=hidden]").val() * 1) - ($(this).parents("li").find(".time").attr("length") * 1)); CalculateAggregates(); isDirty = false; });

    Read the article

  • index seems to be out of sync for jquery .keydown and .click methods

    - by Growler
    I'd like to navigate images using both keyboard and mouse (clicking left and right arrow images). I'm using Jquery to do this, but the shared imgIndex seems to be off from the .keydown function and the .click function... Whenever .keydown function -- or ++ the imgIndex, isn't that changed index also used in the click function? So shouldn't they always be on the same index? keydown function: <script type="text/javascript"> var imgArray = [<?php echo implode(',', getImages($site)) ?>]; $(document).ready(function() { var img = document.getElementById("showimg"); img.src = imgArray[<?php echo $imgid ?>]; var imgIndex = <?php echo $imgid ?>; alert(imgIndex); $(document).keydown(function (e) { var key = e.which; var rightarrow = 39; var leftarrow = 37; var random = 82; if (key == rightarrow) { imgIndex++; if (imgIndex > imgArray.length-1) { imgIndex = 0; } img.src = imgArray[imgIndex]; } if (key == leftarrow) { if (imgIndex == 0) { imgIndex = imgArray.length; } img.src = imgArray[--imgIndex]; } }); click function: Connected to left and right clickable images $("#next").click(function() { imgIndex++; if (imgIndex > imgArray.length-1) { imgIndex = 0; } img.src = imgArray[imgIndex]; }); $("#prev").click(function() { if (imgIndex == 0) { imgIndex = imgArray.length; } img.src = imgArray[--imgIndex]; }); }); Just so you have some visibility into the getImages php function: <?php function getImages($siteParam) { include 'dbconnect.php'; if ($siteParam == 'artwork') { $table = "artwork"; } else { $table = "comics"; } $catResult = $mysqli->query("SELECT id, title, path, thumb, views, catidFK FROM $table"); $img = array(); while($row = $catResult->fetch_assoc()) { $img[] = "'" . $row['path'] . "'"; } return $img; } ?> Much appreciated! Snapshot of where the script is on "view image.php"

    Read the article

  • how to disable on click event

    - by user1819709
    function insertQuestion(form) { var x = "<img src='Images/plussigndisabled.jpg' width='30' height='30' alt='Look Up Previous Question' class='plusimage' name='plusbuttonrow'/><span id='plussignmsg'>(Click Plus Sign to look <br/> up Previous Questions)</span>" ; if (qnum == <?php echo (int)$_SESSION['textQuestion']; ?>) { $('#mainPlusbutton').replaceWith(x); } //append rows into a table code, not needed for this question } .... $('.plusimage').live('click', function() { plusbutton($(this)); }); function plusbutton(plus_id) { // Set global info plusbutton_clicked = plus_id; // Display an external page using an iframe var src = "previousquestions.php"; $.modal('<iframe src="' + src + '" style="border:0;width:100%;height:100%;">'); return false; } <form id="QandA" action="<?php echo htmlentities($action); ?>" method="post"> <table id="question"> <tr> <td colspan="2"> <a onclick="return plusbutton();"> <img src="Images/plussign.jpg" width="30" height="30" alt="Look Up Previous Question" class="plusimage" id="mainPlusbutton" name="plusbuttonrow"/> </a> <span id="plussignmsg">(Click Plus Sign to look up Previous Questions)</span> </td> </tr> </table> <table id="questionBtn" align="center"> <tr> <th> <input id="addQuestionBtn" name="addQuestion" type="button" value="Add Question" onClick="insertQuestion(this.form)" /> </th> </tr> </table> </form> In the code above I am able to replace an image with another image when the if statement is met. But my problem is that when the image is replaced, it does not disable the on click event. My question is that when the image is replaced, how do I disable the onclick event onclick="return plusbutton();? Could unbind click work in this situation. I don't want to use href=# because I don't want to include # at the end of the url

    Read the article

< Previous Page | 63 64 65 66 67 68 69 70 71 72 73 74  | Next Page >