Search Results

Search found 6730 results on 270 pages for 'loaded'.

Page 10/270 | < Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >

  • Google Maps within a dynamically loaded jquery Accordion

    - by marr75
    I'm trying to load a google map within a jquery ui accordion with contents loaded by ajax. $("h2", "#accordion").click(function(e) { var contentDiv = $(this).next("div"); if (contentDiv.children().length == 1) { contentDiv.load($(this).find("a").attr("href")); contentDiv.ready(function(){ var latlng = new google.maps.LatLng(-34.397, 150.644); var myOptions = { zoom: 8, center: latlng, mapTypeId: google.maps.MapTypeId.ROADMAP }; var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions); }) } }); That's my current code (Google Maps API V3), but it redirects to the url of the href when I click currently, obviously with no google map because there's no javascript in this response. If I comment out the map line everything works fine (except the map itself).

    Read the article

  • ASP.NET: How to initialize when *user control* is initially loaded

    - by kendor
    I have an ASP.NET user control that I'm embedding in another user control. This works fine. I need to know the best logic/method for detecting when the control is loaded. In other words, I have some display initialization logic that needs to run when the control is initially displayed. Surely there is a pattern for this. The typical method is to put (!IsPostBack) logic in the Page_Load method of the control. This works great until you end up with a state when the Parent page has already posted back many times. My user control gets added to the page but its display does not intialize properly. I'm hoping to find a way that keeps this logic inside the control, versus various hacking around in the codebehind of the parent page.

    Read the article

  • cant populate cells with an array when i have loaded a second UITableViewController

    - by richard Stephenson
    hi there, im very new to iphone programming, im creating my first app, (a world cup one) the first view is a table view. the cell text label is filled with an array, so it shows all the groups (group a, B, c,ect) then when you select a group, it pulls on another UITableViewcontroller, but whatever i do i cant set the text label of the cells (e.g france,mexico,south africa, etc. infact nothin i do to the cellForRowAtIndexPath makes a difference , could someone tell me what im doing wrong please Thanks `here is my code for the view controller #import "GroupADetailViewController.h" @implementation GroupADetailViewController @synthesize groupLabel = _groupLabel; @synthesize groupADetail = _groupADetail; @synthesize teamsInGroupA; #pragma mark Memory management - (void)dealloc { [_groupADetail release]; [_groupLabel release]; [super dealloc]; } #pragma mark View lifecycle - (void)viewDidLoad { [super viewDidLoad]; // Set the number label to show the number data teamsInGroupA = [[NSArray alloc]initWithObjects:@"France",@"Mexico",@"Uruguay",@"South Africa",nil]; NSLog(@"loaded"); // Set the title to also show the number data [[self navigationItem]setTitle:@"Group A"]; //[[self navigationItem]cell.textLabel.text:@"test"]; //[[self navigationItem] setTitle[NSString String } - (void)viewDidUnload { [self setgroupLabel:nil]; } #pragma mark Table view methods - (NSInteger)numberOfSectionsInTableView:(UITableView*)tableView { // Return the number of sections in the table view return 1; } - (NSInteger)tableView:(UITableView*)tableView numberOfRowsInSection:(NSInteger)section { // Return the number of rows in a specific section // Since we only have one section, just return the number of rows in the table return 4; NSLog:("count is %d",[teamsInGroupA count]); } - (UITableViewCell*)tableView:(UITableView*)tableView cellForRowAtIndexPath:(NSIndexPath*)indexPath { static NSString *cellIdentifier2 = @"Cell2"; // Reuse an existing cell if one is available for reuse UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifier2]; // If no cell was available, create a new one if (cell == nil) { NSLog(@"no cell, creating"); cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellIdentifier2] autorelease]; [cell setAccessoryType:UITableViewCellAccessoryDisclosureIndicator]; } NSLog(@"cell already there"); // Configure the cell to show the data for this row //[[cell textLabel]setText:[NSString string //[[cell textLabel]setText:[teamsInGroupA objectAtIndex:indexPath.row]]; //NSUInteger row = [indexPath row]; //[cell setText:[[teamsInGroupA objectAtIndex:indexPath:row]retain]]; //cell.textLabel.text:@"Test" [[cell textLabel]setText:[teamsInGroupA objectAtIndex:indexPath.row]]; return cell; } @end #import "GroupADetailViewController.h" @implementation GroupADetailViewController @synthesize groupLabel = _groupLabel; @synthesize groupADetail = _groupADetail; @synthesize teamsInGroupA; #pragma mark Memory management - (void)dealloc { [_groupADetail release]; [_groupLabel release]; [super dealloc]; } #pragma mark View lifecycle - (void)viewDidLoad { [super viewDidLoad]; // Set the number label to show the number data teamsInGroupA = [[NSArray alloc]initWithObjects:@"France",@"Mexico",@"Uruguay",@"South Africa",nil]; NSLog(@"loaded"); // Set the title to also show the number data [[self navigationItem]setTitle:@"Group A"]; //[[self navigationItem]cell.textLabel.text:@"test"]; //[[self navigationItem] setTitle[NSString String } - (void)viewDidUnload { [self setgroupLabel:nil]; } #pragma mark Table view methods - (NSInteger)numberOfSectionsInTableView:(UITableView*)tableView { // Return the number of sections in the table view return 1; } - (NSInteger)tableView:(UITableView*)tableView numberOfRowsInSection:(NSInteger)section { // Return the number of rows in a specific section // Since we only have one section, just return the number of rows in the table return 4; NSLog:("count is %d",[teamsInGroupA count]); } - (UITableViewCell*)tableView:(UITableView*)tableView cellForRowAtIndexPath:(NSIndexPath*)indexPath { static NSString *cellIdentifier2 = @"Cell2"; // Reuse an existing cell if one is available for reuse UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifier2]; // If no cell was available, create a new one if (cell == nil) { NSLog(@"no cell, creating"); cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellIdentifier2] autorelease]; [cell setAccessoryType:UITableViewCellAccessoryDisclosureIndicator]; } NSLog(@"cell already there"); // Configure the cell to show the data for this row //[[cell textLabel]setText:[NSString string //[[cell textLabel]setText:[teamsInGroupA objectAtIndex:indexPath.row]]; //NSUInteger row = [indexPath row]; //[cell setText:[[teamsInGroupA objectAtIndex:indexPath:row]retain]]; //cell.textLabel.text:@"Test" [[cell textLabel]setText:[teamsInGroupA objectAtIndex:indexPath.row]]; return cell; } @end

    Read the article

  • Release a retain UIImage property loaded via imageNamed?

    - by user158103
    In my class object i've defined a (nonatomic, retain) property for UIImage. I assigned this property with an image loaded via [UIImage imageNamed:@"file.png"]; If at some point I want to reassign this property to another image, should I have to release the prior reference? I am confused because by the retain property I know i should release it. But because imageNamed is a convenience method (does not use alloc), im not sure what rule to apply here. Thanks for the insight!

    Read the article

  • UITableViewCells loaded from NIB always nil

    - by Jason B
    I'm trying to create a simple form using a UITableViewController as documented in the Apple Developer Documentation here: http://developer.apple.com/iphone/library/documentation/UserExperience/Conceptual/TableView_iPhone/TableViewCells/TableViewCells.html What I'm trying to do is located in the section entitled: "The Technique for Static Row Content" I've created a couple of UITableViewCells and added them to my nib, but when I try and access them to add them to the UITableView (in the cellForRowAtIndexPath method) they are always null. It's like they are not being properly loaded from the nib. I've double/triple/quadruple checked my code to make sure I'm doing it exactly as detailed in the docs, but no luck. Is there something obvious I'm missing here? Thanks

    Read the article

  • MVVM-Light Loaded Evented Executing Twice

    - by user275561
    Let me show the code first, The Control <ItemsControl.ItemsPanel> <ItemsPanelTemplate> <Controls:MatrixGrid x:Name="matrixGrid"> <i:Interaction.Triggers> <i:EventTrigger EventName="Loaded"> <cmd:EventToCommand Command="{Binding MatrixLoaded}" CommandParameter="{Binding ElementName=matrixGrid}" /> </i:EventTrigger> </i:Interaction.Triggers> </Controls:MatrixGrid> <ItemsControl.ItemsPanel> <ItemsPanelTemplate> In The ViewModel Class I have public RelayCommand<MatrixGrid> MatrixLoaded { get; private set; } In The Constructor of the View Model I have MatrixLoaded = new RelayCommand<MatrixGrid>(MatrixGridAction); Now When I put a Breakpoint on the Function MatrixGridAction, The breakpoint is hit twice. Am I doing something wrong or is this a bug?

    Read the article

  • Updating Label on previously loaded view?

    - by fuzzygoat
    I am working on a simple app tab-bar based application that has two views. The first is the main application and the second is a simple instruction screen. What I am trying to do is create a update a label on that second screen as things change in the main app. Because the second screen is only simple with one label and some text I am not unloading it once its loaded. After the first viewDidLoad I can update the label just fine, but after that is there a way to catch successive view switches from the tab-bar menu so I can update the label? many thanks gary

    Read the article

  • How to automatically execute python script when Maya first loaded

    - by tep
    Hi, I am new to Maya and trying to figure out how to use Python in Maya. I wanted to create a shelf in Maya and when I click that shelf, it will execute a file containing python code. First thing, I figured out that we can't simply "source" python script. I followed tutorial from http://www.rtrowbridge.com/blog/2008/11/maya-python-import-scripts/, so now I have a function psource(). In my shelf, I can just call psource("myPythonScript") My problem is I have to somehow register psource() when Maya first loaded. Do you have any idea how to do this? Thanks!

    Read the article

  • Microsoft chart images are not loaded from MOSS server

    - by hd
    hi, i have webpage in which a webpart contains a Chart control. the problem is chart control is rendered perfectly when i login as central admin. but when i login as another user with contribute permisson following problems occur. when i change webconfig as --- add key="ChartImageHandler" value="storage=file;timeout=20;dir=c:\TempImageFiles\;"--- page is not at all loaded. i get error like YOU ARE NOT AUTHORIZED TO VIEW THIS PAGE. when i change the wbconfig as --- add key="ChartImageHandler" value="storage=memory;timeout=20;URL=/_layouts/Images/MicrosoftChartControls/" --- the page loads fine but image is not rendered. A red mark appears in place of image. I tried all optins got by googling.. any more suggestions/help will be welcomed

    Read the article

  • Execute jQuery code when images have loaded from external resource

    - by Nick Swan
    Hi all, I'm getting users profile pictures from Facebook so their loading time varies quite a lot. When they have loaded I want to resize them. I have the resizing code working OK, but cannot get the actual code to execute reliably at the right time. According to the info I've found this should work: $('.userPic').load(function () { ... code to resize pictures }); But it doesn't seem 100% reliable. Any other hints or tips? Thanks Nick Swan

    Read the article

  • Get value from ajax-loaded form before submitting

    - by ldvldv
    Hi, I have an app that loads an ajax form when a button is clicked. I then want to check a value in that ajax loaded form called "comment_content" so that I don't send an ajax request if the comment_content is empty. I can capture the form submission using the live method, however, I can't capture the form element because it needs an element. I was looking at livequery but was wondering if there is a more efficient way by using live or if that I shouldn't even bother? Your help is very much appreciated. $("#comment_submit").live('click', function(){ var comment = $("#comment_content").html(); if(comment == ""){ $("#notice").html("").stop(true, true); $("#notice").append("<p>Are you going to write something in that comment?</p>"); $('#notice').slideDown().delay(2000).slideUp(); return false; } return true; });

    Read the article

  • Accessing a Clip Inside Another Clip in a Loaded SWF-File

    - by Anders
    I'm writing a card game in AS3. The artist I'm working with has produced (in Flash CS4) a single swf-file containing all the card graphics and animations. The structure of the fla working file looks something like this: - Scene - CardGraphics (Movie Clip) - CardFront - CardBack - CardValueImage (Movie Clip) ... In the program I create 52 instances of my Card class, each having a MovieClip instance created from the loaded swf. The idea is to set the frame of the CardValueImage MovieClip to correspond to the Card instance's suit and rank member variables. However, I can't figure out how I access CardValueImage and call gotoAndStop (or whatever method I will need to call). This is basically what I want to do: // Card Class [Embed(source = 'CardGraphics.swf')] private static var CardsClip:Class; private var clip:MovieClip = new CardsClip; // Card Constructor this.valueImageFrame = suit * 13 + rank; // Calculate which frame contains the // graphical representation of this card this.clip.CardValueImage.gotoAndStop(valueImageFrame);

    Read the article

  • Checking lazy loaded properties have been instantiated

    - by PaulG
    In a class which has a lazy loaded property, such as: private Collection<int> someInts; public Collection<int> SomeInts { get { if (this.someInts == null) this.someInts = new Collection<int>(); return this.someInts; } } Is it worth also having a property such as: public bool SomeIntsExist { get { return (this.someInts != null && this.someInts.Count > 0); } } And then using that property.. eg: if (thatClass.SomeIntsExist) { // do something with thatClass.SomeInts collection } or is this premature optimisation. Its certainly easier to roll with something like below, but it will instantiate the collection needlessly: if (thatClass.SomeInts.Count > 0) { // do something with thatClass.SomeInts collection } Is the compiler smart enough to figure things like this out? Is there a better way?

    Read the article

  • How do I confirm a pdf loaded correctly with Watir webdriver testing

    - by Mike Rose
    This is a general type question that I dont know what code I could post that would help get an answer. So I apologize in advance, but if some piece of code would help, please let me know and Ill add it. The question is, how do I confirm that a pdf loaded in a web browser when using Ruby/Cucumber/Watir Webdriver? My test clicks on a random link that should load a pdf in a new browser window, so I cant check the url because it will vary with each test. Any ideas how I can make sure the correct pdf loads after clicking the link that should load it?

    Read the article

  • Image not loading from cache after it's loaded in an iframe

    - by Amir
    I'm loading an image in an iframe and then (once the iframe is loaded) loading the image on the page. But most browsers seem to be loading the image twice. Why isn't the img tag being loading from the cache? Something like this: var loader = $('<iframe />').appendTo('body')[0]; loader.onload = function() { $('body').append('<img src="' + imgsrc + '" />'); }; loader.src = imgsrc; http://jsfiddle.net/amirshim/na3UA/ I'm using fiddler2 to see the network traffic. In case you want to know why I want to do this, check out this question

    Read the article

  • Context menu for loaded SWF

    - by Palantar
    I have a Flex app with a viewport that loads a series of other swfs. I would like to place a context menu over top of the SWFs when the user right-clicks. To that end, I have set up a fairly standard context menu where each item has a ContextMenuEvent.MENU_ITEM_SELECT event handler. One problem: The eventHandler never gets called. If I place the context-menu code anywhere else in the app, i.e. not on top of a loaded SWF, everything works fine. However, when I place the exact same code on the SWF viewport, the context menu items appear, but the eventHandlers are never called. Any ideas?

    Read the article

  • Other class view cannot be loaded into TabBar Controller

    - by SkyEagle888
    Hi, I am making a project with 3 child views that are switched by a TabBar. What I did Create a project (Window-Based) Add 3 child classes (Window-Based too) Add a Tab Bar Controller to MainWindow.xib For each view under Tab Bar Controller, the 'Class', 'Name', 'Title' and 'NIB Name' are all set to connect to the corresponding class Add @class, IBOutlet are done in AppDelegate.h and AppDelegate.m In didFinishLaunchingWithOptions, I called [window addSubView: tabBarController.view]; Save and Run -- Tab Bar with 3 items can be seen But ... the 3 child views ARE NOT LOADED and SHOWN ... :( Anything that I missed ? Million Thanks

    Read the article

  • Shared static classes between AppDomains in loaded library code

    - by Christian Stewart
    I'm working on a program in which I want to do something similar to what the Photon Server system does: Offer a common "API" class library, which contains common data classes, enumerations, and interfaces for working with the host program. Have client programs (class libraries) reference this DLL and implement interfaces listed within it. Have the "host" application load built DLL client libraries into separate AppDomains and reference the interfaces that lie within to have polymorphic client code from within a dll file. I have something like this worked out: a class library that contains common code, but I've run into the following question How should I handle static classes? Should I add a method that is called by the host program to synchronize data? How do I keep a static class the same between AppDomains? Should I discard these classes in favor of better interfaces between the code levels? And in general, how do I share data between these loaded AppDomains?

    Read the article

  • Textures loaded with NSOperation are blank

    - by Omega
    So I call this method: -(void)beginExecution { NSOperationQueue *queue = [NSOperationQueue new]; NSInvocationOperation *operation = [[NSInvocationOperation alloc] initWithTarget:self selector:@selector(execute) object:nil]; [queue addOperation:operation]; [operation release]; } Which triggers this: -(void)execute { [[CCSpriteFrameCache sharedSpriteFrameCache]addSpriteFramesWithFile:@"MyTexture.plist"]; loaded = YES; // This tells me whenever loading is done. } However, when I create a sprite and try to use the texture MyTexture.png, the sprite is a blank canvas. Why is that?

    Read the article

  • image is not getting loaded in view.

    - by anurag
    I have created 2 views named "FirstView" and "SecondView".SecondView's nib file has an UIImage view object as its IBOtlet.Now I am getting an UIImage object from some FirstViewController's method.Now I am setting the SecondViewController's imageView property with that image and then I am pushing my SecondView Controller's object in Navigation Controller.The SecondView gets loaded but that image is not shown in that view. The code is as follows:..... - (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingImage:(UIImage *)img editingInfo:(NSDictionary *)editInfo { [[picker parentViewController] dismissModalViewControllerAnimated:YES]; SecondViewController *secondView=[[SecondViewController alloc] initWithNibName:@"SecondViewController" bundle:[NSBundle mainBundle]]; secondView.imageView.image=img; [self.navigationController pushViewController:secondView animated:YES]; }

    Read the article

  • image is not getting loaded in view.

    - by anurag
    I have created 2 views named "FirstView" and "SecondView".SecondView's nib file has an UIImage view object as its IBOtlet.Now I am getting an UIImage object from some FirstViewController's method.Now I am setting the SecondViewController's imageView property with that image and then I am pushing my SecondView Controller's object in Navigation Controller.The SecondView gets loaded but that image is not shown in that view. The code is as follows:..... (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingImage:(UIImage *)img editingInfo:(NSDictionary *)editInfo { [[picker parentViewController] dismissModalViewControllerAnimated:YES]; SecondViewController *secondView=[[SecondViewController alloc] initWithNibName:@"SecondViewController" bundle:[NSBundle mainBundle]]; secondView.imageView.image=img; [self.navigationController pushViewController:secondView animated:YES]; }

    Read the article

  • Adding mouse events to dynamically loaded SWF

    - by Josamoto
    I am loading an external SWF using the Loader class, and adding it to the stage with addChild. When trying to add a mouse click event listener to the MovieClip, using addEventListener, nothing happens, the event never fires. Is there a specific way to add listeners to externally loaded movie clips? My code looks somewhat like this: var target:MovieClip = assets["screensaver"] as MovieClip; target.root.addEventListener(MouseEvent.CLICK, onClickScreenSaver, true); addChild(target); The target shows up on the display, but the CLICK event is completely ignored.

    Read the article

  • Delay the display of image loaded using jquery + ajax

    - by niczoom
    I am using the following code : $.ajax({ url: "pgiproxy.php", data: ({ data : $("#formdata").serialize(), mode : "graph"}), success: function(result){ var temp = $('<div/>').html(result); var val = temp.find('center').html(); $('#BFX').html(val); }, error: function(){ $("#error").html("ERROR !!!"); } }); The 'result' from the ajax call to 'pgiproxy.php' is a whole web page (returned as a string), this is then converted to a jQuery object and stored in 'var'. I then extract the data I need (a .gif image) using .find() which is stored in 'val'. This image is then inserted into a #BFX div for display. My problem is every successive time I click my button to update this image it shows the image loading from top to bottom as it is reading it in from the web. Is there a way to only display this image once it has fully loaded so the user doesnt see the image loading and only sees the image change instantly.

    Read the article

  • Stopping jQuery Jumping to Newly Loaded Content.

    - by Damien
    I have a div with is replaced upon certain user actions. These actions are performed under the div that is being replaced and in the case that the div is too large to fit completely into the view window, along with the buttons used to change it underneath, the browser will jump to the top of the newly loaded div. Which is annoying. Does anyone know of a way to stop these? Cheers. Here is the jQuery code. ChartContent is a small blob of html function UpdateChartImage(ChartContent) { //do updates on div here var existingChart = $("#" + $(ChartContent).attr("id")); existingChart.fadeOut("fast", function() { existingChart.replaceWith(ChartContent); }).fadeIn("fast"); } Incidentally I have prevented the button from doing it's default behaviour so I don't think it's related to that.

    Read the article

  • extension file "curl" is must be loaded

    - by Sharvan
    Using XAMPP 1.6.7 I installed the community version of Magento. But there seems to be a problem. I am getting the error message 'extension file "curl" is must be loaded'. In another computer, everything seems fine. (the other computer) intel(R) Pentium(R) Dual CPU, E2140 @ 1.60Hz, 1.60 GHz. 504 MB of RAM and XP professional 2002 sp2 My computer is less powerful (Inet Pentium 4 1.6 GHz. with sp2.) Please help me, thanks.

    Read the article

< Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >