I have a html form and a validation php file for the form, every thing works when a user submits the form, but there are certain aspect of the function that i want the user to get in real time, such as if field A value is (yam) then unset field B
That's part of my function but it only works when the user submits the form, but i want to call it using ajax so that the php function is executed via an ajax call.
pandglobal
0
Newbie Poster
Recommended Answers
Jump to PostLets start with your form submission, if you don't want yuor form to submit, change teh action behaviour by adding this -
<form id="myform" action="javascript:void(-1)"></form>
to load server side ajax, try the following -
$.post( "yourpagename.php, function( data ) { $("#mysubmitbuttonid").html(data); If (data …
Jump to PostHello pandglobal it's not java it is JavaScript (and no , this not a technicality) .
You wrote:
i know how to hide and validate the function using jquery, but i don't want to use jquery to hide the form, or css because it will still show if the user disables …
Jump to PostA quick response , all in one file ( it is not a good idea to have php , html , JavaScript and Css in one file ) ... I have comments in many places , if you don't understand something (after reading those comments) feel free to ask
…
All 9 Replies
AndreRet
526
Senior Poster
pandglobal
0
Newbie Poster
pandglobal
0
Newbie Poster
deepaksh
0
Newbie Poster
AndreRet
526
Senior Poster
pandglobal
0
Newbie Poster
jkon
602
Posting Whiz in Training
Featured Poster
pandglobal
0
Newbie Poster
jkon
602
Posting Whiz in Training
Featured Poster
AndreRet
commented:
Nicely done!
+14
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.