Search Results

Search found 4571 results on 183 pages for 'tabs newbie'.

Page 4/183 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • jQuery validate and tabs

    - by ntan
    Hi i am using jQuery validate for my form validation. The form is inside tabs.When i get an error i add an icon to the tab that error exist to be visual by the user So far so good. My problem is that after correct the error i can not remove the error in tab icon. I was assuming that validator is accessible via success but its not Assuming that the first tab (tab0) has 3 field for validation (field1,field2,field3) Here is the full code $("form#Form1") .validate({ invalidHandler: function(form, validator) { //TAB 0 if (validator.errorMap.field1 != "" && validator.errorMap.field2 != "" && validator.errorMap.field3 != "") { if ($("#tabs>ul>li").eq(0).find("img").length == 0) { $("#tabs>ul>li").eq(0).prepend("<img src=\"error.gif\">"); } } }, errorClass: "errorField", errorElement: "p", errorPlacement: function(error, element) { var parent = element.parent(); parent.addClass("error"); error.prependTo( parent ); }, //validator in not accessible via success //so my code its not working success: function(element,validator) { var parent = element.parent(); parent.removeClass("error"); $(parent).children("p.errorField").remove(); //TAB 0 if (validator.errorMap.field1 == "" && validator.errorMap.field2 == "" && validator.errorMap.field2 == "") { if ($("#tabs>ul>li").eq(0).find("img").length == 0) { $("#tabs>ul>li").eq(0).find("img").remove(); } } }, rules: { field1: { required: true }, field2: { required: true }, field3: { required: true } } }); Any suggestion is welcome.

    Read the article

  • jQuery: tabs where the tab/content can be linked to

    - by Ricardo Zea
    My issue is simple. I have already implemented a tab system, and I'd probably spend more time implementing another one with the solution I need, than giving a shot at adapting the code I have, and learn something while asking :) My problem is that the tabs can't be linked to, I need to be able to link to a tab from another website or page, and have that tab get selected upon page load. ie: I have three tabs showing different products, by default tab 1 is active/selected when the page loads. From the home page I want to link to tab 2 but I can't link to tab 2 because it doesn't get selected. Not sure if that makes sense. Tabs: <ul> <li><a href="products.php">Product 1</a></li> <li><a href="products.php">Product 2</a></li> <li><a href="products.php">Product 3</a></li> </ul> <div class="tab_container"> <div id="tab1" class="tab_content">Product 1 info...</div> <div id="tab2" class="tab_content">Product 2 info...</div> <div id="tab3" class="tab_content">Product 3 info...</div> </div> my jQuery: $(document).ready(function() { //Default Action $(".tab_content").hide(); $("ul.tabs li:first").addClass("active").show(); $(".tab_content:first").show(); //On Click Event $("ul.tabs li").click(function() { $("ul.tabs li").removeClass("active"); $(this).addClass("active"); $(".tab_content").hide(); var activeTab = $(this).find("a").attr("href"); $(activeTab).fadeIn(); return false; }); }); Is there a way this code can be adapted to be able to link to any tab from anywhere and have that tab get selected when the page loads? Thanks in advance.

    Read the article

  • JQuery UI Tabs - replace tab and contents

    - by Tauren
    What is the best way to replace the currently selected tab and its contents? The content is dynamically generated with jquery, not loaded via a URL. I need to do this from outside of any tab code or tab event handler (show, add, etc.). There is a link elsewhere on the page that should do the following when clicked: Change the tab's title Change the tab's className Clear out all elements of the tabcontent div Change the tabcontent div's className Generate new content inside the tabcontent div Note that the only reference this link's click() handler has is to the JQuery tabs object ($Tabs). I can get the selected tab with $Tabs.tabs('option','selected'). But how can I get a reference to the selected tab's tab and panel? Inside of a jquery tab handler (show, add, etc.), I have access to ui.tab and ui.panel, but is there a way to get them from a tabs option? Would it be better to simply remove the currently selected tab and then add a new tab in the same index location? I'd have to put the code to generate the tab content into the add() handler then I suppose.

    Read the article

  • Jquery tabs enable tab?

    - by user342391
    I am trying to enable a disabled tab in Jquery but it doesn't work I have my tabs: <!--Jquery AJAX Tabs Start--> <div id="signuptabs"> <ul> <li><a href="type.php"><span>Number type</span></a></li> <li><a href="ber.php"><span>Choose Number</span></a></li> <li><a href="ces.php"><span>Devices</span></a></li> <li><a href="ups.php"><span>Ring Groups</span></a></li> <li><a href="t.php"><span>IVR Text</span></a></li> <li><a href="nu.php"><span>IVR Menu</span></a></li> <li><a href="nfo.php"><span>Billing Information</span></a></li> </ul> </div> <!--Jquery AJAX Tabs End--> Then I have my Javascript: $(document).ready(function() { $("#signuptabs").tabs({ disabled: [1, 2, 3, 4, 5, 6, 7] }); //number type button $('#target').click(function() { $('#signuptabs').enableTab(2); // enables third tab }); }); I have a button with an ID 'target' that when clicked is supposed to enable the (2) tab. The tabs show as disabled but will not enable. what is wrong??

    Read the article

  • add tabs reload ajax

    - by alkitbi
    I want to add to this simple file ... When you click on a tab updated contents of the page or reload $(function(){ $('#tabs #nav li a').click(function(){ var currentNum = $(this).attr('id').slice(-1); $('#tabs #nav li a').removeClass('current'); $(this).addClass('current'); $('#tabs #content .tab-slide').hide(); $('#tabs #content #slide-'+currentNum+'.tab-slide').show(); }); $('#tabsSlide #nav li a').click(function(){ var currentNum = $(this).attr('id').slice(-1); $('#tabsSlide #nav li a').removeClass('current'); $(this).addClass('current'); $('#tabsSlide #content .tab-slide').slideUp(300); $('#tabsSlide #content #slide-'+currentNum+'.tab-slide').slideDown(300); }); });

    Read the article

  • Jquery click function does not load ajax tabs

    - by user342391
    I have some tabs that load ajax content. When I click on the tabs it loads the ajax content perfectly no issues works exactly like it does in the Jqueryui demos. But when I try and change tab using an onclick function it opens the tab but doesn't do the ajax. Is this a known issue can it be done?? Do ajax tabs rely on the user clicking the href to know what to load. This is the code: $(".step2next").click(function() $('#signuptabs').tabs("select" , 1));

    Read the article

  • Vim: Show the index of tabs in the tabline

    - by bitmask
    Lets say I opened file1.txt, file2.txt, file3a.txt and file3b.txt such that the tabline (the thing on the top) looks like this: file1.txt file2.txt 2 file3a.txt (Note how file3b.txt. is missing because it is shown in a split, in the same tab as file3a.txt) To move more quickly between tabs (with <Number>gt), I would like each tab to display its index, along the filename. Like so: 1:<file1.txt> 2:<file2.txt> 3:<2 file3a.txt> The formatting (the angle braces in particular) are optional; I just want the index to appear there (the 1:, 2: and so on). No clues on :h tab-page-commands or google whatsoever.

    Read the article

  • In between multiple tabs, how to use Vimperator to open a tab after current one

    - by Mehrad
    If you're a Firefox user you know that if you have 10 tabs open and say you're in the tab #5. If you open a new tab which will become #11 in order and search something, after you finish and close this #11 tab Firefox will direct you the the last active tab you were in which is #5. Using Vimperator You won't get the similar effect. In the same scenario, while you're in tab #5 you can go t and search for something which will lead to opening a tab at #11. Now you press d and where you are now ? #10 and you need to ctrl+p all the way back to #5. So in this case I am looking for one of these solutions. to be able to open a tab straight after the current tab (which closing it will capital D will put me back to my active tab) a way to close a tab and being brought back to the last active tab that I worked on. Will appreciate it if somebody got a solution for this. thanks

    Read the article

  • Number Tabs in Chrome or Firefox

    - by Bruce Connor
    I like to use the Ctrl or Alt + Number shorcut to jump quickly to a specific tab. Problem is: When you have a lot of tabs open it is hard to look at them and quickly know which one is tab number 7. Is there a way (extension possibly) to show a tab's number in its title? This way each tab would have a number added to its title right beside the favicon. This way you could immediately tell which number you need to press to jump to a specific tab. I use both Chromium and Firefox, so I'm accepting answers for either one (though I'd prefer both =) ).

    Read the article

  • Firefox: tabs containing a single image sometimes show generic icon instead of thumbnail

    - by ??O?????
    My version of Firefox is 3.5.9, but I've had this issue since single-image tabs started showing a thumbnail of the contained image. Typically, a tab containing a single image will use a thumbnail of the image as the icon before the tab title. Sometimes, though, this icon will be the generic “shaded sphere on blank page” (or perhaps whatever your theme defaults to). I'm guessing this happens whenever height or width is larger than 1024, but I seem to recall (perhaps erroneously) exceptions to this rule. Anyway, hopefully someone will know the definite answer to: Why does this happen? Examples Images showing thumbnails Wikipedia/Natalie Portman #1 (600×887) Wikipedia/Natalie Portman #2 (789×1024) Images not showing thumbnails Wikipedia/BMW series 3 cars (1276×338) Wikipedia/Greek temple (2414×1740)

    Read the article

  • Firefox: getting access to the list of tabs/windows to restore on startup

    - by robb
    Sometimes Firefox fails to restore the previously open tabs/windows. This might be happening when some of the URLs to be opened are no longer reachable (e.g. behind a VPN) or after the underlying OS (Windows) has been forcibly restarted (e.g. to complete an automated patch installation). Anyway, after restarting, can this list of URLs be recovered somehow? Say for example, I was daft enough to have clicked on "start new session". Can I still get access to the old list of open URLs? There is the browser history of course, but it contains a lot of stuff - the URLs that were open when Firefox last exited are not obvious. It would be neat if they were marked in some way - tagged for example.

    Read the article

  • Reclaim Vertical UI Space by Moving Your Tabs to the Side in Firefox

    - by Asian Angel
    Are you looking for a way to move your tabs to the side in Firefox and gain access to more vertical UI space? The Vertical Tabs extension for Firefox lets you accomplish both in a matter of moments. As soon as you install the extension and restart Firefox the Tab Bar will be automatically converted into a shiny new Vertical Tabs Sidebar. All that you have to do is start enjoying the extra vertical UI space. Some things to keep in mind when using the extension are: You can easily adjust the width of the sidebar to suit your needs using the mouse (very nice!) The Firefox Menu Button, Panorama Button, and Tab Control controls move to the bottom of the sidebar (see screenshot above) You can group tabs if needed or desired There is no option available to move the sidebar to the right side of the browser at the moment The use of Personas themes (or other themes) may affect how the text for the tabs will look (i.e. a slightly fuzzy shadow effect when not selected as seen in the screenshot above) Note: Works with Firefox 4.0b7 – 4.0.* Install the Vertical Tabs Extension [Mozilla Add-ons] Latest Features How-To Geek ETC Should You Delete Windows 7 Service Pack Backup Files to Save Space? What Can Super Mario Teach Us About Graphics Technology? Windows 7 Service Pack 1 is Released: But Should You Install It? How To Make Hundreds of Complex Photo Edits in Seconds With Photoshop Actions How to Enable User-Specific Wireless Networks in Windows 7 How to Use Google Chrome as Your Default PDF Reader (the Easy Way) Reclaim Vertical UI Space by Moving Your Tabs to the Side in Firefox Wind and Water: Puzzle Battles – An Awesome Game for Linux and Windows How Star Wars Changed the World [Infographic] Tabs Visual Manager Adds Thumbnailed Tab Switching to Chrome Daisies and Rye Swaying in the Summer Wind Wallpaper Read On Phone Pushes Data from Your Desktop to the Appropriate Android App

    Read the article

  • JTabbedPane: only first tab is drawn, the second is always empty (newbie Q)

    - by paul
    I created a very simple JTabbedPane by first creating an empty JTabbedPane object, then 2 JPanels that I later add. Each JPanel is holding a object that extends JButton and implements MouseListener. Each of these holds a different image loaded from a file; the image is held locally as a buffered image and as an image icon, etc., all of which works great. The point of all that is to allow resizing of the image when the button is resized (using getscaledinstance()), because the panel is resized, because the JTabbedPane is resized, etc., within the JFrame that holds everything. I override paintComponent() to accomplish this in the class that extends JButton. I am using MigLayout Manager, and all is well on that front controlling layout constraints, growing, filling, initial sizes, preferred sizes, etc. The images the buttons hold are of different sizes and proportions, but this caused no trouble before. Up until 2 days ago everything worked fairly well. I made some changes trying to tweak some resizing issues as I was picking up MigLayout manager. At the time I was playing around with setting various min, max, and preferred sizes using the methods provided for by the components, not the layout manager. I also fooled a bit with pack(), validate(), visible(), opaque() etc., and yes I read the article about Swing and AWT painting here: http://java.sun.com/products/jfc/tsc/articles/painting/ , and I switched to relying more and more on MigLayout. On an unrelated note, it appears JFrame's do not honor maxsize? Somehow, today, with and without using any of these methods provided by swing, with or without using MigLayout manager to handle some of these matters instead, I now have a JTabbedPane that correctly displays the FIRST JPanel I add, but NOT THE SECOND JPanel--which, while present as a tab--does not show when selected. I have switched the order of which panel is added first, and this still holds true regardless of which JPanel I add first, telling me the JPanels are ok, and the problem is most likely in the JTabbedPane. I click on the second tab, the JTabbedPane switches, but I have what appears to be a blank button in the JPanel. A few console system-out statements reveal the following: a) that the second panel and its button are constructed b) no mouse events are being captured when I click on where the second panel and button should reside, as if it didn't exist at that point; c) when I switch to the second tab, the overrided paintComponent() method of the button within that second JPanel is never called, so it is in fact never being painted despite the tab in which it resides becoming visible; d) the JTabbpedPane getComponentCount() returns a correct value of 2 after adding the 2nd panel; e) MigLayout manager actually rocks, but I digress... I cannot now revert to my older code, and despite my best efforts to undo whatever changes caused this, I cannot fix my new problem. I've commented out everything but the most essential calls: constructors for each object--with MigLayout; add() for placing the buttons on the panels using string-arguments appropriate for MigLayout; add() for placing the panels on the JTabbedPane, also with MigLayout string arguments; setting the default op on close for the JFrame; and setting the JFrame visible. This means I do not fiddle with optimization settings, double buffering settings, opaque settings, but leave them as default, and still, no fix; the second panel will not show itself. Each panel, I should add, when it is the first to be loaded, works fine, again re-affirming that the panels and buttons are themselves ok. Here is part of what I am doing: //Note: BuildaButton is a class that merely constructs my instances File f = new File("/foo.jpg"); button1 = new BuildaButton().BuildaButton(f).buildfoo1Button(); f = new File("/foo2.jpg"); button2 = new BuildaButton().BuildaButton(f).buildfoo2Button(); MigLayout ml = new MigLayout("wrap 1", "[fill, grow]0[fill, grow]", "[fill, grow]0[fill, grow]"); MigLayout ml2 = new MigLayout("wrap 2", "[fill, grow]5[fill, grow]", "[fill, grow]0[fill, grow]"); foo1panel = new JPanel(ml); foo1panel.add(button1, "w 234:945:, h 200:807:"); foo2panel = new JPanel(ml); foo2panel.add(button2, "w 186:752:, h 200:807:"); tabs.add("foo1", foo1panel); tabs.add("foo2", foo2panel); System.out.println("contents of tabs: " + tabs.getComponentCount() + " elements"); mainframe.setLayout(ml2); mainframe.setMinimumSize(new Dimension(850,800)); mainframe.add(tabs, "w 600:800:, h 780:780:"); //controlpanel is a still blank jpanel that holds nothing--it is a space holder for now & will be utilized mainframe.add(controlpanel, "w 200:200:200, h 780:780:"); mainframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); mainframe.setVisible(true); Thank you in advance for any help you can give.

    Read the article

  • jQueryUI Tabs: how to keep them on a single line?

    - by Andi
    Hi all, Maybe my question is wired: is there a way to prevent jQueryUI tabs from floating if browser window is too small? Explanation: I have a simple horizontal tab using CSS only. The content is floating but not the tabs. Important: there is no width set manually, the current width is taken automatically. Here is the code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <style type="text/css"> #tabs ul { white-space: nowrap; } #tabs ul li { display: inline; white-space: nowrap; } </style> <title>Tabs-CSS</title> </head> <body> <div class="demo"> <div id="tabs"> <ul> <li><a href="#tabs-1">Preloaded</a></li> <li><a href="ajax/content1.html">Tab 1</a></li> <li><a href="ajax/content2.html">Tab 2</a></li> <li><a href="ajax/content3-slow.php">Tab 3 (slow)</a></li> <li><a href="ajax/content4-broken.php">Tab 4 (broken)</a></li> <li><a href="ajax/content4-broken.php">Tab 4 (broken)</a></li> <li><a href="ajax/content4-broken.php">Tab 4 (broken)</a></li> <li><a href="ajax/content4-broken.php">Tab 4 (broken)</a></li> <li><a href="ajax/content4-broken.php">Tab 4 (broken)</a></li> </ul> <div id="tabs-1"> <p>Proin elit arcu, rutrum commodo, vehicula tempus, commodo a, risus. Curabitur nec arcu. Donec sollicitudin mi sit amet mauris. Nam elementum quam ullamcorper ante. Etiam aliquet massa et lorem. Mauris dapibus lacus auctor risus. Aenean tempor ullamcorper leo. Vivamus sed magna quis ligula eleifend adipiscing. Duis orci. Aliquam sodales tortor vitae ipsum. Aliquam nulla. Duis aliquam molestie erat. Ut et mauris vel pede varius sollicitudin. Sed ut dolor nec orci tincidunt interdum. Phasellus ipsum. Nunc tristique tempus lectus.</p> </div> </div> </div> </body> </html> This is exactly what I want. Next step: add jQueryUI Tab as unobtrusive Javascript. For example like this: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" type="text/javascript"></script> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.1/jquery-ui.min.js"></script> <link type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/themes/ui-lightness/jquery-ui.css" rel="stylesheet"/> <style type="text/css"> #tabs ul { white-space: nowrap; } #tabs ul li { display: inline; white-space: nowrap; } </style> <title>Tabs-CSS</title> </head> <body> <div class="demo"> <div id="tabs"> <ul> <li><a href="#tabs-1">Preloaded</a></li> <li><a href="ajax/content1.html">Tab 1</a></li> <li><a href="ajax/content2.html">Tab 2</a></li> <li><a href="ajax/content3-slow.php">Tab 3 (slow)</a></li> <li><a href="ajax/content4-broken.php">Tab 4 (broken)</a></li> <li><a href="ajax/content4-broken.php">Tab 4 (broken)</a></li> <li><a href="ajax/content4-broken.php">Tab 4 (broken)</a></li> <li><a href="ajax/content4-broken.php">Tab 4 (broken)</a></li> <li><a href="ajax/content4-broken.php">Tab 4 (broken)</a></li> </ul> <div id="tabs-1"> <p>Proin elit arcu, rutrum commodo, vehicula tempus, commodo a, risus. Curabitur nec arcu. Donec sollicitudin mi sit amet mauris. Nam elementum quam ullamcorper ante. Etiam aliquet massa et lorem. Mauris dapibus lacus auctor risus. Aenean tempor ullamcorper leo. Vivamus sed magna quis ligula eleifend adipiscing. Duis orci. Aliquam sodales tortor vitae ipsum. Aliquam nulla. Duis aliquam molestie erat. Ut et mauris vel pede varius sollicitudin. Sed ut dolor nec orci tincidunt interdum. Phasellus ipsum. Nunc tristique tempus lectus.</p> </div> </div> </div> <script type="text/javascript"> //<![CDATA[ $(function() { $("#tabs").tabs({ ajaxOptions: { error: function(xhr, status, index, anchor) { $(anchor.hash).html("Couldn't load this tab. We'll try to fix this as soon as possible. If this wouldn't be a demo."); }, } }); }); $(function() { $("#innertabs").tabs({ ajaxOptions: { error: function(xhr, status, index, anchor) { $(anchor.hash).html("Couldn't load this tab. We'll try to fix this as soon as possible. If this wouldn't be a demo."); } } }); }); //]]> </script> </body> </html> Now I can see that the tabbar floats on minimizing the browser window. And there are some ugly effect with the tabs jumping around. My main questions is: can I avoid floating the tabbar and keep all tabs on one single line? Kind regards, Andi

    Read the article

  • jQueryUI Tabs: how too keep them on a single line?

    - by Andi
    Hi all, Maybe my question is wired: is there a way to prevent jQueryUI tabs from floating if browser window is too small? Explanation: I have a simple horizontal tab using CSS only. The content is floating but not the tabs. Important: there is no width set manually, the current width is taken automatically. Here is the code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <style type="text/css"> #tabs ul { white-space: nowrap; } #tabs ul li { display: inline; white-space: nowrap; } </style> <title>Tabs-CSS</title> </head> <body> <div class="demo"> <div id="tabs"> <ul> <li><a href="#tabs-1">Preloaded</a></li> <li><a href="ajax/content1.html">Tab 1</a></li> <li><a href="ajax/content2.html">Tab 2</a></li> <li><a href="ajax/content3-slow.php">Tab 3 (slow)</a></li> <li><a href="ajax/content4-broken.php">Tab 4 (broken)</a></li> <li><a href="ajax/content4-broken.php">Tab 4 (broken)</a></li> <li><a href="ajax/content4-broken.php">Tab 4 (broken)</a></li> <li><a href="ajax/content4-broken.php">Tab 4 (broken)</a></li> <li><a href="ajax/content4-broken.php">Tab 4 (broken)</a></li> </ul> <div id="tabs-1"> <p>Proin elit arcu, rutrum commodo, vehicula tempus, commodo a, risus. Curabitur nec arcu. Donec sollicitudin mi sit amet mauris. Nam elementum quam ullamcorper ante. Etiam aliquet massa et lorem. Mauris dapibus lacus auctor risus. Aenean tempor ullamcorper leo. Vivamus sed magna quis ligula eleifend adipiscing. Duis orci. Aliquam sodales tortor vitae ipsum. Aliquam nulla. Duis aliquam molestie erat. Ut et mauris vel pede varius sollicitudin. Sed ut dolor nec orci tincidunt interdum. Phasellus ipsum. Nunc tristique tempus lectus.</p> </div> </div> </div> </body> </html> This is exactly what I want. Next step: add jQueryUI Tab as unobtrusive Javascript. For example like this: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" type="text/javascript"></script> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.1/jquery-ui.min.js"></script> <link type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/themes/ui-lightness/jquery-ui.css" rel="stylesheet"/> <style type="text/css"> #tabs ul { white-space: nowrap; } #tabs ul li { display: inline; white-space: nowrap; } </style> <title>Tabs-CSS</title> </head> <body> <div class="demo"> <div id="tabs"> <ul> <li><a href="#tabs-1">Preloaded</a></li> <li><a href="ajax/content1.html">Tab 1</a></li> <li><a href="ajax/content2.html">Tab 2</a></li> <li><a href="ajax/content3-slow.php">Tab 3 (slow)</a></li> <li><a href="ajax/content4-broken.php">Tab 4 (broken)</a></li> <li><a href="ajax/content4-broken.php">Tab 4 (broken)</a></li> <li><a href="ajax/content4-broken.php">Tab 4 (broken)</a></li> <li><a href="ajax/content4-broken.php">Tab 4 (broken)</a></li> <li><a href="ajax/content4-broken.php">Tab 4 (broken)</a></li> </ul> <div id="tabs-1"> <p>Proin elit arcu, rutrum commodo, vehicula tempus, commodo a, risus. Curabitur nec arcu. Donec sollicitudin mi sit amet mauris. Nam elementum quam ullamcorper ante. Etiam aliquet massa et lorem. Mauris dapibus lacus auctor risus. Aenean tempor ullamcorper leo. Vivamus sed magna quis ligula eleifend adipiscing. Duis orci. Aliquam sodales tortor vitae ipsum. Aliquam nulla. Duis aliquam molestie erat. Ut et mauris vel pede varius sollicitudin. Sed ut dolor nec orci tincidunt interdum. Phasellus ipsum. Nunc tristique tempus lectus.</p> </div> </div> </div> <script type="text/javascript"> //<![CDATA[ $(function() { $("#tabs").tabs({ ajaxOptions: { error: function(xhr, status, index, anchor) { $(anchor.hash).html("Couldn't load this tab. We'll try to fix this as soon as possible. If this wouldn't be a demo."); }, } }); }); $(function() { $("#innertabs").tabs({ ajaxOptions: { error: function(xhr, status, index, anchor) { $(anchor.hash).html("Couldn't load this tab. We'll try to fix this as soon as possible. If this wouldn't be a demo."); } } }); }); //]]> </script> </body> </html> Now I can see that the tabbar floats on minimizing the browser window. And there are some ugly effect with the tabs jumping around. My main questions is: can I avoid floating the tabbar and keep all tabs on one single line? Kind regards, Andi

    Read the article

  • [newbie]Webservice - Threads - close if no active threads, if any activen, then wait till its compl

    - by Raj
    Hi I have an ASP.Net webservice running. When the system date changes, i want to close all the threads and restart them again, if the thread/s aren't doing any work. If any of the thread/s is in the process of doing some work(active threads), then i need to wait till the current thread/s complete its process and then close. This will prevent from aborting any current process. Any ideas on how i can perform such a task? Thanks PS:I am new to ASP.NET and Multithreading.

    Read the article

  • Python: some newbie questions on sys.stderr and using function as argument

    - by Cawas
    I'm just starting on Python and maybe I'm worrying too much too soon, but anyways... log = "/tmp/trefnoc.log" def logThis (text, display=""): msg = str(now.strftime("%Y-%m-%d %H:%M")) + " TREfNOC: " + text if display != None: print msg + display logfile = open(log, "a") logfile.write(msg + "\n") logfile.close() return msg def logThisAndExit (text, display=""): msg = logThis(text, display=None) sys.exit(msg + display) That is working, but I don't like how it looks. Is there a better way to write this (maybe with just 1 function) and is there any other thing I should be concerned under exiting? Now to some background... Sometimes I will call logThis just to log and display. Other times I want to call it and exit. Initially I was doing this: logThis ("ERROR. EXITING") sys.exit() Then I figured that wouldn't properly set the stderr, thus the current code shown on the top. My first idea was actually passing "sys.exit" as an argument, and defining just logThis ("ERROR. EXITING", call=sys.exit) defined as following (showing just the relevant differenced part): def logThis (text, display="", call=print): msg = str(now.strftime("%Y-%m-%d %H:%M")) + " TREfNOC: " + text call msg + display But that obviously didn't work. I think Python doesn't store functions inside variables. I couldn't (quickly) find anywhere if Python can have variables taking functions or not! Maybe using an eval function? I really always try to avoid them, tho. Sure I thought of using if instead of another def, but that wouldn't be any better or worst. Anyway, any thoughts?

    Read the article

  • Newbie can't get Tomcat to reload Flex/BlazeDS application

    - by Captain Aporam
    I'm an experienced 'old school' programmer, but new to Tomcat and Flex. I've followed the getting started for BlazeDS. I'm making changes to the Flex code using Flex Builder 3, but I just can't get the changes to show up when I refresh the page on my client. Server and client are separate physical machines, I've even re-started the server hardware. One curious thing, even when I re-started the server I didn't have to re-login to the Tomcat manager page - I didn't restart my client, I guess it remembers my session? TIA, getting frustrated - like my flex page is 'write once'.

    Read the article

  • Newbie Python programmer tangling with Lists.

    - by Sergio Tapia
    Here's what I've got so far: # A. match_ends # Given a list of strings, return the count of the number of # strings where the string length is 2 or more and the first # and last chars of the string are the same. # Note: python does not have a ++ operator, but += works. def match_ends(words): counter = 0 for word in words: if len(word) >= 2 and word[0] == word[-1]: counter += counter return counter # +++your code here+++ return I'm following the Google Python Class, so this isn't homework, but me just learning and improving myself; so please no negative comments about 'not doing my homework'. :P What do you guys think I'm doing wrong here? Here's the result: match_ends X got: 0 expected: 3 X got: 0 expected: 2 X got: 0 expected: 1 I'm really loving Python, so I just know that I'll get better at it. :)

    Read the article

  • C++ Newbie: Passing an fstream to a function to read data

    - by vgm64
    I have a text file named num.txt who's only contents is the line 123. Then I have the following: void alt_reader(ifstream &file, char* line){ file.read(line, 3); cout << "First Time: " << line << endl; } int main() { ifstream inFile; int num; inFile.open("num.txt"); alt_reader(inFile, (char*)&num); cout << "Second Time: " << num << endl; } The output is: First Time: 123 Second Time: 3355185 Can you help me figure out how to get an fstream that is read in a function still assign the variable in main? I'm doing this because alt_reader really has a lot more to it, but this is the part I'm stuck on. Thanks a lot for the help.

    Read the article

  • jquery ui-tabs widget , changing the color of the background with css causes problem with display

    - by Ronedog
    I'm using the jquery tabs plugin and want to have the background a light grey color. In the css section for tabs, I found this line of code where I manually added the background-color part: .ui-tabs .ui-tabs-panel { padding: 1em 1em; display: block; border-width: 0; background-color:#EEEEEE;} The problem comes as seen in the picture below, where the grey background is only extending down part of the way. I initially thought I could update the div container with the same background color, but it didn't work. It looks like that white portion below might be some kind of padding, so I looked for that in the css but everything I tried had the same effect. Anyone got some ideas? This is what the HTML looks like (Theoretically): <div id="tabs_here"> <ul> <li><a href="#" onclick="$('#T_1').html('Display the data');" >Item Groups</a> </li> </ul> <div id="T_1"></div> </div>

    Read the article

  • The Classic jQuery Tabs with Bing Maps Issue

    - by Justin
    Hello, I know that there are multiple issues with jQuery Tabs and using Maps. And I have seen the multiple fixes and I am half-way there. But I have the most obscure issue and hoping that someone might understand why. This is my code for the tabs $("#contactTabs").tabs({ spinner: 'Loading <img src="../images/icons/ajax-loader.gif" />' }); $('#contactTabs').bind('tabsshow', function(event, ui) { if (ui.panel.id == "Map") { GetMap(); } }); Which currently does not work. But I was doing some testing and added in an ALERT() to see if the "GetMap()" was even attempting to be loaded... so this was the code that I tested with, and it works just fine. $("#contactTabs").tabs({ spinner: 'Loading <img src="../images/icons/ajax-loader.gif" />' }); $('#contactTabs').bind('tabsshow', function(event, ui) { if (ui.panel.id == "Map") { alert("load map"); GetMap(); } }); So I haven't a clue why adding the ALERT() causes the map to load and removing the ALERT just doesn't load the map at all. Is there any clarification that someone can give me on this issue? Thank you in advance!

    Read the article

  • drupal hook_menu_alter9) for adding tabs

    - by EricP
    I want to add some tabs in the "node/%/edit" page from my module called "cssswitch". When I click "Rebuild Menus", the two new tabs are displayed, but they are displayed for ALL nodes when editing them, not just for the node "cssswitch". I want these new tabs to be displayed only when editing node of type "cssswitch". The other problem is when I clear all cache, the tabs completely dissapear from all edit pages. Below is the code I wrote. function cssswitch_menu_alter(&$items) { $node = menu_get_object(); //print_r($node); //echo $node->type; //exit(); if ($node->type == 'cssswitch') { $items['node/%/edit/schedulenew'] = array( 'title' => 'Schedule1', 'access callback'=>'user_access', 'access arguments'=>array('view cssswitch'), 'page callback' => 'cssswitch_schedule', 'page arguments' => array(1), 'type' => MENU_LOCAL_TASK, 'weight'=>4, ); $items['node/%/edit/schedulenew2'] = array( 'title' => 'Schedule2', 'access callback'=>'user_access', 'access arguments'=>array('view cssswitch'), 'page callback' => 'cssswitch_test2', 'page arguments' => array(1), 'type' => MENU_LOCAL_TASK, 'weight'=>3, ); } } function cssswitch_test(){ return 'test'; } function cssswitch_test2(){ return 'test2'; } Thanks for any help.

    Read the article

  • drupal hook_menu_alter() for adding tabs

    - by EricP
    I want to add some tabs in the "node/%/edit" page from my module called "cssswitch". When I click "Rebuild Menus", the two new tabs are displayed, but they are displayed for ALL nodes when editing them, not just for the node "cssswitch". I want these new tabs to be displayed only when editing node of type "cssswitch". The other problem is when I clear all cache, the tabs completely dissapear from all edit pages. Below is the code I wrote. function cssswitch_menu_alter(&$items) { $node = menu_get_object(); //print_r($node); //echo $node->type; //exit(); if ($node->type == 'cssswitch') { $items['node/%/edit/schedulenew'] = array( 'title' => 'Schedule1', 'access callback'=>'user_access', 'access arguments'=>array('view cssswitch'), 'page callback' => 'cssswitch_schedule', 'page arguments' => array(1), 'type' => MENU_LOCAL_TASK, 'weight'=>4, ); $items['node/%/edit/schedulenew2'] = array( 'title' => 'Schedule2', 'access callback'=>'user_access', 'access arguments'=>array('view cssswitch'), 'page callback' => 'cssswitch_test2', 'page arguments' => array(1), 'type' => MENU_LOCAL_TASK, 'weight'=>3, ); } } function cssswitch_test(){ return 'test'; } function cssswitch_test2(){ return 'test2'; } Thanks for any help.

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >