Search Results

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

Page 105/584 | < Previous Page | 101 102 103 104 105 106 107 108 109 110 111 112  | Next Page >

  • Silverlight avoid lose focus on datagrid

    - by lidermin
    Hi, I have a question: How could I keep the focus on a combobox of a cell inside a datagrid in edit mode; even when I drag a textbox inside a scroll viewer to drag & drop. This is the behaviour I need: The user start to edit a cell by double clicking, and a combobox is showed, then the user could drag and drop some text (one of the texboxes inside the scroll viewer) to the combobox I mentioned. The issue is: when I click on one those textboxes to drag & drop, I lose the focus of the datagrid, and I can't drop it to the cell (the combobox), because I lose the edit mode (it's not a combobox anymore, the datagrid is on query mode). How can I achieve the behaviour I need? Please help. Thanks.

    Read the article

  • PHP: How to automate building a 100 <UL>/<LI> menuitems, while keeping the Menu Structure File Flat / Simply Managable?

    - by Sam
    Above: current "stupid" menu. (entire ul/li menu for javascript menu system) + (some li lines as page-specific submenu) Hi folks! With passion for automation and elegancy, but limited knowledge/knowhow, im stuck with "my hands in my hair" as we Dutch say, for my current menu system works perfectly, but is a pain in the a*s to update! So, i would appreciate it greatly, if you can suggest how to automate this in php: how to let the php generate the html menu code basing on a flat menu input file with TABS indented. OLD SITUATION <ul> <!-- about 100 of these <li>....</li> lines --> <li><a href="carrot.php"><p class="mnu" style="background-position:0 -820px"><? echo __("carrot juice") ?></p></a></li> <!-- lots of data, with only little bit thats really the menu itself--> </ul a javascript file reads a ul/li structure as input to build menu of format in that ul/li, the items with a hyperlink and sprite-bg position represent webpages, (inside LI) while items without hyperlink and sprite-bg are just headers of that menusection, (inside H6) to highlight the current page in the menu, the javascript menumaker uses an id number. this number corresponds to the consequtive li that is a webpage, skips h6 headers correctly. these h6 headers are only there for when importing sections of the same menu as submenu. non-li headers are not shown in menu, nore counted by the javascript menu for their ID. to know which page should be shown, i have to count from ID 0, the li items till finding the current webpage in the li structure and then manually put it in each webpage! BUT: changing an item in li order, means stupidly re-counting their entire li again! each webpage has an icon (= sprite bg-position numer), which is also used in the webpage. INTENDED RESULT I dream of, once setting what the current webpage is (e.g carrot.php) the menu system automatically "finds" and "counts" the li's and returns the id nr (for proper highlight of main menu); generates the entire menu html, and depending on which headings are set for submenu, (e.g. meals, drinks) generates those submenu (entire section below each given header); ginally adds h5 highlight inside the li of that submenu item. For the menu, i wish an easily readable, simple plain txt menu that is indented with tabs, (each tab is one depth for example) and further tabs follow for url and sprite position of icon. MY DREAM MENU-MANAGEMENT FILE |>TAB SEPARATED/INDENTED FLATMENU FILE |MUST BE CALCULATED BY PHP: |>MENUTEXT============URL=============SPRITE=====|ID===TAG================== |>about "#" -520 |00 li |> INFORMATION |—— h6 |> physical state "physical.php" -920 |01 li |> mental health "mental.php" -10 |02 li |> |>apetite "#" -1290 |03 li |> meals "#" -600 |04 li |> COLD MEAL |—— h6 |> egg salade "salad.php" -1040 |05 li |> salmon fish "salmon.php" -540 |06 li |> HOT MEAL |—— h6 |> spare ribs "spareribs.php" -120 |07 li |> di macaroni "macaroni.php" -870 |08 li |> |> drinks "#" -230 |09 li |> JUCY DRINK |—— h6 |> carrot juice "carrot.php" -820 |10 li |> mango hive "mango.php" -270 |11 li DESIRED CHRONOLOGY php outputs the entire ul/li html so the javascript can show the menu: webpage items go inside li tags, and header items go inside h6 tags, e.g. <h6>JUCY DRINK</h6> Each website page has a url filename [eg: salad.php]. Based on this given fact, the php menu generator detects the pagename, gives the IDnr of the position of that page according to the li-item nr and sets variable for javascript to highlight current menu item. the menu items below the specified headers are loaded as submenu in which the current page.php is wrapped inside h5 to highlight current page in submenu: e.g. (<li><h5><a href="carrot.php"><p>..etc..</p></h5></li> Question Which methods / steps / (chronological)ways are there for doing this? I am no good in php programming, but am learning it so please dont write any code without a line of comment why I should use that method etc. Where do I start? If I am unclear in my question, please ask. Thanks. Much appreciated!! Concrete Task List from the provided Comments/Answers, sofar: (RobertB) First, get some PHP code working that can read through a tab-delimited file and put the data into an appropriate data structure. NOW WORKING AT THIS

    Read the article

  • How can I access variables outside of current scope in javascript?

    - by sekmet64
    I'm writing some application in javascript and cannot figure it out how to access the variables declared in my function, inside this jquery parse. Inside I can access global variables, but I don't really want to create global vars for these values. Basically I want to extract file names from an xml document in the simulationFiles variable. I check if the node attribute is equal with the simName and extract the two strings inside the xml elements, that part I think it's working. How can I extract those xml elements and append them to local variables? function CsvReader(simName) { this.initFileName = "somepath"; this.eventsFileName = "somepath"; $(simulationFiles).find('simulation').each(function() { if ($(this).attr("name") == simName) { initFileName += $(this).find("init").text(); eventsFileName += $(this).find("events").text(); } }); }

    Read the article

  • MongoDB efficient dealing with embedded documents

    - by Sebastian Nowak
    I have serious trouble finding anything useful in Mongo documentation about dealing with embedded documents. Let's say I have a following schema: { _id: ObjectId, ... data: [ { _childId: ObjectId // let's use custom name so we can distinguish them ... } ] } What's the most efficient way to remove everything inside data for particular _id? What's the most efficient way to remove embedded document with particular _childId inside given _id? What's the performance here, can _childId be indexed in order to achieve logarithmic (or similar) complexity instead of linear lookup? If so, how? What's the most efficient way to insert a lot of (let's say a 1000) documents into data for given _id? And like above, can we get O(n log n) or similar complexity with proper indexing? What's the most efficient way to get the count of documents inside data for given _id?

    Read the article

  • How to move to a location in a web browser component?

    - by Mostafa Mahdieh
    I have a .NET windows form page and a WebBrowser component inside. I load a page inside the web browser using the Navigate method as in: webBrowser1.Navigate("http://www.stackoverflow.com"); The pages length is longer than the browsers height, so the vertical scroll bar appears. Now I want to move the scrollbar down to a specific position. More specifically I want to search for a specific peace of text inside the page, and scroll to that position. This behavior is implemented in the built-in "Find" function of the browser, but I can't figure out how to call the Find function from within my code, without the Find window appearing. Although I don't want the Find window to appear, if the text matches are highlighted it is welcome.

    Read the article

  • Auto scroll down iframe

    - by tree-hacker
    How can I get an iframe such that when it loads up, it loads up with the page inside scrolled down by a fixed amount (say 100px)? I have so far: <iframe src="http://news.bbc.co.uk/1/hi/uk/7459669.stm" scrolling="no" width=500px height=500px></iframe> but it loads up with the bbc.co.uk page inside at the top left when I actually want it to load up scrolled part way down (that is the page inside the iframe scrolled down, not the page containing the iframe). Anyone know how to do this?

    Read the article

  • Add UserControl To Page From Another Class

    - by Raika
    I have page and call method inside my page. I want to add some control to my page Control (not page itself) inside that method. namespace Program { public partail class Default : Page { protected void Page_Load(object sender, Eventargs e) { MyClass.Calling(this); } } } in another class namespace Program { public class MyClass { public static void Calling(Page page) { Textbox txt = new Textbox() // I want somthing like this. // page.PlaceHolder1.Controls.Add(txt); } } } Is this possible? My Default.aspx : <%@ Page Title="Home Page" MasterPageFile="~/Site.master" ... %> <asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent"> <asp:PlaceHolder ID="PlaceHolder1" runat="server"></asp:PlaceHolder> </asp:Content> Update: thanks to The King for help. his suggest work correctly if control is inside page not Content of master page like my defualt sample code.

    Read the article

  • VirtualHost configuration

    - by Hari
    Hi, I need to configure two name-based virtual hosts in my ubuntu pc. If I type the address "http://mypage1" in browser, it should display my first customized html page and if I type the address "http://mypage2", it should display my second customized html page. I tried out the following: 1. installed apache 2. created a file mypage1 inside sites-available with the contents as follows: VirtualHost *:80 ServerName mypage1 ServerAlias http://mypage1 DocumentRoot /var/www/mypage1/html /VirtualHost 3. created a similar file mypage2 inside sites-available 4. ran the commands "a2ensite mypage1" and "a2ensite mypage2" to generate soft links inside sites-enabled. 5. restarted apache using "sudo /etc/init.d/apache2 restart" After doing the above steps, when I type mypage1 in firefox, I get dns_unresolved_hostname error. Kindly help me how to resolve this problem.

    Read the article

  • Write-access for c# app in it's own exe dir in Windows 7

    - by fritz
    I know that user accounts in Windows 7 are limited by default, so a program cannot just write anywhere on the system (as it was possible in Win XP). But I thought that it would be possible that e.g. a c# app is allowed to write inside it's own exe-directory or it's subfolders at least (not everything is 'user settings' or should be written to "MyDocuments"...). So currently my c# app throws an UnauthorizedAccessException when trying to write inside the exe dir. Is there anything you can do in c# code to allow writing inside the exe dir?

    Read the article

  • Android : HTTP Post Issue

    - by Ram
    HttpClient client = new DefaultHttpClient(); String data = "valid SOAP REquest"; HttpPost httpPost = new HttpPost("valid url"); Log.d("inside", "created http post"); try { ByteArrayInputStream baos = new ByteArrayInputStream(data.getBytes()); Log.d("inside", "firing request..."); HttpResponse httpResponse = client.execute(httpPost); Log.d("inside", "request sent" + httpResponse.getStatusLine().getStatusCode()); Always, I get the status code as 405. I tried request queue as well.. sneding the byte array as part of the request queue, still the same issue.

    Read the article

  • How to extract the actual NSString from json object as NSArray

    - by Toran Billups
    I'm working with a large set of json and really just need the NSString representation of what's inside the NSArray -including all the { } My question is this - is their a better way than simply looping through each NSArray inside the main NSArray and outputting the description one by one? ie- the below is a start to this process but it's very brittle meaning I need to know each item inside the hat {} and this isn't something I actually care about. I just need the json string to move forward. The working code is below (thank you in advance!) NSString* responseString = [[NSString alloc] initWithData:responseData encoding:NSUTF8StringEncoding]; [responseData release]; NSArray* json = [responseString JSONValue]; NSArray* item = [json valueForKeyPath:@"d.data"]; NSArray* hatjson = [item objectForKey:@"hat"]; NSMutableString * result = [[NSMutableString alloc] init]; for (NSObject * obj in hatjson) { [result appendString:[obj description]]; } NSLog(@"the hat json is .. %@", result);

    Read the article

  • how do I align contents of a centered div to the left?

    - by Paul
    I have centered a div inside another div but want to left justify the contents of the centered inner div. How can I do this? My current HTML looks like this: <div style="border: solid 1px #ff0000;text-align:center;"> <div style="border:solid 1px #00ff00;"> <img src="/some_url_1/" style="width: 80px; height 80px; border: 0"/> <img src="/some_url_2/" style="width: 80px; height 80px; border: 0"/> </div> </div> Currently the images are centered inside the inner div but I would like them aligned to the left inside of the centered inner div. Any idea what I'm missing?

    Read the article

  • XML comments and "--"

    - by Vi.
    <!-- here is some comment -- ^ | what can be here apart from '>'? XML seems not to like '--' inside comments. I read somewhere that '--' switchs some modes inside <! ... > thing, but <!-- -- -- --> (even number of --s) seem to be invalid too. If it is some historic feature, what is "pro" part of it? ("contra" part is inability to have -- in comments). What is the reason of complicating comment processing by not making just '--' end of comment and allowing '--' inside?

    Read the article

  • Frustrated With Wpf DataGrid

    - by user197373
    Hello Experts, I have a tabcontrol and I place datagrid inside a tabcontrol... But I could not focus that Datagrid at the load event ... Focus means I couldn't navigate through keyboard into it... I'm getting this problem only inside of the tab control otherwise it works fine...my sample project link as follows.. http://cid-0255f3152326d2b1.skydrive.live.com/browse.aspx/WPF%20Datagrid%20Problem?uc=1&nl=1 (1) Please remember note that focus means I couldn't navigate a datagrid through keyboard (2) It should be in load event......Because it works fine in other events... (3) Datagrid should be placed inside a tab control... Because it works fine outside a tab control..... I hope u wil help me... please help me out Thanks in Advance

    Read the article

  • Namespace with index action in Rails

    - by yuval
    I have an admin controller located inside /controllers/admin/admin_controller.rb I also have a pages controller located inside /controllers/admin/pages_controller.rb In my routes.rb file, I have the following: map.namespace :admin do |admin| admin.resources :pages end When the user goes to localhost:3000/admin, I'd like the user to see a page with a link to /admin/pages (Pages CRUD) and to / (To go back home). Since I am using a namespace, I cannot have an index action for /admin. How would I get this done and still have my controllers located inside my /controllers/admin folder (rather than using admin as a map.resources component and a has_many association to pages). Please note I am only interested in the show action of admin. Thank you!

    Read the article

  • java.lang.NoClassDefFoundError when the file is there

    - by tsOverflow
    I've tried to look around for postings that might help me, cant find any. I am deploying an ear to JBoss4 server, and I started having this problem since I added a new project. this new project is defined as Java project in eclipse, and the EAR project has an EJB project that has the new Java project as one of the projects as its dependent upon - if deployed on JBoss locally through eclipse, there's no problem and everything goes smoothly But when being deployed to JBoss in test environment (outside eclipse), kept getting java.lang.NoClassDefFoundError on one of the classes that are defined in the new Java project. I looked inside the EAR file to get to the jar (EJB project), and then inside the jar, I can see the directory structure and all the class files from the new Java project - ie. The class that it complains about is right there inside the EAR-JAR and matching the exact structure that it's looking for. I am at lost to what else I can look at. Any pointers are greatly appreciated! Thanks

    Read the article

  • How to use $.get data to replace certain elements in a webpage?

    - by Jack Ha
    I'm using jQuery 1.4.2 to navigate smoothly between similar webpages (in ff3). When clicking on a link, a javascript script should load the new html, filter out the right elements and replace them on the current page. It looks like the $(htmlcode) does not do the thing I expected. The actions below work when loading the page directly, but when using the $.get I have the following problems: the find function seems only to look inside a div element called id="page", which is inside the body element one of the elements has <script>...</script>, but the <script>...</script> is not present in the DOM of $(htmlcode). Anybody knows how to solve this? $.get( url, function(responseText, textStatus, xmlHttpRequest) { alert($(responseText).find("#header")); // works, #header is inside div#page alert($(responseText).find("#header").html()); // displays content, but WITHOUT the <script>...</script> alert($(responseText).find("title")); // does not work, title is outside div#page } );

    Read the article

  • Need to override cascade style

    - by WillingLearner
    i have a style : .window .div { border:medium solid #000000; height:150px; background-color: #0099FF; } and then i have another style: #NewDiv { font:Arial, Helvetica, sans-serif; font-size: 24px; height: 20px; border-bottom-width: medium; border-bottom-style: solid; border-bottom-color: #000000; } I need to put a #NewDiv div tag inside of window .div, BUT... #NewDiv must retain its own styling while sitting inside of window .div div tags. How do I do this? Currently when I try, #NewDiv takes on the same styling as window .div when i place it inside of it and i dont want that at all. Any suggestions?

    Read the article

  • Error handling in controllers with MVC

    - by twrn
    Does it make sense to do error handling and logging inside actions methods or handle the OnException method inside the controllers. One way means writing try/catches in all the action methods even when there is nothing to be done to recover from the error. Handling this at the controller level would allow logging and redirection to an error handler page without writing try/catches inside all the action methods. Which method makes the most sense? Here is example code of try/catches in an action method. [HttpPost] public ActionResult Delete(int id) { using (new Tracer("Project Controller")) { try { Logger.Write("Deleting project"); projService.DeleteProject(id); TempData["message"] = "Project Deleted successfully"; } catch (System.Exception ex) { HandleException(ex, "Project could not be deleted."); } return RedirectToAction("List"); } }

    Read the article

  • PHP class referencing confusion across multiple files

    - by DssTrainer
    I have an index.php file that has 3 includes <?php require_once('mod.php'); $mod = new Mod(); require_once('start.php'); require_once('tools.php'); ....some code.... ?> I need to be able to reference the $mod object inside the start.php and tools.php. How do I pass that object to be referenced by those 2 other require files? Basically the mod.php is a class that has an array list generated in its __construct(). I want to use that array list data inside the startup.php and tools.php file but not sure how to pass in the existing one without calling "new" inside both of those files separately which doesn't do what I need since it resets everything. Thanks!

    Read the article

  • apply CSS style to particular elements dynamically

    - by WHITECOLOR
    I have a div with paragraphs inside: <div> <p>...</p> <p>...</p> </div> I want dynamically to apply a certain style to paragraphs inside this div. Is it possible to do that without handling each paragraph element, but just attach somehow style to div element and all inside paragraphs would be affected? Maybe with jquery. It sounds for me like dynamical change of the stylesheet, is it possbile? Thanks.

    Read the article

  • How to count the number of listitems in an asp.bulletedlist with JavaScript

    - by Andy5
    Hi I have an asp:bulletedlist control, which sits inside a div tag, and I need to count the number of list items inside the control. Searching the internet, and noting the fact the html given back by the items is a list i.e. <li>, I thought I could use an example of: var listcontrol = document.getElementById('BulletedList1'); var countItems = listcontrol.getElementByTagName('li').length; However, when I do this, it throws and error saying that no object exists for this control. So, my problem is, and because I must do this clientside because I want to use this to set the height of the div tag, is how do you count the number of items inside a asp:bulletedlist control with javascript?

    Read the article

  • Where to register for C# events?

    - by themaninthesuitcase
    I am currently transitioning from VB to C# and am having some issues with regards to registering my interest in an event. When using VB it was simply a case of specifying that a method Handles and event, often this was generated by using the object events list. While I can easily use the Class.event += delegate in C# I am unsure where the best place is to place the code to do this. Am I best placing it inside of the InitializeComponent() as per the generated code (say if you select the event in the from designer) or should I place it inside the constructor for better readability/maintenance. If inside the constructor, should it be before or after the call to InitializeComponent()?

    Read the article

  • Problem with jQuery animation

    - by Daemon
    I have a problem with an animation in jQuery using ajax. On the click of an button (actually an tag), I call a ajax method, and have the following written inside the success parameter: success: function(msg) { $('.ContentsMainRight').children().fadeOut(500, function() { $('.ContentsMainRight').html(msg.d); $('.ContentsMainRight').children().fadeIn(1000); }); }, This have the following result. The contents of a div fade out over 500ms as it's supposed to. Then the html contents of the div are swapped, but then the last part did not work as I hoped. The html returned by the ajax method include some text inside a tag, and a image inside a tag. The result is that the text is automatically displayed instantly with no fadein, but the img that is put fades in over 1 second. Why is the text and image treated differently? -Daemon

    Read the article

  • Share data between local service and the hosting activity

    - by Moshik
    Hi, i need to share data between a local service and his hosting activity, i`am using sendBroadcast in order to send data to the hosting activity from the service, but if i want to send data back to the service from the hosting activity? so i though to create static method on the service, and call from the activity, and through it send the parameter, but then i cant do operations like toast inside that static method(which is inside the service).. coz you cant use "myclass.this" inside a static method, i guess there r more limits.. mybe another solution? mybe there is a proper way for this task? thanks, moshik.

    Read the article

< Previous Page | 101 102 103 104 105 106 107 108 109 110 111 112  | Next Page >