You must use enctype="multipart/form-data" <form name="item" method="post" enctype="multipart/form-data"> ...
javascript,jquery,wordpress,forms
It turns out I found the appropriate event: $(document).bind('gform_confirmation_loaded', function() { //Do stuff }); ...
change your form like this if you want to submit form in same page then no need to give form action give submit button a name and use isset in php code for button's submit <form action='' method='post'>" <table> <tr> <td>Matricola</td> <td> <input id='matricola' type='text'> </td> </tr> <tr> <td>PC</td> <td>...
c#,asp.net,asp.net-mvc,forms,razor
You have created an EditorTemplate for typeof PersonViewModel but your use of [UIHint("_TextFormControl")] applied to typeof string means your passing string to the template, not PersonViewModel. Its unclear exactly what your trying to achieve here but based on your current model, he template needs to be @model String @Html.TextBox("") //...
javascript,php,jquery,ajax,forms
It is not entirely clear what your question is, but a problem that could cause your agenda request to fail, is that you are not encoding your values for use in a url. So the first thing to do, is encode all values correctly: var agendaURL = "http://xxxx.xxx/libraries/upload.php?fType=agnd" + separator...
ruby-on-rails,ruby,forms,ruby-on-rails-4,controller
You can use something called action_name in Rails 4. action_name gives you the name of the action your view got fired from. Now you can send this property to the method create through a hidden field like following: <%= hidden_field_tag "action_name", action_name %> This line of code will send params[:action_name]...
your function resetForm(){ document.getElementById("form").reset(); } should be function resetForm(){ document.getElementById("form").reset(); msg.innerText=""; msg.className=""; } basically: you are not re-setting #message back to hidden which is where you start. And, I am also making sure that innerText is blank. ...
In addition to the other answers, you want to keep your form ID dynamic, right, so you can insert whatever values you want? $(function () { var form = document.getElementsByTagName("form"); // note you have to convert to jQuery object var form_id = $("#" + form[i].id); // i, so you can...
Well I had to add an ajax function to the input field that would then update a hidden field in my form. Then when the Calculate button is pressed, I have access to the updated quantity.
javascript,html,forms,window.open
You can't get 'results' in the manner you're attempting. You'll need to try getting it via the ID reference, something like the following: <form name="myForm" onSubmit="return myfunction();"> <input type="text" id="firstfield" name="firstfield"/> ... repreated 7 more times... <input type="submit" value="Preview"/> <input type="submit" onClick="window.open(document.getElementById('firstField').value + '/' + document.getElementById('results').value);" value="Open"/> </form> /* Hidden...
javascript,jquery,html,html5,forms
Keep both the forms hidden at first and give a ID to each <a> and also to the <form> Then $("#id-of-btn1").click(function(){ $("#form-1").toggle(); }); and $("#id-of-btn2").click(function(){ $("#form-2").toggle(); }); EDIT: This could be a solution to make it completely independent of ID/Classes. If you give a class to div containing all the...
I believe your problem is with this line e.preventDefault(); This is preventing the default behavior of the submit button, i.e., submitting! Therefore, remove it. Update After testing, I have found the problem. I believe your problem is with this line $(this).prop('disabled', true); For some reason, this is preventing the form...
You forgot delimiters at preg_match, and beginning of string (you try to match substring in whole string). preg_match('~^07045~', $phone) The second thing is that regex isn't necessary for this task, substr will be faster. if (substr($phone, 0, 5) == '07045') ...
javascript,angularjs,forms,binding
You should clone your object using angular.copy. $scope.formData = angular.copy($scope.model); <form ng-submit="process()"> Value is : {{ formData.property }} <input type="text" ng-model="formData.property"> <button type="submit">Submit</button> </form> Then on process you update the model. $scope.model = angular.copy($scope.formData); You will be using a temporary model instead of your "real" one....
javascript,jquery,forms,parsley.js
You need to change the code to specify the form the user is currently working with. I've altered the code block you're using to do that, comments included: $(document).ready(function () { $('.next').on('click', function () { // Find the form whose button was just clicked var currentForm = $(this).parents('form').first(); var current...
php,forms,codeigniter,validation
There is no need of putting old password has in hidden field. it's not even safe. you can create callback function for your own custom validation. Notice the comment i have did in following code. $config=array( array( 'field' => 'old_password', 'label' => 'oldpass', 'rules' => 'trim|required|callback_oldpassword_check' // Note: Notice added...
The click events won't be bound to the elements, because the elements doesn't exist when the code runs. The elements won't exist until the user causes the tooltip to display. You can use delegated events in jQuery to bind the event to an existing parent element and look for events...
They are not errors, they are notices.... Notice: Undefined index: number in C:\xampp\htdocs\k\show_results_4.php on line 161 You are trying to retrieve the value of $_GET['number'] without check if $_GET['number'] exists Notice: Undefined index: category in C:\xampp\htdocs\k\show_results_4.php on line 162 You are trying to retrieve the value of $_GET['category'] without check...
Don't know what field you want to filter, but you could do it like this: class A(forms.ModelForm): class Meta: model = ModelA def __init__(self, *args, **kwargs): super(A, self).__init__(*args, **kwargs) self.fields['your_field'].queryset = self.fields['your_field'].queryset \ .filter(some_filter_value=1) ...
You could use a doctrine entity listener: https://symfony.com/doc/current/bundles/DoctrineBundle/entity-listeners.html http://doctrine-orm.readthedocs.org/en/latest/reference/events.html#entity-listeners And have something like this in it: public function postUpdateHandler(Vote $vote, LifecycleEventArgs $event) { if (null === $vote->getValue()) { // Following two lines could be avoided with a onDelete: "SET NULL" in Picture orm mapping $picture = $vote->getPicture(); $picture->removeVote($vote); $this->em->remove($vote);...
javascript,jquery,html,html5,forms
You may find it easier to identify the issues you are having if you separate out each part of the process. If you store all of the elements you are going to be using at the beginning you will make your calculations easier to read plus avoid unnecessary DOM calls....
The variable which you are passing is defined in FTL file,which(FTL file) is referenced from share-config-custom.xml. Lets have deeper look. share-config-custom.xml Here Where we are declaring control parameter. <field-visibility> <show id="fieldName"/> </field-visibility> <appearance> <field id="fieldName" label="Name of Field"> <control template="/path/to/ftl/textarea.ftl" /> <control-param name="helpText">Description of field</control-param> </control> </field>...
Yes, that has a worrying smell. You could create a check-function that runs each time someone clicks/types (depending on what you want to include in your form) a field. That functions itself needs certain conditions that are going to be checked. This is a quick example I put together. Use...
Indentation in HTML does not matter, it is purely for readability. For readability, in your example, I would indent. I would indent because the form tag is contained within the div tag. <div class="signup-form"> <form method="post"> <input type="text" value="First Name"> <input type="text" value="Last Name"> </form> </div> ...
The array exposed by the Lines property is zero based. You will want to change your for loop declaration to this: for (i=0;i<richTextBox1.Lines.Length;i++) As your code looks now you will try to access elements in the array that are out of bounds (as well as missing the first line)....
html5,forms,twitter-bootstrap,bootstrap,html-form
It is not bootstrap that are causing this. maxlength does only apply to <input>'s of type text, email, search, password, tel or url. See MDN. Thats why maxlength not works with your <input type="number" maxlength="2"> Proof of concept : text : <input type="text" maxlength="2"> number : <input type="number" maxlength="2"> here...
javascript,jquery,ajax,wordpress,forms
Dont use one(it will fire ajax submit or button click only once) , use here var IsBusy to check user is not repeatedly pressing the form submit, Try below code, var isBusy = false; //first time, busy state is false $('#publish').on('click', function (e) { if(isBusy == true) return ; //if...
javascript,php,jquery,ajax,forms
Don't use the same ID for the top and bottom forms. An id must be unique in a document -- see MDN Docs. Instead have two separate id's and reference them both in the one jQuery call when you are binding to the submit event: $('#newsletter_top, #newsletter_bottom').on('submit', function(e) { //...
php,mysql,forms,variables,post
Success, I figured it out myself [= i had to add a row to the end of the table with the end value of $i <tr hidden> <td hidden> <input type="text" name="ivalue" style="width:120px;" Value="'; echo $i;echo '" style="width:70px" hidden></font> </td> </tr> Then this was in my <form action="senddata.php" file> i...
python,django,forms,django-forms
You need to assign the field to form.fields, not just form. However this is not really the way to do this. Instead, you should make all your forms inherit from a shared parent class, which defines the captcha field....
jquery,forms,select,text,options
If you specifically know that you want to change the second option element within the select, you can target it with :eq(): $('.myclass option:eq(1)').text('TWO'); Note that eq() works on a zero-based index, so 0 is the first element, 1 is the second and so on....
You simply forgot to add the + sign at the end of your letters RegExp. i. e. var reg_letters = /^[A-ZÆØÅa-zæøå]$/; should be var reg_letters = /^[A-ZÆØÅa-zæøå]+$/;
php,forms,validation,drop-down-menu,server-side
The span <span class="error">* <?php echo $rateErr;?></span> is inside the select...I bet if you inspected the element it does appear just not visible because it's not in an <option> tag. Try moving it outside....
It's possible, your syntax is incorrect though. You're double dipping on the php brackets. I usually prefer to do something like this instead of using print, it's easier to read, especially if your IDE is doing syntax highlighting: ?><td><input type='number' name='product1' id='product1' min='0' max='<?php echo $InStock ?>' value='0'></td><?php You could...
javascript,jquery,asp.net,forms
This can be addressed I believe with the accepted solution of the following post: ASP.Net page enter key causing post back Quoting: You could set the DefaultButton on the Form or a Panel. This way you have full control what happens. Set UseSubmitBehavior="False" on your Buttons. This disables the "AutoPostback"...
<?php require_once('Connections/db.php'); ?> <?php if (isset($_POST['submit'])) { Change your above code to <?php require_once('Connections/db.php'); if (isset($_POST['submit'])) { and also remove the last ?> if you do not have html after that. After that, it should work. To turn on Error Reporting, place ini_set('display_errors',1); error_reporting(E_ALL); at the beginning of your php...
html5,forms,spring-boot,thymeleaf
I believe there could be 2 parts to your question and I will try to answer both. First on the form itself how would you get to a child_id to display fields from another object on the form. Since your Person class does not have a Child relationship you would...
You can just add a hidden checkbox value to judge whether user select or not. = f.range_field :content, :value=> nil, :class=> "question-field percentage", :step => 10, :in => 0..101, :data => {:question => question.id = check_box_tag :range_clicked, true, false, style:'display:none;' and then add a js function to tell whether user...
You cant. Default functionality for forms will redirect to whatever the action attribute holds. In order to do what you need, you need to use AJAX easy example with Jquery: $("form").submit(function(){ var postdata = $(this).serialize(); var url = $(this).attr("action"); //something.php; $.post(url, postdata, function(res){ console.log(res); //your PHP results alert('thanks'); }); });...
php,forms,symfony2,entity,symfony-2.6
Set data_class option for your InYourMindFriendType Checkout http://symfony.com/doc/current/reference/forms/types/form.html#data-class...
You should use CSS instead of HTML attributes to decorate your HTML rendering. Also you should avoid to use inline styling which represents a better organization since it's separating languages (= separating your CSS from your HTML). So to answer your question, you can do that : <?php if (!isset($_GET["color"])...
This shoud work, if not then check your usename and password... <?php $servername = "localhost"; $username = ""; $password = ""; $dbname = "first_db"; $pathway = $_POST['username']; username - is the name of your input. // Create connection $conn = mysqli_connect($servername, $username, $password, $dbname); // Check connection if (!$conn) {...
Your button by default is included in the tab order which results in the focus effect. Try removing the button from the tab order. You can do by setting the TabStop of your button to False when your form loads. I tried the example below and it worked for me....
javascript,jquery,html,ajax,forms
If the user types fast, then you can end up with multiple animations in process at the same time and the .hide() which is not an animation will go in the wrong sequence, potentially ending up with the wrong display. The animations queue in order, the .hide() does not so...
You can't be sure of the real IP of the person using your email form because they could be behind a proxy or VPN, but this is a way to get the best candidate IP address at the time of the visit (ref): function getUserIP() { $client = @$_SERVER['HTTP_CLIENT_IP']; $forward...
Give your form a name, then: document.form_name.action = 'http://test.com/s/search.html?profile=_default&collection=general' + document.getElementById(' + item-select + ').value; Make sure you do this after the DOM is loaded, otherwise it won't work....
This would be a correct syntax: $(this).closest('form').find(":input").prop("disabled", false); The :input is a jQuery extension that basically selects all form controls. ...
javascript,php,jquery,ajax,forms
Do not use same ID in same document, because it is against the specification. IDs should be unique. Use classes instead.
php,forms,symfony2,runtime-error
You have not included the Symfony EnityRepository class at the top of your form file so PHP is looking for it in the same directory as your form class. Hence the error message. Add this to your form class (or qualify EntityRepository inline): use Doctrine\ORM\EntityRepository; ...
Absolutely. Remember that anyone can send raw HTTP requests and fill in the fields with any data they like. Never trust user input; always check it server-side....
javascript,html,angularjs,forms,validation
<input type=number min=0 max=99999> Brought to you by: For the specification see: WHATWG HTML, section 4.10.5.1.13 For supported browsers see: Can I use: Number input type The Current State of HTML5 Forms: The min, max, and step Attributes For older browsers use: number-polyfill (A polyfill for implementing the HTML5 <input...
javascript,forms,select,checkbox,tabular
You can try something like //use this to store the mapping of values, assuming loadid is unique for each record else a unique property of the record has to be used var watchlogic = {}; var watchLog = new XMLHttpRequest(); watchLog.onreadystatechange = function () { if (watchLog.readyState === 4) {...
Quick'n dirty solution : <?php $checked=isset($_POST["radio"]) && $_POST["radio"]==="oneway"?"checked":""; ?> <input type="radio" name="radio" id="oneway" value="oneway" <?php echo $checked;?> /> but actually you should separate logic from template using a template engine like smarty or twig or mustache or whatever......
It looks like - but I may be wrong so please clarify any incorrect assumptions - but it looks like there are potentially several issues here: Get and post are different. Use $_REQUEST['var'] to select GET or POST (I think POST overwrites GET values in this situation, if both are...
ID has to be unique. That's why it is called ID. Calling methods for specific $('#id') will only apply to the first occurring element matching the id, whilst using classes, $('.class'), will apply to all elements matching the class. If you want to share characteristics, events or other stuff with...
python,html,forms,beautifulsoup,html-parsing
As noted in comments, chain find and find_all() for the context-specific search: form = soup.find('form') inputs = form.find_all('input') If you want direct input elements only, add recursive=False: form.find_all('input', recursive=False) Or, using CSS selectors: soup.select("form input") And, getting direct input child elements only: soup.select("form > input") ...
In Rails the ID column is used by convention when displaying resources. So lets say you have the following route defination: resources :msgs, only: [:show, :index, :new, :create] This would create the following routes: POST /msgs | msgs#create GET /msgs/new | msgs#new GET /msgs/:id | msgs#show GET /msgs | msgs#index...
You need to add novalidate to your form. The reason being, your browser is validating your form rather than letting your code do it. alternatively, do something like: <form ng-submit="submit()" name="form" novalidate> <ion-radio ng-repeat="item in items" ng-model="data.type" name="type" ng-value="item.value" ng-class="{'error' : form.type.$invalid && form.$submitted }" </form> form.$submitted will become true...
php,forms,symfony2,events,entities
Create a form type CardAttributeValueType for CardAttributeValue entity, inside this form add fields depending on passed attribute type: class CardAttributeValueType extends AbstractType public function buildForm(FormBuilderInterface $builder, array $options) { $builder->addEventListener(FormEvents::PRE_SET_DATA, function(FormEvent $event) { $value = $event->getData(); $form = $event->getForm(); if (!$value) { return; } switch ($value->getCardAttribute()->getType()) { case 'text': $form->add('valueVarchar',...
Each time you click on #button get the last input and set the new name attribute. Then append the new input element in to the form: $('#button').on('click', function() { var form = $('#form'); var num = parseInt(form.find('input:last-of-type').attr('name')) + 1; form.append('<input type="file" name="' + num + '" />'); }); <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>...
yes. try this: forge($name = 'default', $config = array()); $article_form = Fieldset::forge('article',array( // regular form definitions 'prep_value' => true, 'auto_id' => true, 'auto_id_prefix' => 'form_', 'form_method' => 'post', 'form_template' => "\n\t\t{open}\n\t\t<table>\n{fields}\n\t\t</table>\n\t\t{close}\n", 'fieldset_template' => "\n\t\t<tr><td colspan=\"2\">{open}<table>\n{fields}</table></td></tr>\n\t\t{close}\n", 'field_template' =>...
php,forms,laravel,model,laravel-5
In short you need to pass your view a instance of Vehicle with Client - I know you're trying to do that with the join but I'm guessing that isn't the right way to do it. I set up a clean install with Laravel and it appears to work when...
django,forms,error-handling,emailfield
The popup that you see for the email it is not django validation. It is the build in in-browser html5 email field checking (and some older browsers will not do it for you). And you can't get any kind of validation in html5, but for checking field presents you can...
try this:- $(document).ready(function() { $('form').on('submit', function(e) { e.preventDefault(); $('#result').append('submit<br>'); return false; }); }); $('#no_return').on('keypress', function(e) { if(e.keyCode == 13) { e.preventDefault(); return false; } }); Demo...
Muy bien, maradoiano, tuve que realizar algunas acrobacias para correr tu código, la cosa está así: Para obtener la suma de todas las inversiones sencillamente se necesita una variable que acumule los resultados de todos los (costo * stock), llamémosla $total. Para desplegar este total ARRIBA de la tabla es...
for field in self.fields Or do I miss something ? ...
Your code works fine for me. you can check with this $(document).ready(function() { $("#offer1").click(function(event) { event.preventDefault(); $("#offer1Form").submit(); //document.getElementById("offer1Form").submit(); alert('something'); }); }); ...
ruby-on-rails,ruby,forms,ruby-on-rails-3,devise
Ahh going over the Rails Cast it looks like I need to build the :job_description. This fixed it 1.times { @resource.jobs.build } in my Jobs controller. Jobs Controller def new @resource ||= User.new 1.times { @resource.jobs.build } end ...
Use Bootstrap. This is the best option as it has inbuilt styles. Boostrap Link For forms...
I’m not sure if you ask for server-side validation or assistance for client-side uppercase input. In case of the latter: you could add a CSS class or a data-* attribute (something like ->add('PID', 'text', ['label'=>'License Number', 'required' => FALSE, 'attr' => ['data-behavior' => 'uppercase']])) to the PID element. Then, you...
You are looking for file_put_contents(). Simply collect the data and write it to your file. Here is the refined code: PS: You could consider starting with the php code first :-) <?php // define variables and set to empty values $nameErr = ''; $emailErr = ''; $commentErr = ''; $likesErr...
javascript,html,angularjs,forms
With what you want is retain the form data on a page even when you have navigated away and then came back. There are 2 approaches to achieve this. Local Storage - Store information in local storage, on the form page, update scope based on the information stored in local...
php,forms,post,radio-button,radio
Radio buttons (and Checkboxes) are only passed back to the form in either the $_POST or $_GET arrays if they are actually checked. I notice you do not auto check one of them as you create the HTML so nothing is likely to be returned if the user makes no...
javascript,jquery,html,forms,popupwindow
I solve the issue see the example what I have done This is the post.php <html> <head> <script src="http://code.jquery.com/jquery-1.9.1.js"></script> <script src="http://code.jquery.com/ui/1.11.4/jquery-ui.js"></script> <script type="text/javascript"> $(document).ready(function(){ $('#form').on('submit',function(e){ e.preventDefault(); $.post('result.php', $(this).serialize(), function(response){ $('#result').html(response); }); }); }); </script> <style type="text/css">...
jquery,forms,unobtrusive-validation
You can add class="cancel" to the buttons you do not want to be disabled, here is how JQuery.Validate selects the buttons: this.find("input, button").filter(".cancel").click(function() { validator.cancelSubmit = true; }); ...
javascript,angularjs,forms,validation
You form markup should look like, so that when you click on submit ng-class will add submitted class on form that will give you idea that whenever you have submitted class on form and field has ng-invalid class, you can highlight those element Markup <ng-form name="form" ng-class="{submitted: submitted}" ng-submit="submitted=true; submit();">...
For that, you need to use select_tag: select_tag "product['qty']", ... ...
The first time you load the form, $_POST will not have anything populated. Try changing if ($_POST["submit"]) { to if (isset($_POST["submit"])) { to determine if the form was in fact submitted and continue accordingly....
That's because your !empty($_POST) clause triggers because the $_POST variable isn't empty, as you just send some login credentials (they may be wrong but that doesn't matter). The else clause just triggers when nothing is sent, so basically whenever you submit anything with the form, if the login credentials are...
javascript,jquery,forms,google-analytics
Google Analytic is expecting a numeric datatype, and you're giving it a string. You can convert that string to a number by doing any of the following (depending on your preference): +document.getElementById('liste_nybil').value parseInt(document.getElementById('liste_nybil').value, 10); Number(document.getElementById('liste_nybil').value); So your updated code might look like this: $('#liste_nybil').on('click', function () { ga('send', 'event', 'Fornøyd',...
Your array variable is object. You have to split the value of <input type="text" id="array"> not the object element. var array = document.getElementById("array"); array = array.value.split(" ").map(function (item) { return parseInt(item, 10); }); Or simpler: var array = document.getElementById("array").value.split(" ").map(function (item) { return parseInt(item, 10); }); ...
You can set that in your form type to disable the field validation. ->add('test', null, array( 'required' => false )) If you want to disable it for the whole field you can try something like this: {{ form_start(form, { attr: {novalidate: 'novalidate'} }) }} ...
html,forms,twitter-bootstrap-3
You have to include the rows in a div. <div class="rows">. <div class="col-md-10"> <div class="form-group"> <legend>1st sth</legend> <div class="row"> <div class="col-md-2"> <select class="form-control" id="select"> <option value="1">1</option> <option value="1">1</option> <option value="1">1</option> </select> </div> <div class="col-md-3"> <input type="text" class="form-control" id="inputName" placeholder="name"> </div>...
php,forms,exception,laravel,request
It looks to me your problem is the url in our routes. You are repeating them. Firstly I would recommend using named routes as it will give you a bit more definition between routes. I'd change your routes to Route::put('jurors/submit',[ 'as' => 'jurors.submit', 'uses' => '[email protected]' ]); Route::get('jurors',[ 'as' =>...
Try <input type="text" name="TownID" id="TownID_display_hidden" value="<?php $value = $entity; echo $entity; ?>" /> and its better to use like this if ($_POST['action'] == 'getentity') { $value= $_POST['TownID']; $content .= '<div>'.$value.' hello</div>'; } it should work....
1. About Controllers If you do not like to use controllers this would work for you (but I do not recommend you to follow this way): export default Ember.Route.extend({ actions: { add: function() { alert(this.controllerFor( this.get('routeName') ).get('name')); } } }); In fact, if you use name in template: {{input value=name}}...
javascript,jquery,html,forms,twitter-bootstrap
You can access the element that triggered the popover as this within the function bound to content. So you could update your code to be: $('.pop').popover({ html : true, content: function() { $('#hidden-input').val(this.id); return $("#popover-content").html(); } }); Of course using whatever the correct selector is for your hidden input field....
c#,forms,winforms,user-interface,user-controls
You're never calling your FrmLogin.Frm method. If you intend this to be a constructor, drop the void and rename it to FrmLogin, like so: public FrmLogin() { this.Size = new Size(400, 600); Button btn = new Button(); btn.Text = "Something"; btn.Size = new Size(10, 10); btn.Location = new Point(10, 10);...
In the editusers.php script, look up the user in $_GET['id'] and use that information, not $user. <?php $con = mysqli_connect("localhost","root","","bfb"); $stmt = $con->prepare("SELECT firstname, lastname, email, username FROM users WHERE id = ?"); $stmt->bind_param("i", $_GET['id']); $stmt->execute(); $stmt->bind_result($firstname, $lastname, $email, $username); $stmt->store_result(); if ($stmt->fetch()) { ?> <form action="" method="post"> <div class="field">...
python,mysql,django,forms,e-commerce
In views.py (if your AUTH_USER_MODEL configured to Account) @login_required(login_url='/accounts/login/', template_name='market/postad.html') def newProduct(request): product_form = ProductForm(request.POST or None, request.FILES or None) if(request.method =='POST'): if product_form.is_valid(): product = product_form.save(commit=False) product.userid = Account.objects.get_or_create(user=request.user) product.save() else: print product_form.errors return render(request, template_name, {'product_form':product_form} ) ...
Updated Fiddle... $('#region').css('display','none'); $('#state').on('change', function() { var state= $('#state').val(); if(state=="A"||state=="B"){ $('#region').css('display','block'); }else{ $('#region').css('display','none'); } }); Try this.....
jsp form button instead of input: <button type="submit" id="submitRegInput" name="reg"> <img src="images/okBtn.png"/> </button> and css: #submitRegInput { background: no-repeat url(../images/okBtn.png) 0 0; border: none; } ...
ruby-on-rails,forms,scaffolding
If you have already migrate, undo it: rake db:rollback rails destroy scaffold Dreams Dream:string And redo it rails generate scaffold Dreams Dream:text rake db:migrate You don't need to make rake db:rollback and rake db:migrate if you have just generated your scaffold. If it is not your last migration, you can...
I figured it out. I think. Not sure if this is the proper way to do it, but it works for me. jinja code {% for item in items %} <tr> <form id="adauga_{{ item.stoc_id }}" action="{{ url_for('adauga', denumire_med=item.denumire_med, producator=item.producator) }}" method="POST"> <td>{{ item.stoc_id }}</td> <td>{{ item.denumire_med }}</td> <td>{{ item.producator }}</td>...
Issues: if you usedocument.getElementById you must use id on your elements Add the data to your ajax request HTML: <!DOCTYPE html> <html> <head> <script src="http://code.jquery.com/jquery-latest.js"></script> <script> $(document).ready(function(){ $( "#submitBtn" ).click(function( event ) { alert('pressed'); //values var name=document.getElementById('name').value; var email=document.getElementById('email').value; var phone=document.getElementById('phone').value; var...