Search Results

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

Page 82/243 | < Previous Page | 78 79 80 81 82 83 84 85 86 87 88 89  | Next Page >

  • Best way to manage the persistence of a form state, to and from a database

    - by Laurent.B
    In a JSP/Servlet webapp, I have to implement a functionality that allows a user to save or restore a form state, that latter containing for instance some search criteria. In other words, the user must be able to save or restore field values of a form, at any time. On the same page that contains that form, there's also another little form that allows him to name his form state before saving it. Then, later he'll be able to recall that state, via a combobox, and refill dynamically the form with the state he selected. I know how to implement that by hand but I would prefer not to reinvent the wheel then I'd like to know if there are some frameworks managing that kind of functionality ? A mix between JSP taglib, filter class, jQuery or other JavaScript frameworks... My research has not give anything yet. Thank you in advance.

    Read the article

  • Results page in other window.

    - by xRobot
    I have this simple form: <form method="post" action"."> <input type="text" name="title"> <input type="submit" name"send"> </form> I want that when a user click on submit, then will be open another window of browser with the results. Is it possible ?

    Read the article

  • django - where to clean extra whitespace from form field inputs?

    - by Westerley
    I've just discovered that Django doesn't automatically strip out extra whitespace from form field inputs, and I think I understand the rationale ('frameworks shouldn't be altering user input'). I think I know how to remove the excess whitespace using python's re: #data = re.sub('\A\s+|\s+\Z', '', data) data = data.strip() data = re.sub('\s+', ' ', data) The question is where should I do this? Presumably this should happen in one of the form's clean stages, but which one? Ideally, I would like to clean all my fields of extra whitespace. If it should be done in the clean_field() method, that would mean I would have to have a lot of clean_field() methods that basically do the same thing, which seems like a lot of repetition. If not the form's cleaning stages, then perhaps in the model that the form is based on? Thanks for your help! W.

    Read the article

  • c# getting value from other form

    - by djuzla123
    Situation i have: textbox(to input your name) on form1. From that form1 on button click i go to form2. From form2 button click to form3. On form3 on button click i need to writte me in empty textbox value from textbox on form1 that user wrote down. example: on form1 in textbox1 i write my name "Djuzla". When i go to form3 and click button to see what name i wrote in form1 it should show in empty textbox3 form3 "Djuzla". I'm stuck with this few hours now, and it stupid problem but i have no idea what to do next.. tried all from zillion theards on net :p

    Read the article

  • URL decoding Japanese characters etc. in Java

    - by DanieL
    I have a servlet that receives some POST data. Because this data is x-www-form-urlencoded, a string such as ???? would be encoded to &#12469;&#12508;&#12486;&#12531;. How would I unencode this string back to the correct characters? I have tried using URLDecoder.decode("encoded string", "UTF-8"); but it doesn't make a difference. The reason I would like to unencode them, is because, before I display this data on a webpage, I escape & to &amp; and at the moment, it is escaping the &s in the encoded string so the characters are not showing up properly.

    Read the article

  • Cloning whole form elements after clicking button

    - by FreshPro
    I have this following form <form action="" class="form-horizontal"> <div id="wrapper"> <div class="row-fluid"> <div class="span6"> <div class="control-group"> <label class="control-label"><?=$core->l("default_comm_type");?></label> <div class="controls"> <select id="fld_default_comm_type" name="fld_default_comm_type[]" defaultValue="-1" class="m-wrap span10" field="fld_default_comm_type" appEditor="true"> <?=combo_creator::render_default_comm_types()?> </select> </div> </div> </div> <div class="span4 checkerAlign"> <div class="control-group"> <div class="controls"> <?=$core->l("is_active");?> </div> </div> </div> <div class="span2 checkerAlign"><input type="checkbox" name="fld_active[]" id="fld_active" editType="booleanEdit" appEditor="true"/></div> </div> <div><a href="#" id="addMore">Add Row</a></div> </div> The question is when user clicks Add Row button, I need to create a copy of this form elements inside <div id="wrapper"> How can i do that? EDIT: SOLVED <form action="" class="form-horizontal" id="wrapper"> <div class="row-fluid"> <div class="span6"> <div class="control-group"> <label class="control-label"><?=$core->l("default_comm_type");?></label> <div class="controls"> <select id="fld_default_comm_type" name="fld_default_comm_type[]" defaultValue="-1" class="m-wrap span10" field="fld_default_comm_type" appEditor="true"> <?=combo_creator::render_default_comm_types()?> </select> </div> </div> </div> <div class="span4 checkerAlign"> <div class="control-group"> <div class="controls"> <?=$core->l("is_active");?> </div> </div> </div> <div class="span2 checkerAlign"><input type="checkbox" name="fld_active[]" id="fld_active" editType="booleanEdit" appEditor="true"/></div> </div> <a href="#" data-action="add">add</a> <a href="#" data-action="delete">delete</a> </form> In the Js part: jQuery("#addMore").click(function(){ var contents = jQuery("form").html(); jQuery("#test").append(contents); }); When add is clicked it inserts form elements just as I wanted and when delete is clicked it deletes elements. Thank you for the tips guys Problem solved! Thanks guys.

    Read the article

  • maintain formatting entered into an html form?

    - by NickG77
    Im setting up a web form, and I'm trying to have it where visitors can paste their resumes into a text area. Then I want to email the info using php mail(). But the resume info is just stored in the variable as one long string with no formatting. Is there a way I can send the pasted resume text to the client in the resume format? Maintaining all the line breaks and stuff? He wants to avoid having people upload resumes.

    Read the article

  • Centering form elements with left alignment

    - by user1766797
    I would like to center the elements in my form without moving the text or buttons from being aligned on the left. So it would look like this: The bottom square is supposed to be a button. I want it centered, but the <center> tag moves the text and button so they're centered to the input box. Here is my code: <form action="login.php" method="post"> <div class="aside"> <div id="center"> Username:<br> <input type="text" name="username"><br> Password:<br> <input type="password" name="passwor"><br> <input type="submit" class="button" name="submit" value="Login"><br><br> </div> </div> </form> and the css: #center{ width: 250px; margin-left: auto; margin-right: auto; float: center; } div.aside { margin-left: 15px; margin-top: 10px; width: 250px; background: #f5f5f5; border: 1px solid #e9e9e9; line-height: 150%; } div.aside .button{ padding:3px; width: 50px; margin-top: 3px; background-color: #00A1E6; border: 1px solid #0184BC; text-decoration:none; color: #ffffff; text-align: center; -webkit-appearance: none; }

    Read the article

  • How to Pass URL param in form on submit?

    - by adamwstl
    I have <form name="feedback" method="post" onsubmit="return checkform()" action="engine.php?ad="> and I need to append a variable to engine.php?ad=, which is <?=$_GET['page'];?> in php (pass a URL param to the next page using this.) How would I go about adding that? I also have it in javascript if needed.

    Read the article

  • More efficient way of writing this javascript

    - by nblackburn
    I am creating a contact form for my website and and using javascript to the first layer of validation before submitting it which is then checked again via php but i am relatively new to javascript, here is my script... $("#send").click(function() { var fullname = $("input#fullname").val(); var email = $("input#email").val(); var subject = $("input#subject").val(); var message = $("textarea#message").val(); if (fullname == ""){ $("input#fullname").css("background","#d02624"); $("input#fullname").css("color","#121212"); }else{ $("input#fullname").css("background","#121212"); $("input#fullname").css("color","#5c5c5c"); } if (email == ""){ $("input#email").css("background","#d02624"); $("input#email").css("color","#121212"); }else{ $("input#email").css("background","#121212"); $("input#email").css("color","#5c5c5c"); } if (subject == ""){ $("input#subject").css("background","#d02624"); $("input#subject").css("color","#121212"); }else{ $("input#subject").css("background","#121212"); $("input#subject").css("color","#5c5c5c"); } if (message == ""){ $("textarea#message").css("background","#d02624"); $("textarea#message").css("color","#121212"); }else{ $("textarea#message").css("background","#121212"); $("textarea#message").css("color","#5c5c5c"); } if (name && email && subject && message != ""){ alert("YAY"); } }); How can i write this more efficiently and make the alert show if all the fields are filled out, thanks.

    Read the article

  • encode data in get request

    - by user902395
    <!DOCTYPE html> <html> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <body onload="searchForPrograms.submit();"> <form id="searchForPrograms" name="searchForPrograms" enctype="application/x-www-form-urlencoded" method="get" action="searchingEngine.php"> <input type="text" id="query" name="query" value="MyProgram" /><br> <input type="submit" value="Search" /> </form> </body> The get request should have the form like "searchingEngine.php?query=%22MyProgram%22". How can I encode the value of the query input correctly?

    Read the article

  • User control disapear when added to a Panel

    - by dutt
    I've got a user control class that works fine, drawing, events firing and the works. When i programmaticly add it to a class that extends from Panel it disapears. I've checked around and the line that makes it disapear is the line where i go panel.Controls.Add(myuserControl). Without that line the control works just fine, does anybody know why it won't show after the add? I'm currently doing the painting of the user control by overriding OnPaint, but the panel is using the default painting.

    Read the article

  • Nested form child only updates if parent changes.

    - by chap
    In this video (10 sec) you can see that the nested attribute is only updated if it's parent model is changed. Using rails 3.0.0.beta and full project is on github. Summary of models and form: class Project < ActiveRecord::Base has_many :tasks accepts_nested_attributes_for :tasks end class Task < ActiveRecord::Base belongs_to :project has_many :assignments accepts_nested_attributes_for :assignments end class Assignment < ActiveRecord::Base belongs_to :task end form_for(@project) do |f| Project: f.text_field :name f.fields_for :tasks do |task_form| Task: task_form.text_field :name task_form.fields_for :assignments do |assignment_form| Assignment: assignment_form.text_field :name end end f.submit end

    Read the article

  • Jquery Mobile is adding text above my "<input type=submit"> automatically, how do i prevent this?

    - by Jack Dalton
    I've just begin work on a mobile version for one of my sites. I've set up my sign up form for my users. It worked fine and the CSS styled it correctly. @using (Html.BeginForm("XXX", "Registration", FormMethod.Post, new { @class = "twitter-sign-in-container" })) { <input type="submit" name="twitter-button" value="Sign in with Twitter" id="twitter-button" /> } Once I added Jquery mobile to the project if found that random unstyled text started to show up. On inspection I found that all input submits where being wrapped in new tags and adding un tagged text == to the inputs "Value": <form action="/registration/xxx" class="twitter-sign-in-container" method="post"> <div class="ui-btn ui-input-btn ui-corner-all ui-shadow"> "Sign in with Twitter" <input type="submit" name="twitter-button" value="Sign in with Twitter" id="twitter-button"> </div> </form> Does anyone have any clue as to why the "sign up with twitter" text is being added, and how i stop it? P.S Less important but I'd also like to know why Jquery wraps form contents in the bellow div.

    Read the article

  • Submit form without page reloading

    - by Camran
    I have a classifieds website, and on the page where ads are showed, I am creating a "Send a tip to a friend" form... So anybody who wants can send a tip of the ad to some friends email-adress. I am guessing the form must be submitted to a php page right? <form name='tip' method='post' action='tip.php'> Tip somebody: <input name="tip_email" type="text" size="30" onfocus="tip_div(1);" onblur="tip_div(2);"/> <input type="submit" value="Skicka Tips"/> <input type="hidden" name="ad_id" /> </form> When submitting the form, the page gets reloaded... I don't want that... Is there any way to make it not reload and still send the mail? Preferrably without ajax or jquery... Thanks

    Read the article

  • Difficulty with jQuery and input keydown event

    - by Rosarch
    I am making a simple JavaScript enhanced list. I want it to be a list of inputs, each with an 'Add' and 'Remove' button. If the user clicks 'Add', a new li will be added. If the user clicks 'Remove', that li will be removed. It works fine, except for hitting "enter" in an <input>. Currently, it always causes the Remove.click event handler to fire, unless there's only one item in the list. I'm not sure why. How can I suppress this? Here is the complete jQuery. My attempt to fix the "enter" issue is commented out, and it doesn't work. I suspect that I could be designing this code better; if you see an improvement I'd love to hear it. function make_smart_list(list) { var ADD_CLASS = 'foo-widget-Add'; var REMOVE_CLASS = 'foo-widget-Remove'; var jq_list = $(list); jq_list.parents('form').submit(function() { return false; }); function refresh_handlers() { jq_list.find(sprintf('.%s, .%s', REMOVE_CLASS, ADD_CLASS)).unbind('click'); // jq_list.find('input').unbind('submit'); // // jq_list.find('input').submit(function() { // var jq_this = $(this); // var next_button = jq_this.nextAll('button'); // if (next_button.hasClass(ADD_CLASS)) { // next_button.nextAll('button').click(); // return; // } // // if (next_button.hasClass(REMOVE_CLASS)) { // return false; // } // // }); jq_list.find("." + REMOVE_CLASS).click(function() { var jq_this = $(this); jq_this.parent().remove(); refresh_handlers(); return false; }); jq_list.find("." + ADD_CLASS).click(function() { var jq_this = $(this); if (jq_this.prevAll('input').val() == '') { return; } jq_this.parent().clone().appendTo(jq_this.parent().parent()); jq_this.parent().next().find('input').val('').focus(); jq_this.removeClass(ADD_CLASS).addClass(REMOVE_CLASS); jq_this.text('Remove'); refresh_handlers(); return false; }); } refresh_handlers(); } (sprintf is another script I have.)

    Read the article

  • submit form - jquery problem

    - by lannoo
    Hello all, I am trying to raise a click event on a submit button in a html form. I use the .click() jquery to catch the click event and return true at the end of the function. When I click on the submit button, the jquery functions are raised and a callback is executed, but the $_POST array is empty. How can I fix this?

    Read the article

  • visual c# 2010 communicating between two projects

    - by cake is a joke
    I am trying to create a windows form project, and use speech recognition for the Kinect with the Kinect to Windows SDK. I have the form application project (p1) and the Kinect speech project (p2) which is a command prompt. I made it a command prompt because it was the easiest way to do things. Anyway, I have read and found two things about this. 1)I found out how to run two projects at the same time in the same solution. 2) I also found out how to add references to get classes from each project to the other. So, how would I get variables from each project? Just by using project references, or something? P2 can recognize speech and save it to variables, if that counts for anything.

    Read the article

  • How do I create if statements in php to perform a specific action depending on what form has string in it

    - by user1637284
    Im trying to create a grid on my page in each cell there will be a simple one line form. If a person enters data into lets say FieldA I would like the php to perform actionA but if the data was entered in FieldF I would like actionF performed. Is this possible without having to create a php for each cell and upload all those php files? Or is there a way to perform the GET method in each form to append the data to the end of the action url without the field name showing (ie sample.com/somestuff/fieldA instead of sample.com/somestuff/fieldname=fieldA) thus not needing php at all?

    Read the article

  • jQuery: serializing array returns empty string

    - by John Smith
    I did not forget to add name attributes as is a common problem and yet my serialized form is returning an empty string. What am I doing wrong? HTML/javascript: <head> <script src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js"></script> <script> $( document ).ready( function() { $('#word_form').submit(function(e) { e.preventDefault(); console.log($(this).serialize()); //returns an empty string }); }); </script> </head> <body> <div id="wrapper"> <form name="word_form" id="word_form" method="POST"> <input type="image" name="thumbsUp" id="thumb1" value="1" src="http://upload.wikimedia.org/wikipedia/commons/8/87/Symbol_thumbs_up.svg" style="width:50px;height:50px;"> <input type="image" name="thumbsDown" id="thumb2" value="2" src="http://upload.wikimedia.org/wikipedia/commons/8/84/Symbol_thumbs_down.svg" style="width:50px;height:50px;"> </form> </div> </body> Thanks!

    Read the article

< Previous Page | 78 79 80 81 82 83 84 85 86 87 88 89  | Next Page >