Search Results

Search found 19716 results on 789 pages for 'zend form'.

Page 138/789 | < Previous Page | 134 135 136 137 138 139 140 141 142 143 144 145  | Next Page >

  • Rails controller not rendering correct view when form is force-submitted by Javascript

    - by whazzmaster
    I'm using Rails with jQuery, and I'm working on a page for a simple site that prints each record to a table. The only editable field for each record is a checkbox. My goal is that every time a checkbox is changed, an ajax request updates that boolean attribute for the record (i.e., no submit button). My view code: <td> <% form_remote_tag :url => admin_update_path, :html => { :id => "form#{lead.id}" } do %> <%= hidden_field :lead, :id, :value => lead.id %> <%= check_box :lead, :contacted, :id => "checkbox"+lead.id.to_s, :checked => lead.contacted, :onchange => "$('#form#{lead.id}').submit();" %> <% end %> </td> In my routes.rb, admin_update_path is defined by map.admin_update 'update', :controller => "admin", :action => "update", :method => :post I also have an RJS template to render back an update. The contents of this file is currently just for testing (I just wanted to see if it worked, this will not be the ultimate functionality on a successful save)... page << "$('#checkbox#{@lead.id}').hide();" When clicked, the ajax request is successfully sent, with the correct params, and the action on the controller can retrieve the record and update it just fine. The problem is that it doesn't send back the JS; it changes the page in the browser and renders the generated Javascript as plain text rather than executing it in-place. Rails does some behind-the-scenes stuff to figure out if the incoming request is an ajax call, and I can't figure out why it's interpreting the incoming request as a regular web request as opposed to an ajax request. I may be missing something extremely simple here, but I've kind-of burned myself out looking so I thought I'd ask for another pair of eyes. Thanks in advance for any info!

    Read the article

  • Form with list of checkboxes (best practices)

    - by boris callens
    I have a view that allows the user to make a selection from an IEnumerable. The way I'm doing it now is to give each checkbox the id of the item and work with the form collection at the controller's side. I seem to remember there to be a better way but can't remember how anymore. Are there any better practices?

    Read the article

  • JQuery form validator that is W3C Valid

    - by Rudiger
    Im doing some form validation on a website and I've tried to use JQuery Validator and it works find but isn't valid as it uses custom attributes. I've tried every which way to make it valid but it seems besides some other custom javascript, which is not an option, it isn't valid. Has anyone come across one that is valid? Or some other way to make it valid? I've tried custom dtds, adding the attribute to the doctype but that leaves a ] on the page. Cheers

    Read the article

  • Pause execution and run until form is clicked

    - by jimmy
    Newbie here. I have this code: while (v < 360) { v +=10; RunIt(); // need to wait half a second here } How do I wait the 1/2 second? Also, if this isn't asking too much, I'd like this to run repeatedly until the user clicks on the form. Thanks in advance.

    Read the article

  • Copy information only, from an external webpage and import it into a form using PHP

    - by mpw5013
    I'm looking to extract key pieces of information from the following website to simplify the signup process. More or less I want to build a quick import script that will grab the following: 1) Username 2) Type (Model / Photographer) 3) Age 4) Sex 5) City, State, Zip 6) Email 7) Photos I will then take all of this data and add it to join form / push the photos through a manipulation script. Any ideas?

    Read the article

  • Handling Multiple Form Actions on One View?

    - by Pandiya Chendur
    I have multiple master pages in my asp.net mvc web application... Each of the pages add,edit,view and delete functionalities.... What it does is i have to create multiple views for handling add,edit,view and delete functionalities (ie) the user has to navigate to another view to edit/view the details of a record... How to Handle Multiple Form Actions (ie) add,edit,view and delete functionalities on One View?

    Read the article

  • checkbox checked with php form post?

    - by Patrick
    how do I check a checkbox? I've tried 1, On, Yes that doesn't work. putting the worked "checked" alone works but then how do I check with php after form post of the checkbox is checked? <input type="checkbox" class="inputcheckbox" id="newmsg" name=chk[newmsg2] value="1" />

    Read the article

< Previous Page | 134 135 136 137 138 139 140 141 142 143 144 145  | Next Page >