form

How to prevent buttons from submitting forms

In the following page, with Firefox the remove button submits the form, but the add button doesn't. How do I prevent the remove button from submitting the form? <html> <head> <script type="text/javascript" src="jquery-1.3.2.min.js"></script> <script type="text/javascript"> function addItem() { var v = $('form :hidden:last').attr('nam...

HTML form with two submit buttons and two "target" attributes

Hi I have one html <form> The form has only one action="" However I wish to have 2 different target="" attributes depending on which button you click to submit the form. This is probably some fancy javascript, but I haven't an idea where to begin. Any ideas how I could create two buttons, each submit the same form, but each button gi...

jQuery Form Plugin does not catch response

hey there, i just tried the jQuery Form plugin with the code example from http://malsup.com/jquery/form/#code-samples it actually shows the Request (beforeSubmit), but it doesnt catch the response (success). It opens the response in the current window, as the browser would do a regular form submit. (response is plaintext). any ideas? ...

curl sending GET instead of POST

Actually, it's gotten so messy that I'm not even sure curl is the culprit. So, here's the php: $creds = array( 'pw' => "xxxx", 'login' => "user" ); $login_url = "https://www.example.net/login-form"; //action value in real form. $loginpage = curl_init(); curl_setopt($loginpage, CURLOPT_HEADER, 1); curl_setopt($loginpage, C...

Dynamic GUI creation using configuration files

Is is possible to create GUI for a Delphi application using an configuration pattern from an xml etc... file. Any frameworks exist for such an operation. It is easy with scripting like languages but can we simulate this behaviour in Delphi? I need free library. ...

How do I edit multiple records in one Ruby on Rails form?

I'm making a simple to-do list application to teach myself Ruby on Rails, however I've run into a problem. I have a simple form that lists to-do items with a check box to the left of them, and an "Update" button at the bottom, as so: [ ] Do the dishes [ ] Take out the garbage [ ] Take over the world ( Update ) Each to-do item is a sepa...

AS3 anti bot form script?

I wrote a AS3 script, basically the script just a form that allow user to enter their email address. After launch the site for couple of months, I found I receive a lots of BOT spammers. I know, 1 way of prevent BOT is using recaptcha thing, beside recaptcha, is there any way to prevent bot to submit my AS3 form?? ...

Open Fancybox (or equiv) from Form input type="submit"

is there a way to get a fancybox (http://fancy.klade.lv/) or any other lightbox from submitting a FORM (with an image button)? HTML looks like this: <form action="/ACTION/FastFindObj" method="post"> <input name="fastfind" class="fastfind" value="3463" type="text"> <input name="weiter" type="submit"> </form> These won't do: $...

html form enctype

In HTML forms containg file uploads, enctype="multipart/form-data" attribute has to be set. This much I know. But why? What exactly does it change? How does it differ from application/x-www-form-urlencoded? ...

Problem with form direct submitting

If I visit the link http://mega.1280.com/file/EKOZKE/, enter the captcha code and click the Download button, I can download the file. I wonder if I can submit the form without clicking the 'Download' button? I mean typing the captcha code directly on the address bar and hit Enter? I try http://mega.1280.com/file/EKOZKE/?code_security=...

Simulate form submit with VB.NET

I wonder if I can simulate the action of the button in this website by VB.NET code ? http://www2.xonefm.com/hot10/index_in.aspx ...

How many Radio Buttons can be checked at any one time in this specific form?

If a Form contains 2 Group Boxes each containing 3 Radio Buttons and the Form itself contains 5 Radio Buttons not in either of the Group Boxes how many Radio Buttons can be checked at any one time? 1.. 2... 3... more? ...

Get original path from django filefield

My django app accepts two files (in this case a jad and jar combo). Is there a way I can preserve the folders they came from? I need this so I can check later that they came from the same path. (And later on accept a whole load of files and be able to work out which came from the same folder). ...

Rails select_tag with ajax action

I have the following select list. <%= select_tag(:editlevel,options_from_collection_for_select(Level.all, :id, :name)) %> when the user selects an option from the above list, the list below should be populated with values from database based on the above selection. <%= select_tag(:lques,{},{ :size =>10, :style => "width:200px"}) %> i...

How to show form in front in C#

Folks, Please does anyone know how to show a Form from an otherwise invisible application, and have it get the focus (i.e. appear on top of other windows)? I'm working in C# .NET 3.5. I suspect I've taken "completely the wrong approach"... I do not Application.Run(new TheForm ()) instead I (new TheForm()).ShowModal()... The Form is bas...

Using search from other site on yours

I want to put a search form on my site, but when you hit search, it will search another site. For example, I have a form on mydomain.com/search that will search domain.com/search?term="keyword" Once I hit the search button, I want it to open a new window appending the keyword to the URL. Can this done via jQuery/PHP? ...

form post to mod_rewrite url

I am trying to submit a form to the url "localhost/login". Inside my login directory I have an index.php file with the code I am using to debug that the post is working: <?php echo $_POST['username']; ?> I have a .htaccess file inside my login directory: RewriteEngine on RewriteRule ^. index.php [L] The problem is, when I post to l...

How to get the form parent of an input?

Hi, i need to get a reference to the FORM parent of an INPUT when I only have a reference to that INPUT. Is this possible with javascript (or else jQuery) ? function doSomething(element) { //element is input object //how to get reference to form? } This doesn't work: var form = $(element).parents('form:first'); alert($(form...

How do I set a unique ID for checkboxes in a multi-record Rails form?

I've set up a Rails form roughly following the instructions in this Railscast. Here's the code for the form: <% form_tag complete_todos_path, :method => :put do %> <ul> <div id="incomplete_todos"> <% @incomplete_todos.each do |todo| %> <%= render :partial => todo %> <% end %> </div> </ul> <%= submit_tag...

Adding POST parameters before submit

I've this simple form: <form id="commentForm" method="POST" action="api/comment"> <input type="text" name="name" title="Your name"/> <textarea cols="40" rows="10" name="comment" title="Enter a comment"> </textarea> <input type="submit" value="Post"/> <input type="reset" value="Reset"/> </form> I need to add two PO...