SlideShare uma empresa Scribd logo
1 de 2
Baixar para ler offline
JQUERY FOR POST A FORM

Step -1: Create a html form
              <html>

              <title>Jquery form Post</title>

              <head>

              <script type="text/javascript" src="http://code.jquery.com/jquery-1.8.2.min.js"></script>

              <script type="text/javascript">

              function send()

              {

              $.ajax({type:'POST', url:'process.php', data:$("#test_form").serialize(),
              success:function(response){$("#result").html(response)}});

                  return false;

              }

              </script>

              <style type="text/css">

              .result {

              padding:2px;

              background-color:#99CCFF;

              font-family:Arial, Helvetica, sans-serif;

              font-size:12px;

              font-weight:bold;

              height:20px;

              width:300px;

              margin-top:12px;

              padding-left:6px;
}

               </style>

               </head>

               <body>

               <form id="test_form" onsubmit="return send()">

               <div>Name: <input type="text" name="name" /></div>

               <div><input type="submit" value="send" /><div id="result"></div></div>

               </form>




               </body>

               </html>

Step -2: Create a process file

       Process.php
       <?php

       echo “Yoour posted data : ”.$_POST[‘name’];

       ?>

       Now run the page

Mais conteúdo relacionado

Mais procurados

Dundee University HackU 2013 - Mojito
Dundee University HackU 2013 - MojitoDundee University HackU 2013 - Mojito
Dundee University HackU 2013 - Mojito
smartads
 
Javascript
JavascriptJavascript
Javascript
timsplin
 

Mais procurados (19)

Jquery presentation
Jquery presentationJquery presentation
Jquery presentation
 
Eu odeio OpenSocial
Eu odeio OpenSocialEu odeio OpenSocial
Eu odeio OpenSocial
 
Jquery image slider
Jquery image slider Jquery image slider
Jquery image slider
 
Jquery Basics
Jquery BasicsJquery Basics
Jquery Basics
 
JavaScript the Smart Way - Getting Started with jQuery
JavaScript the Smart Way - Getting Started with jQueryJavaScript the Smart Way - Getting Started with jQuery
JavaScript the Smart Way - Getting Started with jQuery
 
Coisas para o blog
Coisas para o blogCoisas para o blog
Coisas para o blog
 
Javascript session june 2013 (iii) jquery json
Javascript session june 2013 (iii) jquery   jsonJavascript session june 2013 (iii) jquery   json
Javascript session june 2013 (iii) jquery json
 
webstudy jquery
webstudy jquerywebstudy jquery
webstudy jquery
 
Dundee University HackU 2013 - Mojito
Dundee University HackU 2013 - MojitoDundee University HackU 2013 - Mojito
Dundee University HackU 2013 - Mojito
 
Javascript
JavascriptJavascript
Javascript
 
Karan - form search
Karan - form searchKaran - form search
Karan - form search
 
JQuery
JQueryJQuery
JQuery
 
Rails GUI Development with Ext JS
Rails GUI Development with Ext JSRails GUI Development with Ext JS
Rails GUI Development with Ext JS
 
Black-Scholes Calculator on Web
Black-Scholes Calculator on WebBlack-Scholes Calculator on Web
Black-Scholes Calculator on Web
 
AngulrJS Overview
AngulrJS OverviewAngulrJS Overview
AngulrJS Overview
 
Casl. isomorphic permission management.pptx
Casl. isomorphic permission management.pptxCasl. isomorphic permission management.pptx
Casl. isomorphic permission management.pptx
 
引き出しとしてのDjango - SoozyCon7
引き出しとしてのDjango - SoozyCon7引き出しとしてのDjango - SoozyCon7
引き出しとしてのDjango - SoozyCon7
 
WordPress Theme Design and Development Workshop - Day 3
WordPress Theme Design and Development Workshop - Day 3WordPress Theme Design and Development Workshop - Day 3
WordPress Theme Design and Development Workshop - Day 3
 
Java script page redirection
Java script   page redirectionJava script   page redirection
Java script page redirection
 

Destaque

Season's Greetings
Season's GreetingsSeason's Greetings
Season's Greetings
TCM infosys
 
Are you and your computer guy praying 3
Are you and your computer guy praying 3Are you and your computer guy praying 3
Are you and your computer guy praying 3
Phil Hutchins
 
Building Angular Apps With Type Script
Building Angular Apps With Type ScriptBuilding Angular Apps With Type Script
Building Angular Apps With Type Script
Sergey Barskiy
 
Amir33202057 2013 03-17-19-06-07
Amir33202057 2013 03-17-19-06-07Amir33202057 2013 03-17-19-06-07
Amir33202057 2013 03-17-19-06-07
Dushyant Kumar
 

Destaque (20)

Enterprise Risk Management
Enterprise Risk ManagementEnterprise Risk Management
Enterprise Risk Management
 
Season's Greetings
Season's GreetingsSeason's Greetings
Season's Greetings
 
Proven Mobile Solutions that Increase Productivity, Visibility and Sales
Proven Mobile Solutions that Increase Productivity, Visibility and SalesProven Mobile Solutions that Increase Productivity, Visibility and Sales
Proven Mobile Solutions that Increase Productivity, Visibility and Sales
 
Ship It!
Ship It!Ship It!
Ship It!
 
Are you and your computer guy praying 3
Are you and your computer guy praying 3Are you and your computer guy praying 3
Are you and your computer guy praying 3
 
SFPUC and DataSplice Mobile for Maximo
SFPUC and DataSplice Mobile for MaximoSFPUC and DataSplice Mobile for Maximo
SFPUC and DataSplice Mobile for Maximo
 
Inception Product Feature Webinar: Workflow, Versioning & Restore
Inception Product Feature Webinar: Workflow, Versioning & RestoreInception Product Feature Webinar: Workflow, Versioning & Restore
Inception Product Feature Webinar: Workflow, Versioning & Restore
 
Automated Test Design: Single Use Vs Reusable Tests
Automated Test Design: Single Use Vs Reusable TestsAutomated Test Design: Single Use Vs Reusable Tests
Automated Test Design: Single Use Vs Reusable Tests
 
Building Angular Apps With Type Script
Building Angular Apps With Type ScriptBuilding Angular Apps With Type Script
Building Angular Apps With Type Script
 
Via3 Project In Control
Via3 Project In ControlVia3 Project In Control
Via3 Project In Control
 
Social media forbis
Social media forbisSocial media forbis
Social media forbis
 
Introducing Peppercan. Business at your fingertips in real-time.
Introducing Peppercan. Business at your fingertips in real-time.Introducing Peppercan. Business at your fingertips in real-time.
Introducing Peppercan. Business at your fingertips in real-time.
 
Good mobile design of financial industry websites
Good mobile design of financial industry websitesGood mobile design of financial industry websites
Good mobile design of financial industry websites
 
Amir33202057 2013 03-17-19-06-07
Amir33202057 2013 03-17-19-06-07Amir33202057 2013 03-17-19-06-07
Amir33202057 2013 03-17-19-06-07
 
From User to Global: A Spectrum of Experience
From User to Global: A Spectrum of ExperienceFrom User to Global: A Spectrum of Experience
From User to Global: A Spectrum of Experience
 
Rmt ganti
Rmt gantiRmt ganti
Rmt ganti
 
Q1.0 [Quiz Quirks]
Q1.0 [Quiz Quirks]Q1.0 [Quiz Quirks]
Q1.0 [Quiz Quirks]
 
Degrafa Overview
Degrafa OverviewDegrafa Overview
Degrafa Overview
 
Count to 10 and Say Yes
Count to 10 and Say YesCount to 10 and Say Yes
Count to 10 and Say Yes
 
E commerce(1)
E commerce(1)E commerce(1)
E commerce(1)
 

Semelhante a Jquery for post a form

Yearning jQuery
Yearning jQueryYearning jQuery
Yearning jQuery
Remy Sharp
 
Javascript MVC & Backbone Tips & Tricks
Javascript MVC & Backbone Tips & TricksJavascript MVC & Backbone Tips & Tricks
Javascript MVC & Backbone Tips & Tricks
Hjörtur Hilmarsson
 
QuickConnect
QuickConnectQuickConnect
QuickConnect
Annu G
 

Semelhante a Jquery for post a form (20)

Mobile themes, QR codes, and shortURLs
Mobile themes, QR codes, and shortURLsMobile themes, QR codes, and shortURLs
Mobile themes, QR codes, and shortURLs
 
HTML5
HTML5HTML5
HTML5
 
Building iPhone Web Apps using "classic" Domino
Building iPhone Web Apps using "classic" DominoBuilding iPhone Web Apps using "classic" Domino
Building iPhone Web Apps using "classic" Domino
 
JavaScript Training
JavaScript TrainingJavaScript Training
JavaScript Training
 
Internet and Web Technology (CLASS-8) [jQuery and JSON] | NIC/NIELIT Web Tech...
Internet and Web Technology (CLASS-8) [jQuery and JSON] | NIC/NIELIT Web Tech...Internet and Web Technology (CLASS-8) [jQuery and JSON] | NIC/NIELIT Web Tech...
Internet and Web Technology (CLASS-8) [jQuery and JSON] | NIC/NIELIT Web Tech...
 
Flask – Python
Flask – PythonFlask – Python
Flask – Python
 
Client Web
Client WebClient Web
Client Web
 
Html To JSP
Html To JSPHtml To JSP
Html To JSP
 
WebAPI Odata Knockout
WebAPI Odata KnockoutWebAPI Odata Knockout
WebAPI Odata Knockout
 
Practical PHP by example Jan Leth-Kjaer
Practical PHP by example   Jan Leth-KjaerPractical PHP by example   Jan Leth-Kjaer
Practical PHP by example Jan Leth-Kjaer
 
Html5 For Jjugccc2009fall
Html5 For Jjugccc2009fallHtml5 For Jjugccc2009fall
Html5 For Jjugccc2009fall
 
Yearning jQuery
Yearning jQueryYearning jQuery
Yearning jQuery
 
Javascript MVC & Backbone Tips & Tricks
Javascript MVC & Backbone Tips & TricksJavascript MVC & Backbone Tips & Tricks
Javascript MVC & Backbone Tips & Tricks
 
Form demoinplaywithmysql
Form demoinplaywithmysqlForm demoinplaywithmysql
Form demoinplaywithmysql
 
Virtual Madness @ Etsy
Virtual Madness @ EtsyVirtual Madness @ Etsy
Virtual Madness @ Etsy
 
Introduction to Html5
Introduction to Html5Introduction to Html5
Introduction to Html5
 
QuickConnect
QuickConnectQuickConnect
QuickConnect
 
javaScriptForms.pptx
javaScriptForms.pptxjavaScriptForms.pptx
javaScriptForms.pptx
 
web design and jQuery introduction in persian
web design and jQuery introduction in persianweb design and jQuery introduction in persian
web design and jQuery introduction in persian
 
Tutorial asp.net
Tutorial  asp.netTutorial  asp.net
Tutorial asp.net
 

Último

Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Último (20)

Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 

Jquery for post a form

  • 1. JQUERY FOR POST A FORM Step -1: Create a html form <html> <title>Jquery form Post</title> <head> <script type="text/javascript" src="http://code.jquery.com/jquery-1.8.2.min.js"></script> <script type="text/javascript"> function send() { $.ajax({type:'POST', url:'process.php', data:$("#test_form").serialize(), success:function(response){$("#result").html(response)}}); return false; } </script> <style type="text/css"> .result { padding:2px; background-color:#99CCFF; font-family:Arial, Helvetica, sans-serif; font-size:12px; font-weight:bold; height:20px; width:300px; margin-top:12px; padding-left:6px;
  • 2. } </style> </head> <body> <form id="test_form" onsubmit="return send()"> <div>Name: <input type="text" name="name" /></div> <div><input type="submit" value="send" /><div id="result"></div></div> </form> </body> </html> Step -2: Create a process file Process.php <?php echo “Yoour posted data : ”.$_POST[‘name’]; ?> Now run the page