Search Results

Search found 14593 results on 584 pages for 'pat inside'.

Page 20/584 | < Previous Page | 16 17 18 19 20 21 22 23 24 25 26 27  | Next Page >

  • Can not access response.body inside after filter block in Sinatra 1.0

    - by Petr Vostrel
    I'm struggling with a strange issue. According to http://github.com/sinatra/sinatra (secion Filters) a response object is available in after filter blocks in Sinatra 1.0. However the response.status is correctly accessible, I can not see non-empty response.body from my routes inside after filter. I have this rackup file: config.ru require 'app' run TestApp Then Sinatra 1.0.b gem installed using: gem install --pre sinatra And this is my tiny app with a single route: app.rb require 'rubygems' require 'sinatra/base' class TestApp < Sinatra::Base set :root, File.dirname(__FILE__) get '/test' do 'Some response' end after do halt 500 if response.empty? # used 500 just for illustation end end And now, I would like to access the response inside the after filter. When I run this app and access /test URL, I got a 500 response as if the response is empty, but the response clearly is 'Some response'. Along with my request to /test, a separate request to /favicon.ico is issued by the browser and that returns 404 as there is no route nor a static file. But I would expect the 500 status to be returned as the response should be empty. In console, I can see that within the after filter, the response to /favicon.ico is something like 'Not found' and response to /test really is empty even though there is response returned by the route. What do I miss?

    Read the article

  • Jquery Accordion : set action to a specific element inside header

    - by J.Tay
    by default, if we have something like this as a Header in jQuery Accordion : <h3> <div class="1">TEXT</div> <div class="2">ICON</div> <div class="3">BUTTON</div> </h3> by clicking anywhere on this , accordion works and toggle the next element and ... the question is , how can we set an option and select a specific element ( like: 'div' with class '1' ) to click on it to and toggle the accordion. i mean i don't want the whole Header remain click able. i just want to click on a icon or div o something inside the header and toggle open/close the accordion. thank you Update 1 : HTML : <div id="testAcc"> <h3> <div class="one">Text</div> <div class="two">Icon</div> <div class="three">Button</div> </h3> <div class="accBody"> text text text text text text text text text text </div> <h3> <div class="one">Text</div> <div class="two">Icon</div> <div class="three">Button</div> </h3> <div class="accBody"> text text text text text text text text text text </div> </div> JS : $('#testAcc').accordion({ autoHeight: false, header: 'h3', collapsible: 'ture', }); this codes working fine. but i want to use something like ( header: 'h3.one' ) means i want to set a specific class and element inside the header , then if user click ONLY on that element, the accordion will open or close ...

    Read the article

  • Clicking inside a polygon in Google Maps

    - by amarsh-anand
    The included JavaScript snippet is supposed to do the following: As the user clicks on the map, initialize headMarker and draw a circle (polygon) around it As the user clicks inside the circle, initialize tailMarker and draw the path between these two markers 1 is happening as expected. But as the user clicks inside the circle, in the function(overlay,point), overlay is non-null while point is null. Because of this, the code fails to initialize tailMarker. Can someone tell me a way out. GEvent.addListener(map, "click", function(overlay,point) { if (isCreateHeadPoint) { // add the head marker headMarker = new GMarker(point,{icon:redIcon,title:'0'}); map.addOverlay(headMarker); isCreateHeadPoint = false; // draw the circle drawMapCircle(point.lat(),point.lng(),1,'#cc0000',2,0.8,'#0',0.1); } else { // add the tail marker tailMarker = new GMarker(point,{icon:greenIcon,title:''}); map.addOverlay(tailMarker); isCreateHeadPoint = true; // load thes path from head to tail direction.load("from:" + headMarker.getPoint().lat()+ ", " + headMarker.getPoint().lng()+ " " + "to:" + tailMarker.getPoint().lat() + "," + tailMarker.getPoint().lng(), {getPolyline:true}); } });

    Read the article

  • center div tags inside parent div

    - by Senthilnathan
    I have two div tags inside a parent div. I want to display the two divs in same line and centered. Below is the html code. <div id="parent"> <div id="addEditBtn" style="display:inline-block; vertical-align: middle; width:20px; cursor:pointer;" class="ui-state-default ui-corner-all"> <span class="ui-icon ui-icon-pencil"></span></div> <div id="deleteBtn" style="display:inline-block; vertical-align: middle; width:20px; cursor:pointer;" class="ui-state-default ui-corner-all"> <span class="ui-icon ui-icon-trash"></span></div> </div> I tried with "display:inline-block; vertical-align: middle;" but its getting aligned left. Please help me out to centered the div tags inside the parent div.

    Read the article

  • OnConnect event not firing when using TClientSocket inside a TThread on non-blocking mode

    - by mathematician1975
    I am trying to make use of Borlands TClientSocket component in non-blocking mode inside a multithreaded C++ Windows application. I am creating multiple threads (classes derived from TThread), each of which creates its own TClientSocket object. I then assign member functions of the thread class to act as event handlers for the OnConnect, OnDisconnect and OnSocketError events of the socket. The problem I am having here is that whenever I call the TClientSocket::Open() function from within the TThread::Execute() function, the OnConnect event never fires. However, When I call the Open() function from the VCL thread prior to the TThread::Execute() function getting called, all of the events fire and I can use the thread-socket combination as I would like. Now I have not read anything in documentation that says that TClientSocket should not be used in non-blocking mode when used inside a thread, but it appears to me that there is perhaps something wrong conceptually in the way I am trying to use this class. Borland documentation is quite poor on the subject and these components have now been deprecated so reliable information is hard to come by. Despite being deprecated I have to use them as there is no alternative in the Builder 6 package I have. Can anyone please advise me if there is a right/wrong way to use TThread and a non-blocking TClientSocket in combination. I have never had problems using it as part of the VCL thread and never had problems using TServerSocket before and I really cannot understand why some events are not firing.

    Read the article

  • HOw to make image stay inside the div box on scrolling

    - by Mirage
    I have the image position fixed inside div and code is gven below #content{ margin-top:100px; width:900px; color:#009; border:1px solid red; overflow:hidden; display:block; } img { float:left; position:fixed; top:140px; padding:50px; } #text{ display:block; border:1px solid green; width:500px; height:1200px; float:right; overflow:scroll; } #footer{ clear:both; width:600px; height:300px; border:2x solid blue; color:#939; } HTML is <div id="content" > <img src="bar.jpg" width="46" height="639" /> <div id="text"> ggggggggggggggggggfgdfgdfgdgdfgdgdfgdf </div> </div> <div id="footer"> Footer text </div> </body> Now when i scroll down then image comes out of the content div box. IS there any way so that even if i scroll the image bar should stay inside the div box. The screen shot shows my problem First Screen is ok without scrolling But when i scroll the text full then it covers my footer as well

    Read the article

  • File name containing more than 16 characters inside parentheses failing

    - by Tom anMoney
    I am generating file names that contain a timestamp in the following format: "base_name (yyyy-mm-dd hhmmss).ext" This seems to cause a problem on Android. Here's my log: /storage/sdcard0/anMoney/transfer/Net worth over time _ Forecast (2012-11-19 110550).pdf E/Gmail (11802): java.io.FileNotFoundException: /storage/sdcard0/myapp/transfer/Net worth over time _ Forecast (2012-11-19 110550).pdf: open failed: ENOENT (No such file or directory) E/Gmail (11802): at libcore.io.IoBridge.open(IoBridge.java:416) E/Gmail (11802): at java.io.FileInputStream.<init>(FileInputStream.java:78) E/Gmail (11802): at java.io.FileInputStream.<init>(FileInputStream.java:105) E/Gmail (11802): at android.content.ContentResolver.openInputStream(ContentResolver.java:445) E/Gmail (11802): at com.google.android.gm.provider.MailEngine.cacheAttachment(MailEngine.java:3054) E/Gmail (11802): at com.google.android.gm.provider.MailEngine.sendOrSaveDraft(MailEngine.java:2746) E/Gmail (11802): at com.google.android.gm.provider.MailProvider.sendOrSaveDraft(MailProvider.java:477) E/Gmail (11802): at com.google.android.gm.provider.MailProvider.insert(MailProvider.java:534) E/Gmail (11802): at android.content.ContentProvider$Transport.insert(ContentProvider.java:201) E/Gmail (11802): at android.content.ContentResolver.insert(ContentResolver.java:864) E/Gmail (11802): at com.google.android.gm.provider.Gmail$MessageModification.sendOrSaveNewMessage(Gmail.java:3576) E/Gmail (11802): at com.google.android.gm.ComposeActivity$SendOrSaveTask$1.onInitializationComplete(ComposeActivity.java:1765) E/Gmail (11802): at com.google.android.gm.provider.MailEngine$5.run(MailEngine.java:1006) E/Gmail (11802): at android.os.Handler.handleCallback(Handler.java:615) E/Gmail (11802): at android.os.Handler.dispatchMessage(Handler.java:92) E/Gmail (11802): at android.os.Looper.loop(Looper.java:137) E/Gmail (11802): at android.os.HandlerThread.run(HandlerThread.java:60) E/Gmail (11802): Caused by: libcore.io.ErrnoException: open failed: ENOENT (No such file or directory) Now, if I trim the file name to have only 16 characters within the parentheses, everything is working as expected. I am able to send the file as a GMail attachment. The following file name is working fine: /storage/sdcard0/myapp/transfer/Net worth over time _ Forecast (2012-11-19 11070).pdf I tried the following troubleshooting: It's not the overall length of the file name, as if I shorten the base name, the same behavior remains It's not GMail, uploading the file to Google Drive fails similarly 16 characters inside the parentheses work, but not 17 It's not the space character inside the parentheses that causes the issue, as I replaced it with a dash and it's the same problem. Anybody has any ideas on what's going on here?

    Read the article

  • Finding out inside which iframe a script is executing

    - by juandopazo
    I have a page with several iframes. One of this iframes has a page from a different domain. Inside this iframe there's another iframe with a page from the parent domain. my page from mydomain.com -> an iframe -> iframe "#foo" from another-domain.com> -> iframe "#bar" from mydomain.com -> another iframe I need to get a reference to the "#foo" node inside the main page. The security model should allow me to do that because "#bar" has the same domain as the main page. So what I'm doing is iterating through the window.top array and comparing each element to the window object which is currently the "#bar" window object. My test code looks like: for (var i = 0; i < top.length; i++) { for (var j = 0; j < top[i].length; j++) { if (top[i][j] == window) { alert("The iframe number " + i + " contains me"); } } } This works fine in all browsers, but Internet Explorer 6 throws a security error when accesing top[i][j]. Any ideas on how to solve this on IE6? Thanks!

    Read the article

  • Android ProgressDialog inside another dialog

    - by La bla bla
    I'm working on a game using AndEngine, and I need to show the users the list of his Facebook friends. I've created my custom Adatper and after the loading finishes everything works great. I have a problem with the loading it self. The ListView is inside a custom dialog, since I don't really know how to create one using AndEngine, So inside this dialog, I'm running an AsyncTask to fetch the friends' info, in that AsyncTask I'm have a ProgressDialog. The problem is, the ProgressDialog shows up behind the dialog that contains the to-be list (which while loading, is just the title). I can see the ProgressDialog "peeking" behind that dialog.. Any Ideas? Here's some code: FriendsDialog.java private ProgressDialog dialog; //Constructor of the AsyncTask public FriendsLoader(Context context) { dialog = new ProgressDialog(context); dialog.setMessage("Please wait..\nLoading Friends List."); } @Override protected void onPreExecute() { dialog.requestWindowFeature(Window.FEATURE_NO_TITLE); LayoutInflater inflater = (LayoutInflater)context.getSystemService(Context.LAYOUT_INFLATER_SERVICE); dialog.setView(inflater.inflate(R.layout.loading, null)); dialog.setMessage("Please wait..\nLoading friends."); dialog.show(); } @Override protected void onPostExecute(ArrayList<HashMap<String, Object>> data) { if (dialog.isShowing()) { dialog.dismiss(); } MyAdapter myAdapter = new MyAdapter(context, data); listView = (ListView) findViewById(R.id.list); listView.setAdapter(myAdapter); listView.setOnItemClickListener(new AdapterView.OnItemClickListener() { @Override public void onItemClick(AdapterView<?> myAdapter, View myView, int myItemInt, long mylng) { String id = (String) listView.getItemAtPosition(myItemInt); listener.onUserSelected(id); dismiss(); } }); }

    Read the article

  • Getting the value of an input inside a td for each row with jQuery

    - by Anne
    I am still having so many problems with this: function padTitles() { $('tr').each(function () { var tds = $(this).find('input'), text = tds.filter('[id^="TempRowKey_"]').val(), tdToPad = tds.filter('[id^="title_"]'), pad; if (/0\.0$/.test(text)) pad = 10; else if (/\.0$/.test(text)) pad = 35; else pad = 60; tdToPad.css('paddingLeft', pad); }); } Note: here is what I was using before. This worked when the value was not inside an input: var tds = $(this).find('td'), text = tds.filter('[id^="refKey_"]').text(), It is supposed to get the Value of the Inputs with id's that start with TempRowKey_ and then use these for padding. But the code does nothing. Here is my HTML: <tr id="row_1"> <td id="tempRowKey_1" > <input type="text" size="10" value="1.0.0" class="updatable" id="TempRowKey_1"> </td> <td id="title_1"> <input id="Title_1" class="updatable" type="text" value="zxxx" size="100" name="item.Title"> </td>. <td ... </tr> Is there some way I can test this. I can't get access to anything inside the jQuery block?

    Read the article

  • matching images inside a link in regex

    - by user225269
    What is wrong with regex pattern that I created: $link_image_pattern = '/\<a\shref="([^"]*)"\>\<img\s.+\><\/a\>/'; preg_match_all($link_image_pattern, $str, $link_images); What I'm trying to do is to match all the links which has images inside of them. But when I try to output $link_images it contains everything inside the first index: <pre> <?php print_r($link_images); ?> </pre> The markup looks something like this: Array ( [0] = Array ([0] = " <p>&nbsp;</p> <p><strong><a href="url">Title</a></strong></p> <p>Desc</p> <p><a href="{$image_url2}"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;" title="image" border="0" alt="image" src="{$image_url2}" width="569" height="409"></a></p> But when outputting the contents of the matches, it simply returns the first string that matches the pattern plus all the other markup in the page like this: <a href="{$image_url}"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;" title="image" border="0" alt="image" src="{$image_url}" width="568" height="347"></a></p> <p>&nbsp;</p> <p><strong><a href="url">Title</a></strong></p> <p>Desc</p> <p><a href="{$image_url2}"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;" title="image" border="0" alt="image" src="{$image_url2}" width="569" height="409"></a></p>")

    Read the article

  • use jquery inside data returnd by ajax using " innerHtml"

    - by me.again
    hi , I want to use jquery inside data returnd by ajax using " innerHtml" .. look here , <a href=\"#\" onclick=\"$.post('". $url ."', {'t' : 't'}, function(data){ $('content_rows').attr('innerHTML',data);}); " . $this->js_rebind .";return false;\">" $text .'</a>'; this link makes moving between the pages by ajax "by reloading the div that contains the data" , without - of course - reloading whole page . like this : <div id="content_rows"> rows from mysql database </div> now everything is Ok , but , I use " detailsRow Plugin " like this : <script type="text/javascript"> $(document).ready(function() { $('#rows').detailsRow('admin/blog/detailsRow',{ data:{"id":"id"} , dataType: "script" }); }); </script> this plugin makes every TR/Row in the table get more details by click (+-) .. go there : http://webworkflow.co.uk/plugins/detailsRow/ now this plugin works fine in the frist page ( before reload the div by jquery ) but after reloading the div and in the other pages or also when I go back to the frsit page it dos`nt work .. I put the code inside content_rows div like this : <div id="content_rows"> <script type="text/javascript"> $(document).ready(function() { $('#rows').detailsRow('admin/blog/detailsRow',{ data:{"id":"id"} , dataType: "script" }); }); </script> </div> but also doesnt work .. sorry I`m beginner in jQuery .. thanks ..

    Read the article

  • Cisco Pix how to add an additional block of static ip addresses for nat?

    - by Scott Szretter
    I have a pix 501 with 5 static ip addresses. My isp just gave me 5 more. I am trying to figure out how to add the new block and then how to nat/open at least one of them to an inside machine. So far, I named a new interface "intf2", ip range is 71.11.11.58 - 62 (gateway should 71.11.11.57) imgsvr is the machine I want to nat to one of the (71.11.11.59) new ip addresses. mail (.123) is an example of a machine that is mapped to the current existing 5 ip block (96.11.11.121 gate / 96.11.11.122-127) and working fine. Building configuration... : Saved : PIX Version 6.3(4) interface ethernet0 auto interface ethernet0 vlan1 logical interface ethernet1 auto nameif ethernet0 outside security0 nameif ethernet1 inside security100 nameif vlan1 intf2 security1 enable password xxxxxxxxx encrypted passwd xxxxxxxxx encrypted hostname xxxxxxxPIX domain-name xxxxxxxxxxx no fixup protocol dns fixup protocol ftp 21 fixup protocol h323 h225 1720 fixup protocol h323 ras 1718-1719 fixup protocol http 80 fixup protocol rsh 514 fixup protocol rtsp 554 fixup protocol sip 5060 fixup protocol sip udp 5060 fixup protocol skinny 2000 no fixup protocol smtp 25 fixup protocol sqlnet 1521 fixup protocol tftp 69 names ...snip... name 192.168.10.13 mail name 192.168.10.29 imgsvr object-group network vpn1 network-object mail 255.255.255.255 access-list outside_access_in permit tcp any host 96.11.11.124 eq www access-list outside_access_in permit tcp any host 96.11.11.124 eq https access-list outside_access_in permit tcp any host 96.11.11.124 eq 3389 access-list outside_access_in permit tcp any host 96.11.11.123 eq https access-list outside_access_in permit tcp any host 96.11.11.123 eq www access-list outside_access_in permit tcp any host 96.11.11.125 eq smtp access-list outside_access_in permit tcp any host 96.11.11.125 eq https access-list outside_access_in permit tcp any host 96.11.11.125 eq 10443 access-list outside_access_in permit tcp any host 96.11.11.126 eq smtp access-list outside_access_in permit tcp any host 96.11.11.126 eq https access-list outside_access_in permit tcp any host 96.11.11.126 eq 10443 access-list outside_access_in deny ip any any access-list inside_nat0_outbound permit ip 192.168.0.0 255.255.0.0 IPPool2 255.255.255.0 access-list inside_nat0_outbound permit ip 172.17.0.0 255.255.0.0 IPPool2 255.255.255.0 access-list inside_nat0_outbound permit ip 172.16.0.0 255.255.0.0 IPPool2 255.255.255.0 ...snip... access-list inside_access_in deny tcp any any eq smtp access-list inside_access_in permit ip any any pager lines 24 logging on logging buffered notifications mtu outside 1500 mtu inside 1500 ip address outside 96.11.11.122 255.255.255.248 ip address inside 192.168.10.15 255.255.255.0 ip address intf2 71.11.11.58 255.255.255.248 ip audit info action alarm ip audit attack action alarm pdm location exchange 255.255.255.255 inside pdm location mail 255.255.255.255 inside pdm location IPPool2 255.255.255.0 outside pdm location 96.11.11.122 255.255.255.255 inside pdm location 192.168.10.1 255.255.255.255 inside pdm location 192.168.10.6 255.255.255.255 inside pdm location mail-gate1 255.255.255.255 inside pdm location mail-gate2 255.255.255.255 inside pdm location imgsvr 255.255.255.255 inside pdm location 71.11.11.59 255.255.255.255 intf2 pdm logging informational 100 pdm history enable arp timeout 14400 global (outside) 1 interface global (outside) 2 96.11.11.123 global (intf2) 3 interface global (intf2) 4 71.11.11.59 nat (inside) 0 access-list inside_nat0_outbound nat (inside) 2 mail 255.255.255.255 0 0 nat (inside) 1 0.0.0.0 0.0.0.0 0 0 static (inside,outside) tcp 96.11.11.123 smtp mail smtp netmask 255.255.255.255 0 0 static (inside,outside) tcp 96.11.11.123 https mail https netmask 255.255.255.255 0 0 static (inside,outside) tcp 96.11.11.123 www mail www netmask 255.255.255.255 0 0 static (inside,outside) 96.11.11.124 ts netmask 255.255.255.255 0 0 static (inside,outside) 96.11.11.126 mail-gate2 netmask 255.255.255.255 0 0 static (inside,outside) 96.11.11.125 mail-gate1 netmask 255.255.255.255 0 0 access-group outside_access_in in interface outside access-group inside_access_in in interface inside route outside 0.0.0.0 0.0.0.0 96.11.11.121 1 route intf2 0.0.0.0 0.0.0.0 71.11.11.57 2 timeout xlate 0:05:00 timeout conn 1:00:00 half-closed 0:10:00 udp 0:02:00 rpc 0:10:00 h225 1:00:00 timeout h323 0:05:00 mgcp 0:05:00 sip 0:30:00 sip_media 0:02:00 timeout uauth 0:05:00 absolute floodguard enable ...snip... : end [OK] Thanks!

    Read the article

  • Drupal Adding Span inside A tags in Nice Menus

    - by Chris
    I am trying to add drop down menus to a drupal theme which uses text sliding door CSS rounding. The current version uses a primary links injection of the span into the a tags, which works fine. But doesn't support drop down menus. Working code: <?php print theme('links', $primary_links, array('class' => 'links primary-links')) ?> In the template with a template.php file addition: <?php // function for injecting spans inside anchors which we need for the theme's rounded corner background images function strands_guybrush_links($links, $attributes = array('class' => 'links')) { $output = ''; if (count($links) > 0) { $output = '<ul'. drupal_attributes($attributes) .'>'; $num_links = count($links); $i = 1; foreach ($links as $key => $link) { $class = $key; // Add first, last and active classes to the list of links to help out themers. if ($i == 1) { $class .= ' first'; } if ($i == $num_links) { $class .= ' last'; } if (isset($link['href']) && ($link['href'] == $_GET['q'] || ($link['href'] == '<front>' && drupal_is_front_page()))) { $class .= ' active'; } $output .= '<li'. drupal_attributes(array('class' => $class)) .'>'; if (isset($link['href'])) { $link['title'] = '<span class="link">' . check_plain($link['title']) . '</span>'; $link['html'] = TRUE; // Pass in $link as $options, they share the same keys. $output .= l($link['title'], $link['href'], $link); } else if (!empty($link['title'])) { // Some links are actually not links, but we wrap these in <span> for adding title and class attributes if (empty($link['html'])) { $link['title'] = check_plain($link['title']); } $span_attributes = ''; if (isset($link['attributes'])) { $span_attributes = drupal_attributes($link['attributes']); } $output .= '<span'. $span_attributes .'>'. $link['title'] .'</span>'; } $i++; $output .= "</li>\n"; } $output .= '</ul>'; } return $output; } ?> So I have added the [Nice Menu module][1] which works well and allows the drop down menu functions for my navigation which is now addressed from the template using: <?php print theme_nice_menu_primary_links() ?> The issue is that the a tags need to have spans inside to allow for the selected state markup. I have tried every angle I could find to edit the drupal function menu_item_link which is used by nice menus to build the links. E.g. I looked at the drupal forum for two days and no joy. The lines in the module that build the links are: function theme_nice_menu_build($menu) { $output = ''; // Find the active trail and pull out the menus ids. menu_set_active_menu_name('primary-links'); $trail = menu_get_active_trail('primary-links'); foreach ($trail as $item) { $trail_ids[] = $item['mlid']; } foreach ($menu as $menu_item) { $mlid = $menu_item['link']['mlid']; // Check to see if it is a visible menu item. if ($menu_item['link']['hidden'] == 0) { // Build class name based on menu path // e.g. to give each menu item individual style. // Strip funny symbols. $clean_path = str_replace(array('http://', '<', '>', '&', '=', '?', ':'), '', $menu_item['link']['href']); // Convert slashes to dashes. $clean_path = str_replace('/', '-', $clean_path); $class = 'menu-path-'. $clean_path; $class .= in_array($mlid, $trail_ids) ? ' active' : ''; // If it has children build a nice little tree under it. if ((!empty($menu_item['link']['has_children'])) && (!empty($menu_item['below']))) { // Keep passing children into the function 'til we get them all. $children = theme('nice_menu_build', $menu_item['below']); // Set the class to parent only of children are displayed. $class .= $children ? ' menuparent ' : ''; // Add an expanded class for items in the menu trail. $output .= '<li id="menu-'. $mlid .'" class="'. $class .'">'. theme('menu_item_link', $menu_item['link']); // Build the child UL only if children are displayed for the user. if ($children) { $output .= '<ul>'; $output .= $children; $output .= "</ul>\n"; } $output .= "</li>\n"; } else { $output .= '<li id="menu-'. $mlid .'" class="'. $class .'">'. theme('menu_item_link', $menu_item['link']) .'</li>'."\n"; } } } return $output; } As you can see the $output uses menu_item_link to parse the array into links and to added the class of active to the selected navigation link. The question is how do I add a span inside the a tags OR how do I wrap the a tags with a span that has the active class to style the sliding door links? drupal.org/project/nice_menus drupal.org/node/53233

    Read the article

  • Formatting a date string when the string sits inside another string

    - by sf
    Hi, I'm trying to figure out a way to format a date string that sits inside string using javascript. The string can be: "hello there From 2010-03-04 00:00:00.0 to 2010-03-31 00:00:00.0" or "stuff like 2010-03-04 20:00:00.0 and 2010-03-31 00:00:02.0 blah blah" I'd like it to end up like: "stuff like 4 March 2010 and 31 March 2010 blah blah" Does anyone have any idea as to how this could be achieved?

    Read the article

  • ASPx GridView , combobox inside of detailed grid, all the time has null value on Updating

    - by evgelen
    I have a combobox inside of detailed Devexpress grid. In edit mode on Updating event the combobox always has e.OldValues and e.NewValues always null, even when you change it.. any ideas or work around ??? Please see my code below <-PropertiesComboBox DataSourceID="DataSource" TextField="Name" ValueField="ID" ValueType="System.Int32" protected void ASPxGridView2_RowUpdating(object sender, ASPxDataUpdatingEventArgs e) { object test1 = e.NewValues["Email"]; e.Cancel = true; }

    Read the article

  • How to strike out inside LaTeX equations?

    - by Aamir
    Please see the snippet below and tell me how can I achieve the same strike-out effect as in the main text. I am using the version of LaTeX from the latest Ubuntu repositories. \documentclass{article} \usepackage{ulem} \begin{document} The sout tag works perfect in the \sout{main text area} but not inside the equations. $$ list = [1, \sout{2}, 3, \sout{4}, 5, \sout{6}, 7, \sout{8}, 9, \sout{10}] $$ Any clue? \end{document} Here is LaTeX output

    Read the article

  • MPMoviePlayerController fullscreen movie inside a UIWebView

    - by Wakazors
    Hi, I'm having a problem with the UIWebView and MPMoviePlayerController: My UIWebView have a movie inside the html (it's a local html file), I'm using html5 and a video tag for the video. The problem is: the user can set the video to play inline, directly on the html or he can tap the fullscreen button, but I need to know if the video is playing fullscreen. I've tried to use MPMoviePlayerDidEnterFullscreenNotification but with no success. Does anybody know how to get this notification from the webview? Thanks in advance

    Read the article

  • Detecting wether a point is inside or outside of a raphael.js shape

    - by betamax
    I have a raphael.js shape which I am plotting circle's on top of. I only want a circle to appear if the circle does not go off the boundary of the shape it is being plotted on to. To make this more clear, here is an example of what I do not want to happen: I want the circles outside of the grey area not to appear. How would I detect wether a circle is inside or outside of the grey shape?

    Read the article

  • Eval Smarty Code inside a Smarty Template

    - by clops
    Hi, is there a way to evaluate Smarty Code inside an existing Smarty template? For example, I may have the following construct: smartyTemplate.tpl <body> <div id="dynamicPart"> {$valueFromDatabase} </div> </body> Whereas the Smarty variable $valueFromDatabase contains another Smarty Template which I would like to be inserted in place of the variable and then evaluated as a template (with all the logic expressions in replacements neccessary).

    Read the article

  • OnFinishInflate inside ListActivity

    - by zegnus
    I have a main class filled with a cursor adapter: public class MainMenu extends ListActivity{ ... private void updateData(){ ... SimpleAdapter notes = new SimpleAdapter(this, array, R.layout.row_task, from, to); setListAdapter(notes); } } I need to know when this list has finnished to inflate it, so I've discovered this methods: ListView.onFinishInflate()... But I have no idea how to override it inside my code. Any idea?

    Read the article

< Previous Page | 16 17 18 19 20 21 22 23 24 25 26 27  | Next Page >