Search Results

Search found 6055 results on 243 pages for 'forms'.

Page 42/243 | < Previous Page | 38 39 40 41 42 43 44 45 46 47 48 49  | Next Page >

  • Multiple forms + HAML + jQuery + Javascript submit

    - by Jay Godse
    Hi. I have a HAML page that lists some links to delete "things" that looks like this %div %a.form_submit Delete Thing 1 %form{:href=>"#", :id=>'comment_1', :method=>'post', :action=>'/thing/delete'} %input{:type=>'hidden', :name=>'thingid', :value=>'1'} %input{:type=>'submit', style='display:none'} %div %a.form_submit Delete Thing 22 %form{:href=>"#", :id=>'comment_22', :method=>'post', :action=>'/thing/delete'} %input{:type=>'hidden', :name=>'thingid', :value=>'22'} %input{:type=>'submit', style='display:none'} The intention is to have a link "Delete XX" which will delete something specific. A page could have a number of these links, and each link is for a specific "thing". I also have a piece of (unobtrusive) jQuery javascript that adds a click handler to each form as follows: $('a.form_submit').click(function(event) { $('form').submit(); event.preventDefauilt(); }); This works when there is one form on a page. However, if I have more than one form on a page, how do I ensure that clicking "Delete Thing 1" will trigger a submit() event only on the form with id='comment_1'?

    Read the article

  • Efficiently draw a grid in Windows Forms

    - by Joel
    I'm writing an implementation of Conway's Game of Life in C#. This is the code I'm using to draw the grid, it's in my panel_Paint event. g is the graphics context. for (int y = 0; y < numOfCells * cellSize; y += cellSize) { for (int x = 0; x < numOfCells * cellSize; x += cellSize) { g.DrawLine(p, x, 0, x, y + numOfCells * cellSize); g.DrawLine(p, 0, x, y + size * drawnGrid, x); } } When I run my program, it is unresponsive until it finishes drawing the grid, which takes a few seconds at numOfCells = 100 & cellSize = 10. Removing all the multiplication makes it faster, but not by very much. Is there a better/more efficient way to draw my grid? Thanks

    Read the article

  • Java Swing Forms Catching Data

    - by RhigoHR
    Hi everybody, I have a form in swing with a lot of textfields receiving data, then, the idea is when a click on a botton, the app catch all the data from the textfields. Do you know a good practice for this?, or is it necessary to catch textfield by textfield to get the data?.. Thx for your time.

    Read the article

  • GWT Internationalization - Plural Forms

    - by Drejc
    I have read and executed following instructions found on GWT pages But somehow the "[none]" form does not return the correct output, rather it returns the default output. While all the other like [one], [two], [many] work perfectly fine. Has anyone come across this problem, and how can I solve it?

    Read the article

  • Prevent double submission of forms in jQuery

    - by Adam
    I have an form that takes a little while for the server to process. I need to ensure that the user waits and does not attempt to resubmit the form by clicking the button again. I tried using the following jQuery code: <script type="text/javascript"> $(document).ready(function(){ $("form#my_form").submit(function(){ $('input').attr('disabled','disabled'); $('a').attr('disabled','disabled'); return true; }) }); </script> When I try this in Firefox everything gets disabled but the form is not submitted with any of the POST data it is supposed to include. I can't use jQuery to submit the form because I need the button to be submitted with the form as there are multiple submit buttons and I determine which was used by which one's value is included in the POST. I need the form to be submitted as it usually is and I need to disable everything right after that happens. Thanks!

    Read the article

  • Why doesn't Win Forms application update label immediately?

    - by rosscj2533
    I am doing some experimenting with threads, and made a 'control' method to compare against where all the processing happens in the UI thread. It should run a method, which will update a label at the end. This method runs four times, but the labels are not updated until all 4 have completed. I expected one label to get updated about every 2 seconds. Here's the code: private void button1_Click(object sender, EventArgs e) { Stopwatch watch = new Stopwatch(); watch.Start(); UIThreadMethod(lblOne); UIThreadMethod(lblTwo); UIThreadMethod(lblThree); UIThreadMethod(lblFour); watch.Stop(); lblTotal.Text = "Total Time (ms): " + watch.ElapsedMilliseconds.ToString(); } private void UIThreadMethod(Label label) { Stopwatch watch = new Stopwatch(); watch.Start(); for (int i = 0; i < 10; i++) { Thread.Sleep(200); } watch.Stop(); // this doesn't set text right away label.Text = "Done, Time taken (ms): " + watch.ElapsedMilliseconds; } Maybe I'm just missing something basic, but I'm stuck. Any ideas? Thanks.

    Read the article

  • ASP.NET jQuery Ajax posting forms

    - by Sir Psycho
    Hi, I can't seem to get the jQuery.ajax() function posting back any of my asp.net generated form controls. I've put a break point on the server side and there aren't any values. Is there a way around this or do I have to build up a list of what I want sent back? Another question slightly off topic, but it seems that although jQuery is a great JS library, it doesn't seem to integrate too well with .net. Has anyone given up with jQuery to perform server side interaction and just gone with ms ajax implementation?

    Read the article

  • Using curl to submit/retrieve a forms results

    - by Jason
    I need help in trying to use curl to post data to a page and retrieve the results after the form has been submitted. I created a simple form: <form name="test" method="post" action="form.php"> <input type="text" name="name" size="40" />e <input type="text" name="comment" size="140" /> <input type="submit" name="submit" value="submit" /> </form> In addition, I have php code to handle this form in the same page. All it does is echo back the form values. The curl that I have been using is this: $h = curl_init(); curl_setopt($h, CURLOPT_URL, "path/to/form.php"); curl_setopt($h, CURLOPT_POST, true); curl_setopt($h, CURLOPT_POSTFIELDS, array( 'name' = 'yes', 'comment' = 'no' )); curl_setopt($h, CURLOPT_HEADER, false); curl_setopt($h, CURLOPT_RETURNTRANSFER, 1); $result = curl_exec($h); When I launch the page with the curl code in it, I get the form.php page contents but it doesn't not show the variables that PHP should have echo'd when the form is submitted. would appreciate any help with this. Thanks.

    Read the article

  • PHP Forms checkbox calculation

    - by Sef
    Hello, I am trying to perform some calculations with a form but every time i try to work with checkboxes it goes wrong. The checkboxes are beign set on value 1 in the form itselff and are being checked if there checked or not. $verdieping = isset($_POST["verdieping"]) ? $_POST["verdieping"] : 0; $telefoon = isset($_POST["telefoon"]) ? $_POST["telefoon"] : 0; $netwerk = isset($_POST["netwerk"]) ? $_POST["netwerk"] : 0; When i try to do calculations every works expect for the options with the checkboxes. When both checkboxes (telefoon & netwerk) are selected the value should be 30. If only one is selected the value should be 20. But no mather what i have tried to write down it always give problem, and it always uses 20, never the value 30. How do i solve this problem? Or suppose i am writing the syntax all wrong to lay conditions to a calculation? Any input appreciated. $standnaam = $_SESSION["standnaam"]; $oppervlakte = $_SESSION["oppervlakte"]; $verdieping = $_SESSION["verdieping"]; $telefoon = $_SESSION["telefoon"]; $netwerk = $_SESSION["netwerk"]; if ($oppervlakte <= 10) $tarief = 100; if ($oppervlakte > 10 && $oppervlakte <= 20) $tarief = 90; if ($oppervlakte > 20) $tarief = 80; if($verdieping == 1) { $prijsVerdieping = $oppervlakte * 120; } else { $prijsVerdieping = 0; } if(($telefoon == 1) && ($netwerk == 1)) { $prijsCom = 30; // never get this value, it always uses 20 } if(($telefoon == 1) || ($netwerk == 1)) { $prijsCom = 20; } $prijsOpp = $tarief * $oppervlakte; // works $totalePrijs = $prijsOpp + $prijsVerdieping + $prijsCom; //prijsCom value is always wrong Regards.

    Read the article

  • Storing PDFs in MS Access Database using Forms

    - by Matthew Jones
    I need to store PDF files in an Access database on a shared drive using a form. I figured out how to do this in tables (using the OLE Object field, then just drag-and-drop) but I would like to do this on a Form that has a Save button. Clicking the save button would store the file (not just a link) in the database. Any ideas on how to do this? EDIT: I am using Access 2003, and the DB will be stored on a share drive, so I'm not sure linking to the files will solve the problem.

    Read the article

  • Handle submission of forms created dynamically having same class

    - by user1504383
    i am creating a form for users to comment on each posts displayed through a loop and the form for commenting is also in the same loop. Now i want each comment to be submitted via jquery ajax but each time its taking into account only the first form . Here is my code:- while($row=mysql_fetch_array($result)) { ?> <?=$row['title']?> <h4>Add commment </h4> <form class="add_comment" method="post"> <div style="display:none;"><input type="text" name="id" class="id" value="<?=$row['id']?>"/></div> <input type="text" name="comment" class="comment"/> <input type="submit" name="submit" value="add" class="submit"/> </form> <?php } ?> And my jquery goes here $("form.add_comment").submit(function(event) { event.preventDefault(); var comment =$('.comment').attr('value'); var id =$('.id').attr('value'); $.ajax({ type: "POST", url: "/add_comment", data: "comment="+comment+"&id="+id, success: function() { location.reload(); } }); return false; });`enter code here` i understood the error that it selects the first one by default but couldnt fix it up plz help me

    Read the article

  • None of my Win Forms buttons work

    - by nectarines
    I have a windows form which connects to a SQL Server though a dataset. The form was working fine since my last compile. All of a sudden, none of my buttons work! The data is loaded on the form, all the tabs work fine, drop down boxes work fine, but the buttons are literally unresponsive to any clicks. I added a test button and I get the same results. I can visually see the button getting clicked but no events. Any ideas?

    Read the article

  • Front page 2003: how to line up forms vertically

    - by I2008
    Hi. I am trying to creating a form on Frontpage 2003 and right now all my boxes are all over the place, as shown below: Name: [----] Email: [----] I want the boxes to be like this: Name: [----] Email: [----] I have tried using table to line up the boxes but when it come to giving an ID using the 'Lable' on the 'Form' tool bar by highlighting the text box and 'Name', the table get highlighted and wont create an lable. I just want to line up vertically all the boxes and i am new to web design so i dont understand much about HTML or CSS. I dont think Frontpage 2003 has CSS. Can someone tell me how to line up all my boxes. Many thankz

    Read the article

  • Library of ALL countries and their states for address forms

    - by Chris
    I need a library that includes all countries and respective codes in 1 array and a second multidimensional array for country to its states and a last array for state code to state name. I found tons of matches for similar requests but none actually have a simple CSV or XML with just that. My goal is to build an address form where you select your country and it then pre-populates the state dropdown - if the country has states - with the country's states. Shouldn't be so hard to find, but I guess i'm blind. Thanks so much for all help!

    Read the article

  • .Net forms - intercepting the Close X event.

    - by Hamish Grubijan
    Hi, this must be a dumb question, but I cannot figure it out. I also cannot use the designer because coders before me managed to throw GUI and logic all in one, so now it is confused. I've got to do it the old school way. I have a Form which can be closed in 3 ways: Close button, File / Close menu, and the X icon. I want them all to do the same thing. Intercepting the button and the menu events is easy. In fact, both are hooked up to an onCloseConfig method. Btw, is there a better name for this method? private void onCloseConfig(object sender, System.EventArgs e) { if (! m_configControl.Modified) { Application.Exit(); // Or should it be this.Close(); } .... // Else present a dialog, ask if they want to save. } So, to intercept the X I tried: this.FormClosing +=new FormClosingEventHandler(this.onCloseConfig); I believe this is what causes an infinite loop. I do not want that :) FormClosed is another option, but it seems too late. I just want to intercept the fact that the X was clicked, not the fact that the form is closing. Please help. Thanks!

    Read the article

  • Rails forms: render different actions based on validation

    - by Martin Petrov
    Is it possible to render different actions based on what fails at validation? For example - I have one field in the form - email addres. It is validated like this: validates :email, :presence => true, :uniqueness => { :case_sensitive => false } In the controller: def create @user = User.new(params[:user]) if @user.save redirect_to somewhere else # render :new if email is blank # redirect_to somwhere if email is taken end end

    Read the article

  • What causes session/forms authentication timeouts in MVC3

    - by SimpleUser
    Can somebody please let me know what are the reasons for your authentication to die suddenly, even when you are working on an application without any idle time? Both with and without AJAX calls. And what are the different reasons for getting a 302 redirect from an MVC3 application to the Logon page. Been struggling with an issue with timeouts that happen at random. Sometimes within a few minutes of login to the application and sometimes you can go for hours (with/without idle time) without being thrown out. Thank You

    Read the article

< Previous Page | 38 39 40 41 42 43 44 45 46 47 48 49  | Next Page >