Search Results

Search found 19528 results on 782 pages for 'form factor'.

Page 20/782 | < Previous Page | 16 17 18 19 20 21 22 23 24 25 26 27  | Next Page >

  • MVC2 Ajax Form does unwanted page refresh

    - by Kay
    Hi, I am pretty new to MVC. I have my first Ajax Form here: <div id="test"></div> <div id="MainChatMenu"> <% using (Ajax.BeginForm("SendMessage", "MainChat", new AjaxOptions { UpdateTargetId="test"})) { %> <input id="chatMessageText" type="text" maxlength="200" /> <input type="submit" value="Go"/> <% } %> Now, if I click the submit button, the page is reloading, goint to mysite/controller/action. I thought that the default behaviour of the Ajax.BeginForm was exactly not to do that? Where's my newbie mistake? My Controller is called correctly, but data passing also doesn't work. Probably because of the same mistake? Here's the code: public class MainChatController : Controller { [AcceptVerbs(HttpVerbs.Post)] public EmptyResult SendMessage(FormCollection formValues) { return new EmptyResult(); } }

    Read the article

  • Custom form designer, move/resize controls using WinAPI

    - by jonny
    I have to fix some problems and enchance form designer written long ago for a database project. In Design Panel class code I encountered these lines private void DesignPanel_MouseDown(object sender, MouseEventArgs e) { if (e.Button == MouseButtons.Left) { (sender as Control).Capture = false; switch (FMousePosition) { case MousePosition.mpNone: SendMessage((sender as Control).Handle, WM_SYSCOMMAND, 0xF009, 0); break;// Move case MousePosition.mpRightBottom: SendMessage((sender as Control).Handle, WM_SYSCOMMAND, 0xF008, 0); break;//RB case MousePosition.mpLeftBottom: SendMessage((sender as Control).Handle, WM_SYSCOMMAND, 0xF007, 0); // ... here are similar cases ... case MousePosition.mpLeft: SendMessage((sender as Control).Handle, WM_SYSCOMMAND, 0xF001, 0); break;//L } } } FMousePosition indicates whether mouse was over any edge of selected control. What confusing me is these windows messages: it seems there is no documentation on WM_SYSCOMMAND with parameters 0xF001-0xF009 (maybe it starts some kind of 'drag/resize sequence'). Any ideas? If my suggestion is right, then how can I cancel these sequences?

    Read the article

  • PHP form script error

    - by Alex
    Hi, I have created a rather larger html form and I would like the data to send to my email address. I am using the POST method and thought my PHP was up to snuff. However, I now get the following error upon submission: Parse error: syntax error, unexpected '}' in C:\www\mo\marinecforum\send_form_application.php on line 90. I am having a hell of a time with this. Beyond the error above, I wonder if there is a better way to approach this? Here is the PHP: http://pastebin.com/MKUcgihg Many thanks, Alex

    Read the article

  • unrobustive jQuery and rails with ajax and form validation

    - by bogumbiker
    Hello, I am looking for a way to call successfully custom function from submitHandler to do proper ajax post. Here is my custom function: jQuery.fn.submitWithAjax = function() { this.submit(function() { $.post(this.action, $(this).serialize(), null, "script"); return false; }) return this; }; Before using validate plugin I had following which worked fine: $(document).ready(function() { $("#my_form").submitWithAjax(); } Now I have added the validation part and have no idea how to call my custom submitWithAjax function?? $(document).ready(function() { $("#my_form").validate({ /*Validations - works perfectly!! */ }, submitHandler: function(form) { /* $("#my_form").submitWithAjax(); - this works but introduces recursion */ /* how to call custom subitWithAjax() ????? */ } }); }) Thanks!

    Read the article

  • PHP form class

    - by Oli
    I'm used to ASPNET and Django's methods of doing forms: nice object-orientated handlers, where you can specify regexes for validation and do everything in a very simple way. After months living happily without it, I've had to come back to PHP for a project and noticed that everything I used to do with PHP forms (manual output, manual validation, extreme pain) was utter rubbish. Is there a nice, simple and free class that does form generation and validation like it should be done? Clonefish has the right idea, but it's way off on the price tag.

    Read the article

  • Submit HTML form with GET method with full action path

    - by Manny Calavera
    Hello. I am trying to submit a form with method GET and action "index.php?id=3". The problem is that it jumps to the url specified but it cuts off "?id=3" part. I need that so I can identify an user. Any ideas on how I could submit the whole url ? I don't want to change this method, by design is much complex than I told you here. It's a simple version. Any ideas ? Thanks.

    Read the article

  • Sign Up form text shows white with a white background

    - by Rob
    I have a signup form on a website that I am developing using dreamweaver. The input text and background text are both showing as white (or not showing!) even though the page text is set at #0000CC. See it here: www.betterlifecoaching.co.uk (it is still work in progress) How can I overcome this? The sign up script is: .link, SignUp .signupframe { color: #0033CC; font-family: Arial, Helvetica, sans-serif; } .link { text-decoration: none; } #SignUp .signupframe { border: 1px solid #282FFF; background: #ABB4BA; } Email Marketing You Can Trust many thanks Rob

    Read the article

  • Unobtrusive jQuery and Rails with AJAX and form validation

    - by bogumbiker
    Hello, I am looking for a way to call successfully custom function from submitHandler to do proper ajax post. Here is my custom function: jQuery.fn.submitWithAjax = function() { this.submit(function() { $.post(this.action, $(this).serialize(), null, "script"); return false; }) return this; }; Before using validate plugin I had following which worked fine: $(document).ready(function() { $("#my_form").submitWithAjax(); } Now I have added the validation part and have no idea how to call my custom submitWithAjax function?? $(document).ready(function() { $("#my_form").validate({ /*Validations - works perfectly!! */ }, submitHandler: function(form) { /* $("#my_form").submitWithAjax(); - this works but introduces recursion */ /* how to call custom subitWithAjax() ????? */ } }); }) Thanks!

    Read the article

  • Drupal Custom Form with Filters

    - by dallasclark
    I'm displaying cars on a page created with a view and displays. I want to be able to create a form on the home page to allow people to select the 'make', which will then update the 'models' list based on the 'make' the user selects, 'year' to and from, and 'amount' to and from. What the user selects will of course alter the list of used cars, whether that's on the existing used cars page or a new page. I would be happy to create a custom module if required, just need some direction. Thanks !

    Read the article

  • Examples of good IDEs to analyze for custom Form/Report designer

    - by Paul Sasik
    I am working on a basic form/report designer. Some of the features i'm looking to implement are: Single or multiple selection of objects Alignment of objects (when several are selected) Same-sizing of objects (when several are selected) Moving/dragging of selected object(s) Selected object resizing in eight directions (using object grips) For features and look-and-feel I've analyzed and used a mixture of ideas from: MS Visual Studio 200x (most useful so far) Visio Crystal Reports My question is: Have I overlooked some other IDEs that provide these kinds of features that are better and user-friendlier examples of what to do than others i've looked at? (They don't have to be Microsoft products. That's just what i have ready access to.)

    Read the article

  • .NET custom form designer: How to implement IMenuCommandService?

    - by jonny
    I've got a report form designer written long ago for a database project. It used a lot of winapi magic hence i was forced to rewrite some parts 'in proper way'. Thanks to some articles from MSDN magazine (here and here) and CodeProject i was able to implement designer surface, toolbox and undo/redo engine. Every resource i discovered on the topic so far is a bit outdated. Can you point to fresh/comprehensive article? Code from article mentioned above seems not working. MenuCommandService.ShowContextMenu is called but nothing appears since there aren't any DesignerVerbs in globalVerbs collection. Should i add 'standard' ones, corresponded to designer actions such as cut/paste, manually? If yes, how can i accomplish this?

    Read the article

  • Using a dynamic number of checkboxes in a rails form

    - by TenJack
    I am trying to create a form with a dynamic number of checkboxes that each link to a string that is not a model number but is instead just a word. For examples: <% form_for(@words) do |f| %> <% ["apple","banana","orange"].each do |word| %> <%= f.check_box :word %> <%= f.submit %> <% end %> <% end %> So, if "apple" was checked, it would just send the string "apple" in the params. Anyone know how to do this?

    Read the article

  • jqtransform form events problem

    - by Newbie
    I'm a web designer with css experience, but I'm not a JS developer. I used jqtransform to style a search form , the problem is it removes all events from selectors and the search button . here is the code before jqtransform <input id="go-search" type="button" name="btn_search" value="search" onclick="searchLocations()" /> and after applying the script, the button doesn't do any thing I opened the page source and here how it looks like: <button class=" jqTransformButton" type="button" name="btn_search" id="go-search"><span><span>search</span></span></button> Please help me !

    Read the article

  • PHP Form Validation Regular Expression, no symbols or numbers

    - by MrEnder
    Ok I am trying to get the users First Name the form gets their name perfectly fine and posts it into a variable. Now I am trying to do error checking else if(!preg_match("/^[\w-]+$/", $firstNameSignup)) { $firstNameSignupError = "Your first name cannot contain numbers or symbols, you entered " . $firstNameSignup; $firstNameSignup = ""; } I tried the above code and it does not like me but my if statement if(!isset($firstNameSignup) || $firstNameSignup == "") { $firstNameSignupError = "You must enter your first name"; } works fine so I know that the error is in that else if statement... most likely in my regular expression any help??? I'm totally at a loss (really new to PHP and regular expressions) Thanks Shelby

    Read the article

  • Defining Form Input with Dialog

    - by Workoholic
    Hi. I want my php application to allow the user to select a file from their computer. I then want to store the file's path, but I don't want to upload the file. With the <input type="file" />, the file is uploaded, which would take too long. Is there a way to do this? Maybe if I change the input's type to text with jquery right before the form is sent? I could just let the user type the path, but that is not very convenient...

    Read the article

  • Disable escape in Zend Form Element Submit

    - by Joaquín L. Robles
    I can't disable escaping in a Zend_Form_Element_Submit, so when the label has special characters it won't display it's value.. This is my actual Zend Form piece of code: $this->submit = new Zend_Form_Element_Submit('submit'); $this->submit->setLabel('Iniciar Sesión'); $this->submit->setIgnore(true); $this->addElement($this->submit); I've tried $this->submit->getDecorator('Label')->setOption('escape', false); but I obtain an "non-object" error (maybe submit isn't using the "Label" Decorator).. I've also tried as suggested $this->submit->setAttrib('escape', false); but no text will be shown either.. Any idea? Thanks

    Read the article

  • My FORM problem issues

    - by Azzyh
    So i have this in my form: <textarea onfocus="javascript:clearContents(this);" rows="5" cols="40" id="comment" name="comment">Skriv hvorfor du vælger at stemme ja/nej. Skal indeholde detaljer, kritik/råd. Klik for at skrive</textarea><br /> Ja: <input type="checkbox" value="Y" id="SCvote" name="SCvote"> eller Nej: <input type="checkbox" value="N" name="SCvote"> Now onfocus (when you click on the box) it clears the text "Skriv hvorfor...", but if you dont write anything and still submit it, my php code thinks it contains something and inserts that text "Skriv hvorfor...". And another issue is the checkboxes. If i dont pick anything, it inserts "Y", even if i pick the other "N" it does "Y", and i dont want it to be possible that you can check both of them. how do i do?

    Read the article

  • Insert Comment Reply Form Into Page Using Jquery

    - by Joe
    I have been making a threaded comment system as a way to learn php and javascript/jquery properly. Ive done bits and bobs in the past but ive made a new years resolution to learn it properly. Im having trouble inserting a reply form into the comment tree below the comment being replied to. I know this is probably pretty basic but how do you insert html into a page when someone clicks a link. This code wasn't working for me: $(document).ready(function(){ $(function() { $('a#reply').click(function() { $(this).append("the html blah"); }); }); }); Anyone see where im going wrong?

    Read the article

  • PHP: form action on same page, still show same until refresh

    - by Karem
    Yes, Im having a little edit profile page, index.php?mode=profile. Lets take the username in the editprofile form as example. The username is already in the username-field. So i changed from "Peter" to "Tom" and press save. The action is ?mode=profile&edit=true. So now when i have pressed save it has updated the column in the db from Peter to Tom. But this field keeps having the value "Peter" until if i do press refresh (or f5), then "Tom" will appear. Like it hasnt updated in the database anything, although it did but it still shows Peter until next refresh.. like it caches, but it shouldnt cache nothing? Any help on this? Is it because its on the same "page" / file? what can i do

    Read the article

  • how to add feedback form in Joomla 1.5.15 website

    - by Amzy
    hi, I am new to Joomla and using joomla1.5.15 hosted on godaddy. Currently no new/additional compenents/extentions have been installed. I want to add a feedback form (with few text/check boxes, radio buttons etc) in my site, which should also send an email to some email id without storing information in database. Kindly guide me how to do that? Is it reuiqred to install any components? If so, kindly suggest the non-commercial component(s). Thanks in advance. Thanks Amzy

    Read the article

  • How to preserve hyperlink when submitting via php form into MySQL

    - by TheTub
    Hi All, I've created a form that stores free text fields into a MySQL database. All works fine and the data is displayed back as intended when viewed. Except for one niggle. In an attempt to prevent malicious attacks I have used mysql_real_escape_string to remove any unwanted code from the input. However, I need to be able to preserve hyperlinks and basic html. For example, I want to store the following: <p align="left">Please follow this <a href="link.html">link</a></p> But the link is being stored as \"link.html\" as the quotes are being escaped. How can I preserve this link and other html? Many thank TT

    Read the article

  • Issue with 'selected' value within form

    - by JM4
    I currently have a form built in which after validation, if errors exist, the data stays on screen for the consumer to correct. An example of how this works for say the 'Year of Birth' is: <select name="DOB3"> <option value="">Year</option> <?php for ($i=date('Y'); $i>=1900; $i--) { echo "<option value='$i'"; if ($fields["DOB3"] == $i) echo " selected"; echo ">$i</option>"; } ?> </select> If an error is found, the year of birth value returns the year previously entered. I am able to have this work on all field with the exception of my 'State' field. I build the array and function for the drop down with the following code: <?php $states_arr = array('AL'=>"Alabama",'AK'=>"Alaska",'AZ'=>"Arizona",'AR'=>"Arkansas",'CA'=>"California",'CO'=>"Colorado",'CT'=>"Connecticut",'DE'=>"Delaware",'DC'=>"District Of Columbia",'FL'=>"Florida",'GA'=>"Georgia",'HI'=>"Hawaii",'ID'=>"Idaho",'IL'=>"Illinois", 'IN'=>"Indiana", 'IA'=>"Iowa", 'KS'=>"Kansas",'KY'=>"Kentucky",'LA'=>"Louisiana",'ME'=>"Maine",'MD'=>"Maryland", 'MA'=>"Massachusetts",'MI'=>"Michigan",'MN'=>"Minnesota",'MS'=>"Mississippi",'MO'=>"Missouri",'MT'=>"Montana",'NE'=>"Nebraska",'NV'=>"Nevada",'NH'=>"New Hampshire",'NJ'=>"New Jersey",'NM'=>"New Mexico",'NY'=>"New York",'NC'=>"North Carolina",'ND'=>"North Dakota",'OH'=>"Ohio",'OK'=>"Oklahoma", 'OR'=>"Oregon",'PA'=>"Pennsylvania",'RI'=>"Rhode Island",'SC'=>"South Carolina",'SD'=>"South Dakota",'TN'=>"Tennessee",'TX'=>"Texas",'UT'=>"Utah",'VT'=>"Vermont",'VA'=>"Virginia",'WA'=>"Washington",'WV'=>"West Virginia",'WI'=>"Wisconsin",'WY'=>"Wyoming"); function showOptionsDrop($array, $active, $echo=true){ $string = ''; foreach($array as $k => $v){ $s = ($active == $k)? ' selected="selected"' : ''; $string .= '<option value="'.$k.'"'.$s.'>'.$v.'</option>'."\n"; } if($echo) { echo $string;} else { return $string;} } ?> I then call the function from within the form using: <td><select name="State"><option value="">Choose a State</option><?php showOptionsDrop($states_arr, null, true); ?></select></td> Not sure what I'm missing but would love any assistance if somebody sees the error in my code. Thanks!

    Read the article

  • jquery form select (if exists in $_POST)

    - by SoulieBaby
    Hi all, I'm trying to redo this in jQuery: <script language="JavaScript" type="text/javascript"> var thisIsSelected = '<?php echo $_POST['image']; ?>'; var sel1= document.getElementById('image'); sel1.value = thisIsSelected; </script> But I seem to keep breaking it lol Basically I want jQuery to check if $_POST['image'] exists and if so make it selected on the form. I'm assuming if it's possibly with javascript, jquery can do it easier ;)

    Read the article

  • jquery form validation

    - by kalpaitch
    I am using jquery for a quick and easy form validation My forms use the input's default value as a label and I have a little onfocus and onblur javascript function to show and hide this when the user starts to type: <input name='fnameREG' type='text' id='fnameREG' value='first name' size='70' onfocus='clearInput(this)' onblur='clearInput(this)' /> <input name='lnameREG' type='text' id='lnameREG' value='last name' size='70' onfocus='clearInput(this)' onblur='clearInput(this)' /> My issue with the validation is that when the submit button is clicked the pluggin thinks that all the fields are set because they have a default value. I looked but I couldn't find a supplied method to get round this. Thanks!

    Read the article

  • Combining Two Models in Rails for a Form

    - by matsko
    Hey Guys. I'm very new with rails and I've been building a CMS application backend. All is going well, but I would like to know if this is possible? Basically I have two models: @page { id, name, number } @extended_page { id, page_id, description, image } The idea is that there are bunch of pages but NOT ALL pages have extended_content. In the event that there is a page with extended content then I want to be able to have a form that allows for editing both of them. In the controller: @page = Page.find(params[:id]) @extended= Extended.find(:first, :conditions = ["page_id = ?",@page.id]) @combined = ... #merge the two somehow So in the view: <%- form_for @combined do |f| % <%= f.label :name % <%= f.text_field :name % ... <%= f.label :description % <%= f.text_field :description % <%- end This way in the controller, there only has to be one model that will be updated (which will update to both). Is this possible?

    Read the article

< Previous Page | 16 17 18 19 20 21 22 23 24 25 26 27  | Next Page >