Search Results

Search found 18244 results on 730 pages for 'controller action'.

Page 84/730 | < Previous Page | 80 81 82 83 84 85 86 87 88 89 90 91  | Next Page >

  • Passing Object From Controller to JavaScript JQuery

    - by TMan
    This is driving me crazy. All I'm trying to do is to pass in a Id to a ActionMethod which is working and have an Object be returned to the javascript. Then in javascript, I want to be able to say something like..Objec.Property, ie/ Student.Name, or Student.GPA. Any help is appreciated. I tried json but couldn't get that to work either. ActionResult: [AcceptVerbs(HttpVerbs.Get)] public Epic GetEpicPropertyDetails(int id) { var Epictemplist = epicRepository.Select().Where(x => x.Id.Equals(id)); return Epictemplist.SingleOrDefault(); } javascript: <script type="text/javascript"> $(document).ready(function () { $(".ListBoxClass").click(function (event) { var selectedid = $(this).find("option:selected").val(); event.preventDefault(); $.get("/Estimate/GetEpicPropertyDetails", { id: selectedid }, function (result) { $(".TimeClass").val(result); }); }); }); </script> result.Name is obviously wrong I just dont know how to call this the right way.

    Read the article

  • iPhone SKD make the iPod controller appear

    - by nico
    Hi all, It's been a while I'm consulting stackoverflow, but this time I didn't find any answer :( My question is quite simple :) On an iPhone/iPod touch, play music. Double tap the home button while the music is playing. You will see appear a popup with the play/pause/next/previous buttons and a volume control. Do you know if it's possible to make this popup appear programmatically ? I mean, I would like to add a button in my app that will display the popup, avoiding the user to double tap the home button (most of them doesn't know this shortcut). Thank you in advance !

    Read the article

  • JavaScript, iPhone: Repeat Action while Holding Button

    - by Doug
    I am working on a website which I would like to work on iPhones, however I want it so they can tap and hold a button and have it continue firing the onclick event. I got it to work in other browsers, but the iPhone is the only one that will need to hold down the button. Is there a way to repeat a function when holding down the button? Thanks.

    Read the article

  • Performing an action on Parent/Child elements independently.

    - by Matt Weldon
    I have HTML similar to the following in my page <div id="someDiv"> <img src="foo.gif" class="someImg" /> </div> The wrapper div is set up such that when it is clicked, it's background-color changes using the following jQuery code. $("div").click(function(event){ $(this).css("background-color", "blue"); }); I also have some jQuery associated with my img that will do some other function (for the sake of argument I am going to display and alert box) like so: $("img[class=someImg]").click(function(event){ alert("Image clicked"); }); The issue I have come across is that when I click on the img, the event associated with the div is also triggered. I'm pretty sure that this is due to the way that jQuery (or indeed JavaScript) is handling the two DOM elements - clicking the img would require you to also technically click the div, thus triggering both events. Two questions then really: Is my understanding of the DOM/JavaScript flawed in some way or is this actually how things are occurring? Are there any jQuery methods that would allow me to perform actions on a child element without invoking those associated with its parent?

    Read the article

  • Example of xargs' -x option in action

    - by Ole Tange
    GNU xargs has option '-x'. The man page says: -x Exit if the size (see the -s option) is exceeded. But xargs seems to not care if -x is set or not. I have been unable to make an example in which the -x has any effect at all. Please provide two examples in which the only difference is an added -x and that produce different output.

    Read the article

  • Getting redefinition of View Controller pickerView:titleForRow:forComponent error

    - by pdenlinger
    Hi-- I'm working my way through the book Head First iPhone Development (O'Reilly). Am having trouble on page 68 with the following method and function; I get the error "redefinition of ViewController pickerView:titleForRow:forComponent error. Have checked the code for spaces; seems to be OK. Can you check the code and tell me what's wrong? Thank you. -(NSString *)pickerView:(UIPickerView *)pickerView titleForRow:(NSInteger)row forComponent: (NSInteger)component{ switch (component) { case 0: return [activities objectAtIndex:row]; case 1: return [feelings objectAtIndex:row]; } return nil; }

    Read the article

  • Defining action on window load

    - by zac
    I am trying to get a page to display specific properties depending on whether or not a specific cookie is set... I am trying this var x = readCookie('age'); window.onload=function(){ if (x='null') { document.getElementById('wtf').innerHTML = ""; }; if (x='over13') { document.getElementById('wtf').innerHTML = ""; }; if (x='not13') { document.getElementById('emailBox').innerHTML = "<style type=\"text/css\">.formError {display:none}</style><p>Good Bye</p><p>You must be 13 years of age to sign up.</p>"; }; } It always just defaults to whatever is in the first if statement... I am still learning my javaScript so I am sure this is sloppy.. can someone please help me get this working?

    Read the article

  • What does this mean in AS3?

    - by uther-lightbringer
    Hello I've started to learning AS3 from one book and found something I don't understand. Ellipse(_board[row][column]).fill = getFill(row, column); _board is two dimensional array of Ellipse type, so I just dont understand why is Ellipse(Ellipse object) used when it apparently works without it, or I haven't seen any changes when I omitted it.

    Read the article

  • create a model in create action from a class

    - by Pontek
    As a newbie to rails I can't find how to solve my issue ^^ I want to create a VideoPost from a form with a text field containing a video url (like youtube) I'm getting information on the video thanks to the gem https://github.com/thibaudgg/video_info And I want to save thoses information using a model of mine (VideoInformation). But I don't know how the create process should work. Thanks for any help ! I'm trying to create a VideoPost in VideoPostsController like this : def create video_info = VideoInfo.new(params[:video_url]) video_information = VideoInformation.create(video_info) #undefined method `stringify_keys' for #<Youtube:0x00000006a24120> if video_information.save @video_post = current_user.video_posts.build(video_information) end end My VideoPost model : # Table name: video_posts # # id :integer not null, primary key # user_id :integer # video_information_id :integer # created_at :datetime not null # updated_at :datetime not null My VideoInformation model (which got same attributes name than VideoInfo gem) : # Table name: video_informations # # id :integer not null, primary key # title :string(255) # description :text # keywords :text # duration :integer # video_url :string(255) # thumbnail_small :string(255) # thumbnail_large :string(255) # created_at :datetime not null # updated_at :datetime not null

    Read the article

  • Question About NerdDinner Controller Constructors

    - by Gavin Draper
    I've been looking at the Nerd Dinner app, more specifically how it handles its unit tests. The following constructors for the RSVPController are confusing my slightly public RSVPController() : this(new DinnerRepository()) { } public RSVPController(IDinnerRepository repository) { dinnerRepository = repository; } From what I can tell the second one is used by the unit tests so it can use Fake repositories. What I cant work out is what the first constructor does. It doesn't seem to ever set the dinnerRepository variable, it seems to imply its inheriting from something but I really don't get it. Can anyone explain? Thanks

    Read the article

  • how to controller (start/kill) a background process (server app) in ruby

    - by rubiii
    hey guys, i'm trying to set up a server for integration tests (specs actually) via ruby and can't figure out how to control the process. so, what i'm trying to do is: run a rake task for my gem that executes the integration specs the task needs to first start a server (i use webrick) and then run the specs after executing the specs it should kill the webrick so i'm not left with some unused background process webrick is not a requirement, but it's included in the ruby standard library so being able to use it would be great. hope anyone is able to help! ps. i'm running on linux, so having this work for windows is not my main priority (right now).

    Read the article

  • flash video dynamic width and height change in Action Script 3.0

    - by coderex
    hi I have a video player and the video file came from one xml file, The videos are in different dimension so how can i set the video dimension dynamically? _vid = new Video(); _vid.attachNetStream(_vidStream); How can i give the new dimension of the video, the default i get is http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/media/Video.html Video(width:int = 320, height:int = 240) Creates a new Video instance. I need the height and width of the video, How

    Read the article

  • How do I pass objects through a _url based on a routing in rails?

    - by Angela
    I want to pass the attributes associated with two objects into a path created from a route. In this case, the _url is skip_contact_letter_url. contact_letter and letter are passed through a render partial. The clip below resides in the partial. <%= link_to_remote "Skip Letter Remote #{contact_letter}", :url => skip_contact_letter_url(contact_letter, letter), :update => "update-area-#{contact_letter.id}-#{letter.id}" %> <span id='update-area-<%="#{contact_letter.id}-#{letter.id}"%>'> </span> The route I created looks like this: map.resources :contact_letters, :member => {:skip => :post} And the controller looks like this: def skip @contact_letter = ContactLetter.new(params[:all]) @contact_letter.status = "skipped" @contact_letter.date_sent = Date.today #@contact_letter.date_created = Date.today if @contact_letter.save render :text => 'This letter was skipped!' end end When I look at the console, none of the parameters from contact_letter or letter get passed through.

    Read the article

  • jQuery model-view-controller vs Spring MVC

    - by user1515968
    my question is what potential problems or difficulties would be with implementing usual web app with somewhat reach user interface (multiple dynamic tabs, accordians and so on) using jQuery MVC approach with Spring REST vs using Spring MVC. Problems what I can think of could be: I will not be able to use Spring security fully, JavaScript coding could become hard to manage, any form verification becomes not easy to manage... what else? and does jQuery MVC with REST make sense at all? On other side jQuery with MVC and REST move all GUI concerns to JavaScript side (whether it is bad or not) and leave all data manipulation to server side.

    Read the article

  • pass parameter from controller to models condition

    - by Alex
    I'm trying to bind a param to a join via a named scope., but I'm getting an error. What is the correct way to do that? has_one :has_voted, :class_name => 'Vote', :conditions => ['ip = :userIp'] # named scopes scope :with_vote, lambda {|ip| { :include => [:has_voted], # like this ?? :conditions => [:has_voted => {:conditions => {:userIp => ip}} ] }} Idea.with_vote(request.ip).all I believe I need the condition definition in the model for it to appear in the ON clause of a JOIN, rather then in the WHERE one. Edit I'm trying to get the following query select Ideas.*, Votes.* from Ideas left outer join Votes on Votes.Idea_id = Idea.id AND Votes.ip = {request.ip}

    Read the article

  • does overload operator-> a compile time action?

    - by Brent
    when I tried to compile the code: struct S { void func2() {} }; class O { public: inline S* operator->() const; private: S* ses; }; inline S* O::operator->() const { return ses; } int main() { O object; object->func(); return 0; } there is a compile error reported: D:\code>g++ operatorp.cpp -S -o operatorp.exe operatorp.cpp: In function `int main()': operatorp.cpp:27: error: 'struct S' has no member named 'func' it seems that invoke the overloaded function of "operator-" is done during compile time? I'd add "-S" option for compile only.

    Read the article

  • Render dropdown as text for particular action in ASP.NET MVC

    - by Dan
    I have a partial view that I use for editing and creating my models. When a user is editing the model, I would like a particular drop-down to be rendered as text as I don't want them to change it. A read-only drop-down would suffice, but I'd prefer text. I'm thinking I can accomplish this via an extension method, but I'm not quite sure how to get started. Any help would be appreciated!

    Read the article

  • Removing the default <a href> action

    - by user1285198
    Is there any way to stop the page from loading the next page when someone clicks on a <a> tag instead i want it to give the href value so for example "www.google.com" and then do a jquery .load() which is like this $(".window").load(hrefvalue); i know i could just change all the href values to fire up a javascript function but that takes a bit of time so im just looking for the easiest way. so i want it to do stop the page loading the next part on a <a href click. get the href value e.g http://www.google.com. and then do a jquery (.load() or $.ajax()) call for the href page.

    Read the article

< Previous Page | 80 81 82 83 84 85 86 87 88 89 90 91  | Next Page >