Search Results

Search found 23207 results on 929 pages for 'node form'.

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

  • Help with jQuery Validation plugin and a form that uses 'panels'

    - by alex
    I have a form that works in 'sections' that I will refer to as 'panels'. By default, the form is listed out on the page, one panel after the other. However, with JavaScript, it puts the panels into one panel viewer, and displays them one after the other (with prev/next buttons). Example Form Workflow Panel 1: User Details - Panel 2: User Location - Panel 3: User Info - Panel 4: Confirm Details I am using the jQuery Validation plugin. My problem is, I have set up all the rules for all the inputs in the first 3 panels, and I'd like to be able to only validate a subset of them per panel. Example, when pushing 'next panel' after completing name & email (in the 1st, user details panel), I'd like to do a validation only on that panel first, and then get a boolean response (if the 1st panel validated), and if true, then proceed to the next panel. I've played around with a bit of the config, but unfortunately could not get it to work as I wanted. This is my first project with this plugin so I'm quite new to it! Is there a way to add rules dynamically to the plugin? i.e. not on $('form').validate(options) ? What I'd like to do, is call the validate() on the form, with all the error messages, and then on the 'next panel' code, do a switch case to determine which rules to add, and then call a validate() myself.

    Read the article

  • How to create javascript object from form elements using jQuery

    - by ob
    I'd like to be able to create a javascript object from my html form and am wondering if there's a good way to do this using jquery. I guess what i'm looking for is something similar to $.serialize, but which would result in a map instead of a string. <form> <input type="text" name="foo1" value="bar1" /> <input type="text" name="foo2" value="bar2" /> </form> desired result: { foo1:"bar1", foo2:"bar2" }

    Read the article

  • How do I layout a form in WPF using grid or other controls for maintainability

    - by Jason Coyne
    I have a WPF form, I want to lay out a standard form onto it. Each form element will have a label, and then a control. Pretty standard stuff. If I use a wrap panel, it can cause the label and the control to be separated, but I want them to stay together. is there some WPF equivalent of nobr? Grid works, and allows for column spanning etc, however I really really hate that you specify the column and row on each control. This makes it extremely inconvenient to reorder or insert things into the list. Is there a way to get the grid to use more HTML style column/rows where the items are a child of the row they are in, so that I can re-order easily? Is there some other control that will let me layout a form easily?

    Read the article

  • jQuery: Check whether val() has a specific value or not upon form submit

    - by Staffan Estberg
    Hi, I'm trying to check whether val() has a specific value or not inside a form, if so deleting the contents / preventing the form being submitted depending on if both fields are filled in (stringOne and stringTwo). There's a default text for each input field, the first being "Namn, telefonnr, sökord" and the second "Område, plats, ort". If a user only fills in the first field the second must be cleared before the form string is passed on and vice versa. Like so - // "This" refers to the form's submit button if (($(this).siblings('input.stringOne').val("Namn, telefonnr, sökord")) && ($(this).siblings('input.stringTwo').val("Område, plats, ort"))) { return false; // If nothing's filled in, then do not submit } else { // If either field is not filled in, clear it if ($(this).siblings('input.stringOne').val("Namn, telefonnr, sökord")) { $(this).siblings('input.stringOne').val() == ''; } if ($(this).siblings('input.stringTwo').val("Område, plats, ort")) { $(this).siblings('input.stringTwo').val() == ''; } } jQuery version 1.2.6.

    Read the article

  • Web Form Security

    - by brandon14_99
    I set a cookie in the headers with an md5 hashed keyword. Then in my code, it checks for the exact matching cookie before displaying a form. Is this pretty much pointless? The form submits to an external site, so I am trying to secure the form without using captcha..

    Read the article

  • Auto submit form on clicking specific dropdown - jquery

    - by blasteralfred
    Hi, I have a form like below <form name="testform" id="testform" action="test.php" method="get"> <input name="field1" id="field1" type="text" value=""> <input name="field2" id="field2" type="text" value=""> <select name="dropdown" id="dropdown"> <option value="option1" selected="selected">option1</option> <option value="option2">option2</option> <option value="option3">option3</option> </select> <input type="submit" name="Submit" value="Submit" id="Submit"> </form> I want to submit the form automatically when someone click (or select) an option from the dropdown. How can I make this possible using jquery or something else or simple js. Thanks in advance... :) blasteralfred

    Read the article

  • need to run php script when form is submitted

    - by Brad
    I have a form that needs to run a php script once the submit button is clicked, it needs to be ajax. <form method="post" action="index.php" id="entryform" name="entryform"> <input type="submit" name="submit" value="Submit" onclick="JavaScript:xmlhttpPost('/web/ee_web/include/email-notification.php', 'entryform')" /> </form> In this situation, using if(form posted) { get results and run script } is not an option, I need to run the script externally, that is why I need it to execute the email-notification.php at onclick When I point my web browser to domain.com/include/email-notification.php - it runs perfectly. Any help is appreciated.

    Read the article

  • Form Submits to white page?

    - by Seth
    So I have a form for my register system. When the form submits and there's errors, (like 'Enter a username first!' or 'You must provide a password!') it successfully refreshes the page and shows those errors. HOWEVER, when the form submits and the user has filled out all of the data, and there is NO errors, the form goes to a white page. I looked in the source, and all that shows is the javascript at the top of my page, but it looks like no PHP/HTML is being executed. What is happening?!

    Read the article

  • Resize form objects in Java

    - by PeerFull
    I have a Java applet, which is a form that draw shapes into it (Rect, Oval, Line). Each shape is represented by 2 points and can draw itself to the form. When the JApplet form resizes, I need to resize the shapes also while keeping the aspect ratio. I didn't find an high quality solution for doing this that solves this problem. Tried to write a solution from this, but it came up as lousy when tested, Can someone publish an example code for doing that please?

    Read the article

  • hook up resource manager in windows form

    - by peterchen0303
    In Visual Studio 2008, develop legacy windows form (not wpf), I wrote customized resource manager which fetched data from sql server rather than assembly. In windows form, there is property related to language setting. Once I change language, I want to form being updated automatically. Is there any elegant way to hook up my resource manager?

    Read the article

  • XML configuration of Zend_Form: child nodes and attributes not always equal?

    - by Cez
    A set of forms (using Zend_Form) that I have been working on were causing me some headaches trying to figure out what was wrong with my XML configuration, as I kept getting unexpected HTML output for a particular INPUT element. It was supposed to be getting a default value, but nothing appeared. It appears that the following 2 pieces of XML are not equal when used to instantiate Zend_Form: Snippet #1: <form> <elements> <test type="hidden"> <options ignore="true" value="foo"/> </test> </elements> </form> Snippet #2: <form> <elements> <test type="hidden"> <options ignore="true"> <value>foo</value> </options> </test> </elements> </form> The type of the element doesn't appear to make a difference, so it doesn't appear to be related to hidden fields. Is this expected or not?

    Read the article

  • Differing form size between XP and 7

    - by Andy
    I am developing a C# WinForms app on my XP dev machine with Visual C# Express 2008. I set the form to have a size of my liking with Width and Height on the designer and all looks good. I also set these dimensions to the MaximumSize property. Deploying the app to another XP machine, and the app looks like it does on my dev. However, in testing the app on a Win7 machine, the form has both horizontal and vertical scrollbars applied. I assume that this is due to the changed non-client size of the form, as determined by Win7. I can resize the window, but I would like it to be displayed correctly to begin with. So, my question is: What is the best way to correctly maintain a form size client area across OS'es? Thanks all.

    Read the article

  • php $_POST array empty upon form submission...

    - by Mike D
    Hi folks, I'm baffled on this after much googling. This issue is simple, I have a custom CMS i've built that works perfectly on my dev box (Ubuntu/PHP5+/MySQL5+). I just moved it up to the production box for my client and now all form submissions are showing up as empty $_POST arrays. I found a trick to verify the data is actually being passed using "file_get_contents('php://input');" and the data is showing up fine there -- the $_POST/$_REQUEST arrays are always empty. I've also verified the content-type headers are correct as well via firebug (application/x-www-form-urlencoded; charset=utf-8). This issue is happening regardless of whether a form is submitting via AJAX or a regular form submit. Any help is greatly appreciated!

    Read the article

  • how do I hide certain part of form

    - by yogsma
    I have a form and it contains dropdown box and different div items. Based on selection from dropdown box, I show those div items. But some of the text in those div items are shown when the form is loaded and not when I select the option from dropdown box. The code is somewhat like this <form> <select id=""> <option value="one"> One </option> <option value="two"> Two </option> <option value="three"> Three </option> </select> <div id="onee"> header text ..<table> </table></div> <div id="twoo"> header text ..<table> </table></div> </form> So when I load the page form with select drop down box is shown , but it also shows header text which is within div. How do I hide that text?

    Read the article

  • Why is cakephp form input stored in $this->data and POST data stored in $this->params['form'] ?

    - by spudnik1979
    the cakephp rest tutorial says that post data should be in $this-data, but I am finding that it is not, but instead inside $this-params['form'] However, when using cakephp form helper in a view, the data is in $this-data. Am I correct to have to check both locations in my controller? It just seems a bit of a waste of extra code. Shouldnt the data appear in one place for whether it came from a rest rest requestor or Cakephp form post? ps im using cakephp 1.3

    Read the article

  • jQuery - get form elements by container id

    - by ungarida
    Which is the easiest way to get all form elements which are contained by a wrapper element. <form name="myForm"> <input name="elementA" /> <div id="wrapper"> <input name="elementB" /> <textarea name="elementC" /> </div> </form> In the above HTML I would elementB and elementC but not elementA. I do not want to list all form element types (select,textarea,input,option...). I would prefer to use myForm.elements. Any ideas?

    Read the article

  • Focusing on a form element in an iFrame

    - by Irwin
    how do I load a page in an iframe and set focus to a form element once the page loads? I don't have control over the page I am calling into the iframe, but I know the name of the form is 'form' and the text field I want to focus on is 'go'.

    Read the article

  • Create form select from object containing values

    - by marks34
    I have such an object : var options = {1: 'Running', 2: 'Falling', 3: 'Collapsing wall', 4: (...)}; I'd like to create form's select element with ooptions taken from this object, so something like that (code I tried which is not working, but you can get the idea) : html = '<form action="" ><select name="block-action"><option>-------</option>'; for(k in obj){ html += '<option value="'+k+'">'+obj[k]+'</option>' } html += '</select></form>'

    Read the article

  • Change URL Submitted to Depending on Form Selection

    - by Chris
    I have a form which I need to submit to one of three different URLs depending on a selection made in the form. I suspect the easiest solution is to use jQuery to insert the appropriate path before the rest of the form parameters as the selection is made, but not sure on what the code would be. Any pointers greratly appreciated! <form id="myForm" action='/booking/default-path' accept-charset='utf-8' method='get'> <select name="paramA" id="paramA"> <option id="optionA" value="A" selected="selected">Option A</option> <option id="optionB" value="B">Option B</option> </select> <select name="currency" id="currency"> <option id="GBP" value="GBP" selected="selected">British Pounds</option> <option id="EUR" value="EUR">Euros</option> <option id="USD" value="USD">US Dollars</option> </select> <input type="submit" value="submit" id="submit" name="submit" /> </form> Where the three different URLs would be: ../booking/default-path-gbp?...[params here]... ../booking/default-path-eur?...[params here]... ../booking/default-path-usd?...[params here]... I know it would be a lot easier to incorporate the parameter in the usual way and just use one submission URL root, but unfortunately I'm submitting to an eComms system out of my control and am stuck with having to find a solution to this. Should be easy I think, but not sure where to start, jQuery used elsewhere, so would prefer to use this framework in any solutions.

    Read the article

  • jQuery slider onChange auto submit form

    - by bikey77
    I'm using a jQuery slider as a price range selector in a form. I'd like to have the form submit automatically when one of the values has been changed. I used a couple of examples I found on SO but they didn't work with my code. <form action="itemlist.php" method="post" enctype="application/x-www-form-urlencoded" name="priceform" id="priceform" target="_self"> <div id="slider-holder"> Prices: From <span id="pricefromlabel">100 &#8364;</span> To <span id="pricetolabel">500 &#8364;</span> <input type="hidden" id="pricefrom" name="pricefrom" value="100" /> <input type="hidden" id="priceto" name="priceto" value="500" /> <div id="slider-range"></div> <input name="Search" type="submit" value="Search" /> </div> </form> This is the code that displays the values of the slider and updates 2 hidden form fields I use to store the prices in order to submit: <script> $(function() { $("#slider-range" ).slider({ range: true, min: 0, max: 1000, values: [ <?=$minprice?>, <?=$maxprice?> ], start: function (event, ui) { event.stopPropagation(); }, slide: function( event, ui ) { $( "#pricefrom" ).val(ui.values[0]); $( "#priceto" ).val(ui.values[1]); $( "#pricefromlabel" ).html(ui.values[0] + ' &euro;'); $( "#pricetolabel" ).html(ui.values[1] + ' &euro;'); } }); return false; }); </script> I've tried adding this code as well as an data-autosubmit="true" attribute to the div but no result. $(function() { $('[data-autosubmit="true"]').change(function() { parentForm = $(this).('#priceform'); clearTimeout(submitTimeout); submitTimeout = setTimeout(function() { parentForm.submit() }, 100); }); I've also tried adding a $.post() event to the slider but I'm not very good with jQuery so I'm probably doing it wrong. Any help will be appreciated.

    Read the article

  • Submitting form in php file accessed by Ajax?

    - by dronnoc
    Hi people, I am trying to figure out how to submit a form in a page being accessed by Ajax? here are some code snippets to help demonstrate what i am trying to say. HTML BODY - THIS IS WHAT THE USER WILL SEE. <html> <head> <script language="javascript" src="linktoajaxfile.js"> </head> <body onLoad="gotoPage(0)"> <div id="fillThis"> </div> </body> </html> AJAX FILE var xmlhttp function gotoPage(phase) { xmlhttp=GetXmlHttpObject(); if (xmlhttp==null) { alert ("Your browser does not support AJAX!"); return; } var url="pageofstuffce.php"; url=url+"?stg="+phase; url=url+"&sid="+Math.random(); xmlhttp.onreadystatechange=stateChanged; xmlhttp.open("GET",url,true); xmlhttp.send(null); } function stateChanged() { if (xmlhttp.readyState==4) { document.getElementById("fillThis").innerHTML=xmlhttp.responseText; } } function GetXmlHttpObject() { if (window.XMLHttpRequest) { // code for IE7+, Firefox, Chrome, Opera, Safari return new XMLHttpRequest(); } if (window.ActiveXObject) { // code for IE6, IE5 return new ActiveXObject("Microsoft.XMLHTTP"); } return null; } PAGE OF DATA <?php $stage = $_GET['stg']; if($stage == 0) { echo '<a onClick="gotoPage(1)">click me</a>'; } elseif($stage == 1) { <form> <input type="text" name="name"> <input type="submit" name="submit"> </form> } elseif(somehow can reach here) { show data from form. } ?> Can anyone perhaps help me get past the form and display the data in the same page? Also, i have looked around, and i don't think anything around has what i need... correct me if i'm wrong though :) Thanks in advance, and i hope i didn't put in too much detail :) Dronnoc EDIT Forgot to mention what I've tried; I have tried submitting the form to itself (same file) and that destroyed the ajax link, and opened the page. i have also tried just having the button move the page onto another step, but the $_POST variable is empty... i am at a loss, so does anyone else have any ideas?

    Read the article

  • list arrays in Drupal form

    - by bert
    Is there a better way to find all form elements in a Drupal form than doing a print_r($form)? This dumps excessive amount of information and it is no obvious what to look for.

    Read the article

  • Building and Deploying Windows Azure Web Sites using Git and GitHub for Windows

    - by shiju
    Microsoft Windows Azure team has released a new version of Windows Azure which is providing many excellent features. The new Windows Azure provides Web Sites which allows you to deploy up to 10 web sites  for free in a multitenant shared environment and you can easily upgrade this web site to a private, dedicated virtual server when the traffic is grows. The Meet Windows Azure Fact Sheet provides the following information about a Windows Azure Web Site: Windows Azure Web Sites enable developers to easily build and deploy websites with support for multiple frameworks and popular open source applications, including ASP.NET, PHP and Node.js. With just a few clicks, developers can take advantage of Windows Azure’s global scale without having to worry about operations, servers or infrastructure. It is easy to deploy existing sites, if they run on Internet Information Services (IIS) 7, or to build new sites, with a free offer of 10 websites upon signup, with the ability to scale up as needed with reserved instances. Windows Azure Web Sites includes support for the following: Multiple frameworks including ASP.NET, PHP and Node.js Popular open source software apps including WordPress, Joomla!, Drupal, Umbraco and DotNetNuke Windows Azure SQL Database and MySQL databases Multiple types of developer tools and protocols including Visual Studio, Git, FTP, Visual Studio Team Foundation Services and Microsoft WebMatrix Signup to Windows and Enable Azure Web Sites You can signup for a 90 days free trial account in Windows Azure from here. After creating an account in Windows Azure, go to https://account.windowsazure.com/ , and select to preview features to view the available previews. In the Web Sites section of the preview features, click “try it now” which will enables the web sites feature Create Web Site in Windows Azure To create a web sites, login to the Windows Azure portal, and select Web Sites from and click New icon from the left corner  Click WEB SITE, QUICK CREATE and put values for URL and REGION dropdown. You can see the all web sites from the dashboard of the Windows Azure portal Set up Git Publishing Select your web site from the dashboard, and select Set up Git publishing To enable Git publishing , you must give user name and password which will initialize a Git repository Clone Git Repository We can use GitHub for Windows to publish apps to non-GitHub repositories which is well explained by Phil Haack on his blog post. Here we are going to deploy the web site using GitHub for Windows. Let’s clone a Git repository using the Git Url which will be getting from the Windows Azure portal. Let’s copy the Git url and execute the “git clone” with the git url. You can use the Git Shell provided by GitHub for Windows. To get it, right on the GitHub for Windows, and select open shell here as shown in the below picture. When executing the Git Clone command, it will ask for a password where you have to give password which specified in the Windows Azure portal. After cloning the GIT repository, you can drag and drop the local Git repository folder to GitHub for Windows GUI. This will automatically add the Windows Azure Web Site repository onto GitHub for Windows where you can commit your changes and publish your web sites to Windows Azure. Publish the Web Site using GitHub for Windows We can add multiple framework level files including ASP.NET, PHP and Node.js, to the local repository folder can easily publish to Windows Azure from GitHub for Windows GUI. For this demo, let me just add a simple Node.js file named Server.js which handles few request handlers. 1: var http = require('http'); 2: var port=process.env.PORT; 3: var querystring = require('querystring'); 4: var utils = require('util'); 5: var url = require("url"); 6:   7: var server = http.createServer(function(req, res) { 8: switch (req.url) { //checking the request url 9: case '/': 10: homePageHandler (req, res); //handler for home page 11: break; 12: case '/register': 13: registerFormHandler (req, res);//hamdler for register 14: break; 15: default: 16: nofoundHandler (req, res);// handler for 404 not found 17: break; 18: } 19: }); 20: server.listen(port); 21: //function to display the html form 22: function homePageHandler (req, res) { 23: console.log('Request handler home was called.'); 24: res.writeHead(200, {'Content-Type': 'text/html'}); 25: var body = '<html>'+ 26: '<head>'+ 27: '<meta http-equiv="Content-Type" content="text/html; '+ 28: 'charset=UTF-8" />'+ 29: '</head>'+ 30: '<body>'+ 31: '<form action="/register" method="post">'+ 32: 'Name:<input type=text value="" name="name" size=15></br>'+ 33: 'Email:<input type=text value="" name="email" size=15></br>'+ 34: '<input type="submit" value="Submit" />'+ 35: '</form>'+ 36: '</body>'+ 37: '</html>'; 38: //response content 39: res.end(body); 40: } 41: //handler for Post request 42: function registerFormHandler (req, res) { 43: console.log('Request handler register was called.'); 44: var pathname = url.parse(req.url).pathname; 45: console.log("Request for " + pathname + " received."); 46: var postData = ""; 47: req.on('data', function(chunk) { 48: // append the current chunk of data to the postData variable 49: postData += chunk.toString(); 50: }); 51: req.on('end', function() { 52: // doing something with the posted data 53: res.writeHead(200, "OK", {'Content-Type': 'text/html'}); 54: // parse the posted data 55: var decodedBody = querystring.parse(postData); 56: // output the decoded data to the HTTP response 57: res.write('<html><head><title>Post data</title></head><body><pre>'); 58: res.write(utils.inspect(decodedBody)); 59: res.write('</pre></body></html>'); 60: res.end(); 61: }); 62: } 63: //Error handler for 404 no found 64: function nofoundHandler(req, res) { 65: console.log('Request handler nofound was called.'); 66: res.writeHead(404, {'Content-Type': 'text/plain'}); 67: res.end('404 Error - Request handler not found'); 68: } .csharpcode, .csharpcode pre { font-size: small; color: black; font-family: consolas, "Courier New", courier, monospace; background-color: #ffffff; /*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt { background-color: #f4f4f4; width: 100%; margin: 0em; } .csharpcode .lnum { color: #606060; } If there is any change in the local repository folder, GitHub for Windows will automatically detect the changes. In the above step, we have just added a Server.js file so that GitHub for Windows will detect the changes. Let’s commit the changes to the local repository before publishing the web site to Windows Azure. After committed the all changes, you can click publish button which will publish the all changes to Windows Azure repository. The following screen shot shows deployment history from the Windows Azure portal.   GitHub for Windows is providing a sync button which can use for synchronizing between local repository and Windows Azure repository after making any commit on the local repository after any changes. Our web site is running after the deployment using Git Summary Windows Azure Web Sites lets the developers to easily build and deploy websites with support for multiple framework including ASP.NET, PHP and Node.js and can easily deploy the Web Sites using Visual Studio, Git, FTP, Visual Studio Team Foundation Services and Microsoft WebMatrix. In this demo, we have deployed a Node.js Web Site to Windows Azure using Git. We can use GitHub for Windows to publish apps to non-GitHub repositories and can use to publish Web SItes to Windows Azure.

    Read the article

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