hidden-field

Persisting Data Using Hidden Forms in JSP

拈花ヽ惹草 提交于 2019-12-11 14:57:58
问题 I have an input form (index.jsp): <form action="process-mobile-number.jsp" method="post"> <table> <tr> <td>Enter a mobile number:</td> <td> <input type="number" name="telco" maxlength="4" style="width: 20%" required title="Please enter your 4-digit prefix."/> - <input type="text" name="mobile" maxlength="7" style="width: 70%" required title="Please enter your 7-digit number."/> </td> </tr> <tr><td><input type="submit" value="Submit" style="width: 50%"/></td></tr> </table> </form> This is the

Uploading a file through selenium but file input element is hidden

喜夏-厌秋 提交于 2019-12-11 06:33:22
问题 I am trying to upload a file using Selenium but my input file element is hidden. My hidden HTML is: <input id="yui_3_9_0pr3_1_1361897421363_2239" type="file" style="visibility:hidden; width:0px; height: 0px;" multiple="" accept=""> and the select file button HTML is: <button id="yui_3_9_0pr3_1_1361897421363_2242" class="yui3-button" tabindex="0" aria-label="Select Files" role="button" type="button" style="width: 100%; height: 100%;">Select Files</button> I tried the same thing using

jQuery-Validation-Engine wrong position popup on field hidden (jquery tabs)

心已入冬 提交于 2019-12-11 06:06:36
问题 I use jQuery-Validation-Engine for validate a form, but I've a problem .... I've a form in a div divided into tabs and I set the validationEngine like this: $(".test").validationEngine({validateNonVisibleFields: true}); On submit works fine both on fields in the active tab in the non-active .... but popup error of the fields in non-active tab is not aligned to the corresponding field. The _calculatePosition function seems that ignore the real coordinates of the field-hidden to check... Any

ASP.NET MVC 2 HiddenField is empty?

天大地大妈咪最大 提交于 2019-12-11 03:32:52
问题 Hi, I have a ViewClass that contains a CI property (Guid), to keep track of this CI property I have added a hidden value for it like this : <%: Html.HiddenFor(model => model.CI)%> This does however render an empty hidden field, i have also tried : <%: Html.Hidden("CI", Model.CI)%> But with the same result. When just typing : <%: Model.CI %> The Guid is printed for example like this : 5f7a1f53-9f90-4b77-aad4-64e835662efc So why is this not working? Edit1 : This workes fine, but I do not see

Hidden field becomes null when binding it in stripes actionbean

女生的网名这么多〃 提交于 2019-12-11 03:21:06
问题 I have a stripes action page. and When the page loads, I want to save an originalAssignee by assigning it from an object (i.e setOriginalAssignee (userAction.getAssignee())) so that in case if the object's field assignee is changed i will do some computing. Here is my action bean: @UrlBinding("/action/view-details.page") public class ActionListViewPage extends CustomAction { . . . private static final String ACTION_LIST_VIEW = "/action/view-details.jsp"; private static final String ACTION

How do I get KendoUI Validator to ignore hidden form elements?

元气小坏坏 提交于 2019-12-11 02:57:28
问题 I am attempting to use KendoUI Validator with an ASP.NET WebForms project. I have a simple page, that has a number of inputs, and of course ASP.NET adds some hidden form elements as well. I have the following questions: Why does the KendoUI Validator not ignore hidden form fields, and how to I get it to? Why does KendoUI apply the rules to every input field, and how to do get it to ignore some fields. I want a declarative way to do this, not by adding all sorts of exceptions in my validation

How to use/pass hidden field value in ActionLink

血红的双手。 提交于 2019-12-11 00:52:05
问题 I have problem passing hidden field value in actionlink parameter: productView: @Html.ActionLink("ProductCompare", "ProductCompare", new { ProductIds= **hdnSelectedProductId**) @Html.Hidden("hdnSelectedProductId") Controller Action: public ActionResult ProductCompare(string ProductIds) { return View(); } When user select any product i keep putting product ids in hdnSelectedProductId using javascript. Now when user click on ProductCompare link i want to pass this hidden field value to

hidden field is null on !IsPostBack and not null on IsPostBack

天涯浪子 提交于 2019-12-11 00:51:38
问题 First I'll apologize for the unclear title of my question. I wasn't sure how to succinctly describe my problem in a title. I have a hidden field in my .aspx <input type="hidden" name="hid1" value="0" /> I want to set the value of this field during the page load event, and if it is not a postback. protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { // This doesn't work! Request.Form["hid1"] = "1"; } if (Page.IsPostBack) { // This DOES work! Request.Form["hid1"] = "1"

change field value when select radio buttons

旧城冷巷雨未停 提交于 2019-12-10 04:30:27
问题 I want to change the value of hidden input field when radio buttons selected : <input type="radio" name="r1" value="10" />10 <br/> <input type="radio" name="r1" value="45" />45 <br/> <input type="hidden" name="sum" value="" /> for example when user click on one the buttons the value of hidden field change to that value. 回答1: Use the onClick property: <input type="radio" name="r1" value="10" onClick="document.getElementById('hidfield').value=this.value"/>10 <br/> <input type="radio" name="r1"

Rails 3: Why an empty nested form generates a hidden input field?

喜夏-厌秋 提交于 2019-12-09 23:47:26
问题 Why this: # edit.html.erb <%= form_for @product do |f| %> <%= f.fields_for :shop do |sf| %> # Nothing here <% end %> <% end %> generates a hidden input field: <input type="hidden" value="23" name="product[shop_attributes][id]" id="product_shop_attributes_id"> ? Relevant controller code: def edit @product = Product.find(params[:id]) end 回答1: It'll be because the @product you're editing has a shop. Rails has inserted that in the fields_for so that when the form is submitted, it knows which shop