Search
Search titles only
By:
Search titles only
By:
Log in
Register
Search
Search titles only
By:
Search titles only
By:
Menu
Install the app
Install
Forums
New posts
All threads
Latest threads
New posts
Trending threads
Trending
Search forums
What's new
New posts
New ads
New profile posts
Latest activity
Free Ads
Latest reviews
Search ads
Members
Current visitors
New profile posts
Search profile posts
Contact us
Latest ads
Colombo
Kaduwela - Two Storey House for Sale
dilrasan
Updated:
16 minutes ago
Ad icon
Wechat qr verification
Pawan2005
Updated:
Today at 1:28 AM
🚀 GOOGLE AI PRO 18 MONTHS ACTIVATION 🚀
sayuru bandara
Updated:
Yesterday at 5:34 PM
Pure VPN - Up to 27 Months
vgp
Updated:
Friday at 8:10 AM
එක පැකේජ් එකයි මාසෙටම Unlimited Internet. තාමත් DATA CARD දාන්න සල්ලි වියදම් කරනවද? අඩුම මිලට අපෙන්.
sayuru bandara
Updated:
Jun 2, 2026
Electronics
Vehicles
Property
Search
Reply to thread
Forums
General
ElaKiri Help
jquery ajax
Get the App
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Message
<blockquote data-quote="dinindu kan" data-source="post: 19175478" data-attributes="member: 494579"><p>mama signin.html page eke form values ganna ajax request ekak use kala..e ajax code eken signin.php page ekata hariyata form values yanawa.eth mata signin unata passe userwa signin.php page ekata redirect wenna hadaganna ona.mama ekata signin.js file ekema --window.location.replace("php/signin.php"); kiyala demma..ethakota redirect wenawa..but form eke values $_post eken yanne na ethakota.meka hadala denna..a big help...</p><p></p><p>menna js code eka :</p><p></p><p></p><p>$(document).ready(function(){</p><p> $('.modal-trigger').leanModal({</p><p> dismissible: true, // Modal can be dismissed by clicking outside of the modal</p><p> opacity: .5, // Opacity of modal background</p><p> in_duration: 300, // Transition in duration</p><p> out_duration: 200, // Transition out duration</p><p> });</p><p> </p><p> // Variable to hold request</p><p> var request;</p><p> </p><p> </p><p> // Bind to the submit event of our form</p><p> $("#Signin").submit(function(event){</p><p> // Abort any pending request</p><p> event.preventDefault();</p><p> if (request) {</p><p> request.abort();</p><p> }</p><p> // setup some local variables</p><p> var $form = $(this);</p><p> // Let's select and cache all the fields</p><p> var $inputs = $form.find("input, select, button, textarea");</p><p> </p><p> // Serialize the data in the form</p><p> var Data = $form.serialize();</p><p> alert(Data);</p><p> // Let's disable the inputs for the duration of the Ajax request.</p><p> // Note: we disable elements AFTER the form data has been serialized.</p><p> // Disabled form elements will not be serialized.</p><p> $inputs.prop("disabled", true);</p><p> </p><p> // Fire off the request to /form.php</p><p> request = $.ajax({</p><p> url: "php/signin.php",</p><p> type: "post",</p><p> data<img src="/styles/default/xenforo/smilies/default/D.gif" class="smilie" loading="lazy" alt=":D" title="Big grin :D" data-shortname=":D" />ata</p><p> });</p><p> </p><p> // Callback handler that will be called on success</p><p> request.done(function (response, textStatus, jqXHR){</p><p> // Log a message to the console</p><p> console.log("Hooray, it worked!");</p><p> //window.location.href = "php/signin.php";</p><p> //window.location.replace("php/signin.php");</p><p> });</p><p> </p><p> // Callback handler that will be called on failure</p><p> request.fail(function (jqXHR, textStatus, errorThrown){</p><p> // Log the error to the console</p><p> console.error("The following error occurred: "+textStatus, errorThrown);</p><p> });</p><p> </p><p> // Callback handler that will be called regardless</p><p> // if the request failed or succeeded</p><p> request.always(function () {</p><p> // Reenable the inputs</p><p> $inputs.prop("disabled", false);</p><p> });</p><p> </p><p> // Prevent default posting of form</p><p> //event.preventDefault();</p><p> window.location.replace("php/signin.php");</p><p> });</p><p> </p><p>});</p></blockquote><p></p>
[QUOTE="dinindu kan, post: 19175478, member: 494579"] mama signin.html page eke form values ganna ajax request ekak use kala..e ajax code eken signin.php page ekata hariyata form values yanawa.eth mata signin unata passe userwa signin.php page ekata redirect wenna hadaganna ona.mama ekata signin.js file ekema --window.location.replace("php/signin.php"); kiyala demma..ethakota redirect wenawa..but form eke values $_post eken yanne na ethakota.meka hadala denna..a big help... menna js code eka : $(document).ready(function(){ $('.modal-trigger').leanModal({ dismissible: true, // Modal can be dismissed by clicking outside of the modal opacity: .5, // Opacity of modal background in_duration: 300, // Transition in duration out_duration: 200, // Transition out duration }); // Variable to hold request var request; // Bind to the submit event of our form $("#Signin").submit(function(event){ // Abort any pending request event.preventDefault(); if (request) { request.abort(); } // setup some local variables var $form = $(this); // Let's select and cache all the fields var $inputs = $form.find("input, select, button, textarea"); // Serialize the data in the form var Data = $form.serialize(); alert(Data); // Let's disable the inputs for the duration of the Ajax request. // Note: we disable elements AFTER the form data has been serialized. // Disabled form elements will not be serialized. $inputs.prop("disabled", true); // Fire off the request to /form.php request = $.ajax({ url: "php/signin.php", type: "post", data:Data }); // Callback handler that will be called on success request.done(function (response, textStatus, jqXHR){ // Log a message to the console console.log("Hooray, it worked!"); //window.location.href = "php/signin.php"; //window.location.replace("php/signin.php"); }); // Callback handler that will be called on failure request.fail(function (jqXHR, textStatus, errorThrown){ // Log the error to the console console.error("The following error occurred: "+textStatus, errorThrown); }); // Callback handler that will be called regardless // if the request failed or succeeded request.always(function () { // Reenable the inputs $inputs.prop("disabled", false); }); // Prevent default posting of form //event.preventDefault(); window.location.replace("php/signin.php"); }); }); [/QUOTE]
Insert quotes…
Verification
Nawa warak dahaya keeyada? (Namaya wadi kireema dahaya)
Post reply
Top
Bottom