forms

Combining a Form and CPagination in Yii

I've set up a page that displays server logs and added a filter form so I can filter the logs on specific actions, dates, etc. I can't seem to figure out how to use CPagination to split the results into pages, however. If I add the CPagination widget, when a page is selected from the widget, the filter form isn't resubmitted and my fil...

PHP - prevent form from being submitted twice

Hi I have a simple php form, like this: <?php if(isset($_POST['myform'])) // email... else // display form the problem is that if I refresh the page after I submit the form, it gets submitted twice... How can I prevent this from happening? ...

Remove default browser styles on form elements.

Note: I've tried searching on google, but couldn't find what I was looking for. Browsers have some default styles they use for rendering form elements, which is different from browser to browser. Is there a way to reset all of the native browser styles for form elements like select, radios, checkbox etc, to make a consistent look across...

jQuery / Javascript - run AJAX request after X seconds

Hi so I have this code: $('input.myinput').each(function(){ var id = $(this).val(); var myajax = function(){ $.ajax({ url: ajax_url, type: "GET", data: ({ code: id }), beforeSend: function() { }, error: function(request){ }, success: function(data) { aler...

ID from tabs to form with javascript?

Ok, so Im totally new to javascript, but I would need to do following: on my page I have tabs (done with javascript) and then I have search form. Now I need from those tabs a id to put to that form. I have tabs1 tabs2 tabs3 and all those href="#1", href="#2" and so on. I would need to get that number out of that tab to form input value...

Jquery + form submit... in a need of fresh set of eyes

Hello, I do struggle with it as hell. Can someone tell me what is wrong with that code. In a word: CI + jquery form submit. I try to add inline row. java part var pair = $('#pair').attr('value'); var entry = $('#entry').attr('value'); var exit = $('#exit').attr('value'); var buysell = $('#buysell').attr('value'); ...

PHP—Send Mail Question

I'm writing a sendmail script in PHP at the moment. It's largely based around what a user selects in a menu dropdown.The menu looks like this: <select name="program"> <option value="Red Program">Red Program</option> <option value="Green Program">Green Program</option> <option value="Yellow Program">Yellow Program</option> ...

part of form in modal window with jquery

I have complex form that I want to make more user friendly. It consists of many fieldsets. Can I take one of fieldsets and make it into a modal window without braking form? My idea is that fieldset is visually replaced by button that triggers modal window that displays replaced part of form in modal window. form must perform same as wit...

How to tell paperclip not to delete the atachment if the edit form has the file field empty?

So, I have this in my model: # app/models/interior.rb class Interior < ActiveRecord::Base belongs_to :casa has_attached_file :plano, :path => ":rails_root/public/planos_unidades/:styles/:id.:content_type_extension", :url => "/planos_unidades/:styles/:id.:content_type_extension", :styles => { :thumb => '98x98' }, :co...

Django Customizing Form Rendering

When rendering a django form using the as_p method, you traditionally get something like: <p>Subject: <input type="text" name="subject" maxlength="100" /></p> if you had defined the following field: subject = forms.CharField(max_length=100) Is there some additional property available to fields, that customizes how they are rendered...

Returning a file to a WSGI GET request

Hi all, I'm new to WSGI on python; but have a windows server that's got isapi_wsgi installed on it. I also have a script that handles my GET requests all up and running great. The thing is, someone sends me a request, and I need to return a zip file to the requester. The following code is in my GET handler and it works, but doesn't seem...

Engineering Change Order Forms

What have others used when a customer wants a particular feature and they have required a signed document detailing the feature and expectations for that feature? Are there any 'engineering change forms' available to use? We are going to move towards this with our customers to reduce confusion and meet the customer's overall expectatio...

Using a variable in an array, when variable is pulled from an sql table.

Basically I am trying to make a simple form that allows the user to edit data in a table. It pulls the data from the database and uses those variables to prefill the form. Then the user can just edit the info in the form and resubmit the data. The problem is... the state selection is a function that auto creates the drop down box in t...

Bassistance Validation not working correctly with jqTransform

Hi, I'm using jqTransform to style my forms which works very well. However, when I add Bassistance's Validation plugin, the validation error messages are shown within the jqTransformwrapper divs (i.e. inside the textbox) instead of the parent element (after input). So the DOM shows this: <label for="firstname">Firstname</label> <div c...

more then one form element can be present in asp.net ?

hi all i want to know is it possible that in one aspx page there will be more then one form element ? ...

jQuery serializeArray not picking up dynamically created form elements

Hi, I've got a form that's dynamically created using ajax (as data for the form elements has to come from a database) and I want to serialize the elements of the form to submit by ajax. I'm currently just testing my theory using code from the jQuery website just to see if I can pick up the form elements and this is where the problem lies...

IE and Javascript

So I have a registration page that works fine in Firefox, but IE 6-8 give me a 'document.info.altDate1.value' is null or not an object error on submit. This is the body: <DIV id=wrapper> <DIV id=outer-space> <DIV id=hfeed> <H1>Register for <SPAN>Orientation</SPAN></H1> <p style="width:550px;">Orientation fee is NON-REFUNDABLE, but can...

Setting a select value

Hey all, Is there any way to set the value of a select and have it act as if it was changed by the user? I used $(document).ready(function(){ $('#department').change(function(){ $('#academicbody').hide(); var selected = $("#department :selected").val(); $('#progrmmehome').load('/email/programmelist/'+selecte...

How to submit a form in an ajax function?

Hi, normally my ajax functions look something like this: function ajaxCallback(url,functionToRun) { if (window.XMLHttpRequest) {// code for new browsers myXMLlhttp=new XMLHttpRequest(); } else {// code for IE6 and lower myXMLlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } myXMLlhttp.onreadystatechange=functionToRun; myXMLlht...

Oracle versus DB2 on data Validation

Most forums cite minor differences in speed, backup, etc. It's about time someone tell how the two differ when it comes to GUI data validation. Do this 2 Database always depend on java(or other software), or do they have the ability to create a user interface the accepts only valid input. Things like: positive numbers only, age between 1...