Search Results

Search found 28989 results on 1160 pages for 'modal view controller'.

Page 15/1160 | < Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >

  • ASP.NET MVC: How to Display custom object properties in View page

    - by Shyju
    I am trying to add ASP.NET MVC features(Especially Routing) to my already existing ASP.NET Web application.I added a Controlled and View (an asp.net page) .Now i want to know how can i display the details of object of my custom class( Ex : User) in the view ? Can assign the object in ViewData collection and render it in the view ? Hows that ? I already have a Datalayer (in ADO.NET) which is running for the the current ASP.NET web app.So i want to use that. I tried this in my controller public ActionResult Index() { BusinessObject.User objUser = new BusinessObject.User(); objUser.EmailId = "[email protected]"; objUser.ProfileTitle = "Web developer with 6 yrs expereince"; ViewData["objUser"] = objUser; ViewData["Message"] = "This is ASP.NET MVC!"; return View(); } How can i use this in the view page to display the user details ? Thanks in advance

    Read the article

  • Is it bad idea to extend Zend_View and register like front controller plugin

    - by user564325
    I just ask, is it bad idea to extend Zend_View and register like Front Controller plugin after router is ready, because i need, $request to get active module name to show Zend_View where are my templates ? public function routeShutdown(Zend_Controller_Request_Abstract $request){ $view = new View($config, $request); $viewHelper = new Zend_Controller_Action_Helper_ViewRenderer($view); Zend_Controller_Action_HelperBroker::addHelper($viewHelper); } And after that i get $request-getModuleName(); and make the my ScriptPaths I have tried this method $viewHelper->setViewScriptPathSpec(':controller/:action.:suffix') But can't work.

    Read the article

  • django/python: is one view that handles two sibling models a good idea?

    - by clime
    I am using django multi-table inheritance: Video and Image are models derived from Media. I have implemented two views: video_list and image_list, which are just proxies to media_list. media_list returns images or videos (based on input parameter model) for a certain object, which can be of type Event, Member, or Crag. The view alters its behaviour based on input parameter action (better name would be mode), which can be of value "edit" or "view". The problem is that I need to ask whether the input parameter model contains Video or Image in media_list so that I can do the right thing. Similar condition is also in helper method media_edit_list that is called from the view. I don't particularly like it but the only alternative I can think of is to have separate (but almost the same) logic for video_list and image_list and then probably also separate helper methods for videos and images: video_edit_list, image_edit_list, video_view_list, image_view_list. So four functions instead of just two. That I like even less because the video functions would be very similar to the respective image functions. What do you recommend? Here is extract of relevant parts: http://pastebin.com/07t4bdza. I'll also paste the code here: #urls url(r'^media/images/(?P<rel_model_tag>(event|member|crag))/(?P<rel_object_id>\d+)/(?P<action>(view|edit))/$', views.image_list, name='image-list') url(r'^media/videos/(?P<rel_model_tag>(event|member|crag))/(?P<rel_object_id>\d+)/(?P<action>(view|edit))/$', views.video_list, name='video-list') #views def image_list(request, rel_model_tag, rel_object_id, mode): return media_list(request, Image, rel_model_tag, rel_object_id, mode) def video_list(request, rel_model_tag, rel_object_id, mode): return media_list(request, Video, rel_model_tag, rel_object_id, mode) def media_list(request, model, rel_model_tag, rel_object_id, mode): rel_model = tag_to_model(rel_model_tag) rel_object = get_object_or_404(rel_model, pk=rel_object_id) if model == Image: star_media = rel_object.star_image else: star_media = rel_object.star_video filter_params = {} if rel_model == Event: filter_params['event'] = rel_object_id elif rel_model == Member: filter_params['members'] = rel_object_id elif rel_model == Crag: filter_params['crag'] = rel_object_id media_list = model.objects.filter(~Q(id=star_media.id)).filter(**filter_params).order_by('date_added').all() context = { 'media_list': media_list, 'star_media': star_media, } if mode == 'edit': return media_edit_list(request, model, rel_model_tag, rel_object_id, context) return media_view_list(request, model, rel_model_tag, rel_object_id, context) def media_view_list(request, model, rel_model_tag, rel_object_id, context): if request.is_ajax(): context['base_template'] = 'boxes/base-lite.html' return render(request, 'media/list-items.html', context) def media_edit_list(request, model, rel_model_tag, rel_object_id, context): if model == Image: get_media_edit_record = get_image_edit_record else: get_media_edit_record = get_video_edit_record media_list = [get_media_edit_record(media, rel_model_tag, rel_object_id) for media in context['media_list']] if context['star_media']: star_media = get_media_edit_record(context['star_media'], rel_model_tag, rel_object_id) else: star_media = None json = simplejson.dumps({ 'star_media': star_media, 'media_list': media_list, }) return HttpResponse(json, content_type=json_response_mimetype(request)) def get_image_edit_record(image, rel_model_tag, rel_object_id): record = { 'url': image.image.url, 'name': image.title or image.filename, 'type': mimetypes.guess_type(image.image.path)[0] or 'image/png', 'thumbnailUrl': image.thumbnail_2.url, 'size': image.image.size, 'id': image.id, 'media_id': image.media_ptr.id, 'starUrl':reverse('image-star', kwargs={'image_id': image.id, 'rel_model_tag': rel_model_tag, 'rel_object_id': rel_object_id}), } return record def get_video_edit_record(video, rel_model_tag, rel_object_id): record = { 'url': video.embed_url, 'name': video.title or video.url, 'type': None, 'thumbnailUrl': video.thumbnail_2.url, 'size': None, 'id': video.id, 'media_id': video.media_ptr.id, 'starUrl': reverse('video-star', kwargs={'video_id': video.id, 'rel_model_tag': rel_model_tag, 'rel_object_id': rel_object_id}), } return record # models class Media(models.Model, WebModel): title = models.CharField('title', max_length=128, default='', db_index=True, blank=True) event = models.ForeignKey(Event, null=True, default=None, blank=True) crag = models.ForeignKey(Crag, null=True, default=None, blank=True) members = models.ManyToManyField(Member, blank=True) added_by = models.ForeignKey(Member, related_name='added_images') date_added = models.DateTimeField('date added', auto_now_add=True, null=True, default=None, editable=False) class Image(Media): image = ProcessedImageField(upload_to='uploads', processors=[ResizeToFit(width=1024, height=1024, upscale=False)], format='JPEG', options={'quality': 75}) thumbnail_1 = ImageSpecField(source='image', processors=[SmartResize(width=178, height=134)], format='JPEG', options={'quality': 75}) thumbnail_2 = ImageSpecField(source='image', #processors=[SmartResize(width=256, height=192)], processors=[ResizeToFit(height=164)], format='JPEG', options={'quality': 75}) class Video(Media): url = models.URLField('url', max_length=256, default='') embed_url = models.URLField('embed url', max_length=256, default='', blank=True) author = models.CharField('author', max_length=64, default='', blank=True) thumbnail = ProcessedImageField(upload_to='uploads', processors=[ResizeToFit(width=1024, height=1024, upscale=False)], format='JPEG', options={'quality': 75}, null=True, default=None, blank=True) thumbnail_1 = ImageSpecField(source='thumbnail', processors=[SmartResize(width=178, height=134)], format='JPEG', options={'quality': 75}) thumbnail_2 = ImageSpecField(source='thumbnail', #processors=[SmartResize(width=256, height=192)], processors=[ResizeToFit(height=164)], format='JPEG', options={'quality': 75}) class Crag(models.Model, WebModel): name = models.CharField('name', max_length=64, default='', db_index=True) normalized_name = models.CharField('normalized name', max_length=64, default='', editable=False) type = models.IntegerField('crag type', null=True, default=None, choices=crag_types) description = models.TextField('description', default='', blank=True) country = models.ForeignKey('country', null=True, default=None) #TODO: make this not null when db enables it latitude = models.FloatField('latitude', null=True, default=None) longitude = models.FloatField('longitude', null=True, default=None) location_index = FixedCharField('location index', length=24, default='', editable=False, db_index=True) # handled by db, used for marker clustering added_by = models.ForeignKey('member', null=True, default=None) #route_count = models.IntegerField('route count', null=True, default=None, editable=False) date_created = models.DateTimeField('date created', auto_now_add=True, null=True, default=None, editable=False) last_modified = models.DateTimeField('last modified', auto_now=True, null=True, default=None, editable=False) star_image = models.ForeignKey('Image', null=True, default=None, related_name='star_crags', on_delete=models.SET_NULL) star_video = models.ForeignKey('Video', null=True, default=None, related_name='star_crags', on_delete=models.SET_NULL)

    Read the article

  • ASP.NET MVC 2 UpdateModel() is not updating values in memory or database

    - by campbelt
    Hello, I am new to MVC, and so am working through the NerdDinner tutorial, here. In particular, I'm running into problems with the use of the UpdateModel method, which is explained in the part five of that tutorial. The problem is, when I try to edit the value of a dinner object using the UpdateModel method, the values do not get updated, and no exceptions are thrown. Oddly, I am not having any trouble with the Create or Delete features that are illustrated in the tutorial. Only the update feature isn't working. Below, I have included the Controller code that I am using, as well as the view markup, which is contained in both an aspx View file and an ascx Partial View file. Here is the code inside my Controller, called DinnerController.cs: // // GET: /Dinners/Edit/2 [Authorize] public ActionResult Edit(int id) { Dinner dinner = dinnerRepository.GetDinner(id); return View(new DinnerFormViewModel(dinner)); } // // POST: /Dinners/Edit/2 [AcceptVerbs(HttpVerbs.Post), Authorize] public ActionResult Edit(int id, FormCollection formValues) { Dinner dinner = dinnerRepository.GetDinner(id); try { UpdateModel(dinner); var x = ViewData.GetModelStateErrors(); // <-- to catch other ModelState errors dinnerRepository.Save(); return RedirectToAction("Details", new { id = dinner.DinnerID }); } catch { ModelState.AddRuleViolations(dinner.GetRuleViolations()); return View(new DinnerFormViewModel(dinner)); } } The line with the comment "to catch other ModelState errors" was added after reading a possible solution from another StackOverflow thread, here: http://stackoverflow.com/questions/1461283/asp-net-mvc-updatemodel-not-updating-but-not-throwing-error Unfortunately, that solution didn't help me. Here is the corresponding markup in my Dinners/Edit.aspx View: <asp:Content ID="Main" ContentPlaceHolderID="MainContent" runat="server"> <h2>Edit Dinner</h2> <% Html.RenderPartial("DinnerForm"); %> </asp:Content> Here is the corresponding markup in my DinnerForm.ascx Partial View. This Partial View file is also used by the Create feature, which is working fine: <%=Html.ValidationSummary("Please correct the errors and try again.") %> <% using (Html.BeginForm()) { %> <fieldset> <p> <label for="Title">Dinner Title:</label> <%=Html.TextBoxFor(model => Model.Dinner.Title)%> <%=Html.ValidationMessage("Title", "*") %> </p> <p> <label for="EventDate">EventDate:</label> <%=Html.TextBoxFor(model => Model.Dinner.EventDate, new { value = String.Format("{0:g}", Model.Dinner.EventDate) })%> <%=Html.ValidationMessage("EventDate", "*") %> </p> <p> <label for="Description">Description:</label> <%=Html.TextBoxFor(model => Model.Dinner.Description)%> <%=Html.ValidationMessage("Description", "*")%> </p> <p> <label for="Address">Address:</label> <%=Html.TextBoxFor(model => Model.Dinner.Address)%> <%=Html.ValidationMessage("Address", "*") %> </p> <p> <label for="Country">Country:</label> <%=Html.DropDownListFor(model => Model.Dinner.Country, Model.Countries)%> <%=Html.ValidationMessage("Country", "*") %> </p> <p> <label for="ContactPhone">ContactPhone #:</label> <%=Html.TextBoxFor(model => Model.Dinner.ContactPhone)%> <%=Html.ValidationMessage("ContactPhone", "*") %> </p> <p> <label for="Latitude">Latitude:</label> <%=Html.TextBoxFor(model => Model.Dinner.Latitude)%> <%=Html.ValidationMessage("Latitude", "*") %> </p> <p> <label for="Longitude">Longitude:</label> <%=Html.TextBoxFor(model => Model.Dinner.Longitude)%> <%=Html.ValidationMessage("Longitude", "*") %> </p> <p> <input type="submit" value="Save"/> </p> </fieldset> <% } %> In any case, I've been hitting away at this for hours, and I'm out of ideas. So, I'm hoping someone here can help nudge me in the right direction, in order to figure out what I'm doing wrong.

    Read the article

  • return a js file from asp.net mvc controller

    - by Erwin
    Hi all fellow programmer I'd like to have a separate js file for each MVC set I have in my application /Controllers/ -TestController.cs /Models/ /Views/ /Test/ -Index.aspx -script.js And I'd like to include the js in the Index.aspx by <script type="text/javascript" src="<%=UriHelper.GetBaseUrl()%>/Test/Js"></script> Or to put it easier, when I call http://localhost/Test/Js in the browser, it will show me the script.js file How to write the Action in the Controller? I know that this must be done with return File method, but I haven't successfully create the method :(

    Read the article

  • WEBrick::HTTPStatus::LengthRequired error when accessing create method in controller

    - by Chris Bisignani
    I have a very simple controller set up: class LibrariesController < ApplicationController ... def create @user.libraries << Library.new(params) @user.save render :json => "success!" end ... end Basically, whenever I try to access the create method of LibrariesController using HTTParty.post I get a WEBrick::HTTPStatus::LengthRequired error on the server. The method is not even being accessed! Here is the stack trace (this is the full output server side - notice that the controller isn't even being accessed): [2010-04-16 00:35:39] ERROR WEBrick::HTTPStatus::LengthRequired [2010-04-16 00:35:39] ERROR HTTPRequest#fixup: WEBrick::HTTPStatus::LengthRequired occured. [2010-04-16 00:35:39] ERROR NoMethodError: private method `gsub!' called for #<Class:0x2362160> /usr/local/Cellar/ruby_187/1.8.7-p249/lib/ruby/1.8/webrick/htmlutils.rb:17:in `escape' /usr/local/Cellar/ruby_187/1.8.7-p249/lib/ruby/1.8/webrick/httpresponse.rb:232:in `set_error' /usr/local/Cellar/ruby_187/1.8.7-p249/lib/ruby/1.8/webrick/httpserver.rb:70:in `run' /usr/local/Cellar/ruby_187/1.8.7-p249/lib/ruby/1.8/webrick/server.rb:173:in `start_thread' /usr/local/Cellar/ruby_187/1.8.7-p249/lib/ruby/1.8/webrick/server.rb:162:in `start' /usr/local/Cellar/ruby_187/1.8.7-p249/lib/ruby/1.8/webrick/server.rb:162:in `start_thread' /usr/local/Cellar/ruby_187/1.8.7-p249/lib/ruby/1.8/webrick/server.rb:95:in `start' /usr/local/Cellar/ruby_187/1.8.7-p249/lib/ruby/1.8/webrick/server.rb:92:in `each' /usr/local/Cellar/ruby_187/1.8.7-p249/lib/ruby/1.8/webrick/server.rb:92:in `start' /usr/local/Cellar/ruby_187/1.8.7-p249/lib/ruby/1.8/webrick/server.rb:23:in `start' /usr/local/Cellar/ruby_187/1.8.7-p249/lib/ruby/1.8/webrick/server.rb:82:in `start' /usr/local/Cellar/ruby_187/1.8.7-p249/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/handler/webrick.rb:14:in `run' /usr/local/Cellar/ruby_187/1.8.7-p249/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/commands/server.rb:111 /usr/local/Cellar/ruby_187/1.8.7-p249/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' /usr/local/Cellar/ruby_187/1.8.7-p249/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' script/server:3 I'm running rails 2.3.5 and ruby 1.8.7. Any help would be greatly appreciated. Let me know if you need more details.

    Read the article

  • refresh table view iphone

    - by Florent
    Hi all !! So i've set a table view, i have set a system which set if the row have been already selected, i set checkmarck acessory for a row which have been seen, i write the row in a plist to an int value. It work good but only when i restart the app or reload the table view in my navigation controller. I mean when i select a row it pushes a view controller, then when i go back to the table view checkmark disappear and we do not know if the row have already been selected only when the app restart. So is there a way to refresh the table view ? ? in the view will appear for example ? ? thanks to all !!!!

    Read the article

  • Unit testing a controller method?

    - by Stefan Kendall
    I have a controller method like such: def search = { def query = params.query ... render results as JSON } How do I unit test this? Specifically, how do I call search to set params.query, and how do I test the results of the method render? Is there a way to mock the render method, perhaps?

    Read the article

  • Redirecting to another controller in Rails

    - by Vitaly
    Hi, I'm trying to redirect from one controller to another in Rails and I am getting this error: undefined method `call' for nil:NilClass The code is pretty simple (in def create method): @blog_post_comment = BlogPostComment.new(params[:blog_post_comment]) respond_to do |format| if @blog_post_comment.save flash[:notice] = 'Comment was successfully created.' redirect_to(@blog_post_comment.blog_post) else render :action => "new" end end Save goes ok, the value gets into the database. How can I work around the redirect fail?

    Read the article

  • Add a background image to tables in a navigation view in a tabbed application

    - by padatronic
    Hi people, I have a tabbed application which then has a navigation controller. In each the navigation controller I an a table View Controller which obviously contains a table. I push a new table view controller from this one. I want to put a background to the table but can only add an image infront of the table. I think this may be because I am adding the sub view in the table view controller, but I don't seem to be able to add it anywhere else. Please could you help me, thanks.

    Read the article

  • Passing direct parameters to a Controller#method when testing via RSpec

    - by gmile
    Normally to pass parameters via in RSpec we do: params[:my_key] = my_value get :my_method Where my_method deals with what it received from params. But in my controller I have a method, which takes args directly i.e.: def my_method(*args) ... end How do I call the method with those args from within the test? I've tried get :my_method(args) but Ruby interpreter complains about syntax error.

    Read the article

  • How to use Eclipse's Display View for Debug?

    - by jzd
    At the link below it explains that the "display view allows you to manipulate live code in a scrapbook type fashion (see Figure 8). To manipulate a variable, simply type the name of the variable in the Display view, and you'll be greeted with a familiar content assist." http://www.ibm.com/developerworks/library/os-ecbug/ However, I am having trouble getting it to work. I have the view open but all the buttons are disabled. I have tried putting code in the view, selecting code in the view, selecting code in other views, while running and while not running debug, but the only button that is ever enabled on the view is "clear console". Suggestions on what I am doing wrong?

    Read the article

  • Status messages on the Spring MVC-based site (annotation controller)

    - by linpulee
    What is the best way to organize status messages on the Spring MVC-based site? I mean messages which, for example, returns when user has sent What is the best way to organize status messages ("Your data has been successfully saved/added/deleted") on the Spring MVC-based site using annotation controller? So, the issue is in the way of sending the message from POST-method in contoller.

    Read the article

  • Need image, text, youtube, etc. jquery modal overlay with long description

    - by Jason
    Hi, I am looking for a jquery modal window script for displaying images, text, html, videos, etc. There are a lot of great ones out there, but I am looking for one that allows for a long description (that isn't pulled from the title) - like highslide that lets you have a caption and will display the photo text to the right or left of your image in the same modal window. Due to licensing, I can't use highslide. So I'm looking for something else. Thoughts?

    Read the article

  • JQuery Simple Modal OSX Multiple dialogs

    - by Aneef
    HI, I'm planning to use the jquery Simple modal for login and registration on my project site. i tried to have 2 modals as mentioned here. but im still unable to make it work. here is my code jQuery(function ($) { var OSX = { container: null, init: function () { $("a.osx").click(function (e) { e.preventDefault(); $(this.id + "_osx-modal-content").modal({ overlayId: this.id+'_osx-overlay', containerId: this.id+'_osx-container', closeHTML: null, minHeight: 80, opacity: 65, position: ['0',], overlayClose: true, onOpen: OSX.open, onClose: OSX.close }); }); }, open: function (d) { var self = this; self.container = d.container[0]; d.overlay.fadeIn('slow', function () { $("#osx-modal-content", self.container).show(); var title = $("#osx-modal-title", self.container); title.show(); d.container.slideDown('slow', function () { setTimeout(function () { var h = $("#osx-modal-data", self.container).height() + title.height() + 20; // padding d.container.animate( {height: h}, 200, function () { $("div.close", self.container).show(); $("#osx-modal-data", self.container).show(); } ); }, 300); }); }) }, close: function (d) { var self = this; // this = SimpleModal object d.container.animate( {top:"-" + (d.container.height() + 20)}, 500, function () { self.close(); // or $.modal.close(); } ); } }; OSX.init(); I guess its something to do with the open: function part, anyone can help me ?

    Read the article

  • Launching a modal UINavigationController

    - by Alexi Groove
    I'd like to launch a modal view controller the way one does with 'ABPeoplePickerNavigationController' and that is without having to creating a navigation controller containing the view controller. Doing something similar yields a blank screen with no title for the navigation bar and there's no associated nib file loaded for the view even though I am invoking the initWithNibName when the 'init' is called. My controller looks like: @interface MyViewController : UINavigationController @implementation MyViewController - (id)init { NSLog(@"MyViewController init invoked"); if (self = [super initWithNibName:@"DetailView" bundle:nil]) { self.title = @"All Things"; } return self; } - (void)viewDidLoad { [super viewDidLoad]; self.title = @"All Things - 2"; } @end When using the AB controller, all you do is: ABPeoplePickerNavigationController *picker = [[ABPeoplePickerNavigationController alloc] init]; picker.peoplePickerDelegate = self; [self presentModalViewController:picker animated:YES]; [picker release]; ABPeoplePickerNavigationController is declared as: @interface ABPeoplePickerNavigationController : UINavigationController The other way to create a modal view as suggested in Apple's 'View Controller Programming Guide for iPhone OS': // Create a regular view controller. MyViewController *modalViewController = [[[MyViewController alloc] initWithNibName:nil bundle:nil] autorelease]; // Create a navigation controller containing the view controller. UINavigationController *secondNavigationController = [[UINavigationController alloc] initWithRootViewController:modalViewController]; // Present the navigation controller as a modal view controller on top of an existing navigation controller [self presentModalViewController:secondNavigationController animated:YES]; I can create it this way fine (as long as I change the MyViewController to inherit from UIViewController instead of UINavigationController). What else should I be doing to MyViewController to launch the same way as ABPeoplePickerNavigationController?

    Read the article

  • Remove "Flash" between pages while using Internet Explorer modal boxes

    - by AaronS
    I have an internal web application, that is IE specific, and uses a lot of IE specific modal boxes: (window.showModalDialog). I recently received a request to remove the "flash" when navigating between pages of the site. To accomplish this, I just added a meta transition tag to my master page: <meta http-equiv="Page-Enter" content="blendTrans(duration=0.0)" /> This works perfectly except for the modal boxes. When you launch a modal box, and then move it around, the web page behind it keeps a trail of the modal box instead of re-drawing the web page content. This prevents the user from moving the modal box to read anything that was behind it. Is there a way to prevent the "flash" between pages in an IE specific site and have the site still work with modal boxes? Please note, this is a large and complex site, so re-architecting it to not use modal boxes isn't an option. This is an asp.net, c# web application, and all of my users are using IE 7 and IE 8 if it makes any difference. -Edit- To duplicate this, put the following into an html page, and open it in Internet Explorer: <html> <head> <title>Test</title> <meta content="blendTrans(duration=0.0)" http-equiv="Page-Exit"> </head> <body> <script language="javascript"> window.showModalDialog('modal.htm', window); </script> </body> </html>

    Read the article

  • iOS: display modal view over the top of a UIWebView

    - by Sly
    Is it possible to display a modal view over the top of a UIWebView? I have a UIViewController that loads a WebView. I then want to push a Modal View Controller over the top so that a modal view covers up the WebView temporarily... The WebView is working fine; here's how it's loaded in the View Controller: - (void)loadView { // Initialize webview and add as a subview to LandscapeController's view myWebView = [[[UIWebView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]] autorelease]; myWebView.scalesPageToFit = YES; myWebView.autoresizesSubviews = YES; myWebView.autoresizingMask = (UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight); myWebView.delegate = self; self.view = myWebView; } If I attempt to load a Modal View controller from within viewDidLoad, however, no modal view appears: - (void)viewDidLoad { [super viewDidLoad]; // Edit dcftable.html with updated figures NSMutableString *updated_html = [self _updateHTML:@"dcftable"]; // Load altered HTML file as an NSURL request [self.myWebView loadHTMLString:updated_html baseURL:nil]; // If user hasn't paid for dcftable, then invoke the covering modal view if (some_condition) { LandscapeCoverController *landscapeCoverController = [[[LandscapeCoverController alloc] init] autorelease ]; [self presentModalViewController:landscapeCoverController animated:YES]; } } I suspect that there's something that needs to be done with the UIWebView delegate to get it to receive the new modal view...but can't find any discussion or examples of this anywhere...again, the objective is to invoke a modal view that covers over the top of the WebView. Thanks for any thoughts in advance!

    Read the article

  • Jquery Modal Popup opens twice on Single Click with ASP.Net MVC3

    - by user1704379
    I am using Modal Popup in my MVC3 application it works fine but opens twice for a single Click on the link. The Modal pop is triggered from the 'Index' view of my Home Controller. I am calling a view 'PopUp.cshtml' in my modal popup. The related ActionMethod 'PopUp' for the respective view is in my 'Home' controller. Here is the code, Jquery code on layout.cshtml page, <script type="text/javascript"> $.ajaxSetup({ cache: false }); $(document).ready(function () { $(".openPopup").live("click", function (e) { e.preventDefault(); $("<div></div><p>") .attr("id", $(this).attr("data-dialog-id")) .appendTo("body") .dialog({ autoOpen: true, title: $(this).attr("data-dialog-title"), modal: true, height: 250, width: 900, left: 0, buttons: { "Close": function () { $(this).dialog("close"); } } }) .load(this.href); }); $(".close").live("click", function (e) { e.preventDefault(); $(this).dialog("close"); }); }); </script> cshtml code in 'PopUp.cshtml' @{ ViewBag.Title = "PopUp"; Layout = null; } <h2>PopUp</h2> <p> Hello this is a Modal Pop-Up </p> Call modal popup code in Index view of Home Controller, <p> @Html.ActionLink("Click here to open modal popup", "Popup", "Home",null, new { @class = "openPopup", data_dialog_id = "popuplDialog", data_dialog_title = "PopUp" }) </p> What am I doing wrong that the modal pop up opens twice ? Thanks in Advance !

    Read the article

< Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >