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
Ad icon
V2ray VPN for Tunneling
hu KANNA
Updated:
Oct 22, 2026
FREE SEO Check & Google Maps Check for Sri Lankan Businesses | Web Design, Website Price Rs 14,900 |
LankaSolve
Updated:
Oct 20, 2026
ඕනම රටකට සෙට් වෙන CV එකක්
ErMurazor
Updated:
Oct 17, 2026
Hambantota
7 Acres Beachfront Land For Sell DownSouth , PerPerch Price 420 000
1024 Digital
Updated:
Oct 14, 2026
Baseus PI LITE INDOOR CAMERA
ErMurazor
Updated:
Oct 12, 2026
Electronics
Vehicles
Property
Search
Reply to thread
Forums
General
Education
ElaKiri Programmer's Club
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="DooA" data-source="post: 18593958" data-attributes="member: 362085"><p>ජ්කුඅරි ajax වලින් කරන්න පුළුවන්. එත් කෙලෙන්ම class එකේ method එක කෝල් කරන්න බැරි වෙයි. නමුත් පොඩි php code එකක් ලියලා එකෙන් ajax එකේ එන value එක class එකේ method එකට pass කරන්න පුළුවන්.</p><p></p><p>[PHP]-----------ajax------------------</p><p>$.ajax({</p><p> url: "script.php",</p><p> method: "POST",</p><p> data: { selectedValue : # YOUR DROPDOWN LIST VALUE HERE # },</p><p> dataType: "html"</p><p>});</p><p> </p><p>request.done(function( msg ) {</p><p> $( "#log" ).html( msg );</p><p>});</p><p>----------------------------------[/PHP]</p><p></p><p>[PHP]-----------script.php--------------</p><p></p><p>$classOject = new test();</p><p>$selectedValueFromHtml = $_POST["selectedValue"];</p><p>$classOject->hello($selectedValueFromHtml);</p><p></p><p>----------------------------------[/PHP]</p><p></p><p>[PHP]---------test.php (class file)----</p><p></p><p>class test{</p><p> function hello($value){</p><p> echo 'selected value is '. $value;</p><p> }</p><p></p><p>}</p><p></p><p>---------------------------------[/PHP]</p><p></p><p></p><p>මේ කෝඩ් එක වැඩ කරන්නේ නෑ මම දැන් නිකන් නෝට්පෑඩ් එකේ ලියපුඉ එකක්. කෝඩ් එක එන්න ඕනේ. වෙන විදියක් දන්නා කෙනෙක් ඉන්නවනම් කියලා දෙයි. මම දන්නා විදිය ඕක.</p></blockquote><p></p>
[QUOTE="DooA, post: 18593958, member: 362085"] ජ්කුඅරි ajax වලින් කරන්න පුළුවන්. එත් කෙලෙන්ම class එකේ method එක කෝල් කරන්න බැරි වෙයි. නමුත් පොඩි php code එකක් ලියලා එකෙන් ajax එකේ එන value එක class එකේ method එකට pass කරන්න පුළුවන්. [PHP]-----------ajax------------------ $.ajax({ url: "script.php", method: "POST", data: { selectedValue : # YOUR DROPDOWN LIST VALUE HERE # }, dataType: "html" }); request.done(function( msg ) { $( "#log" ).html( msg ); }); ----------------------------------[/PHP] [PHP]-----------script.php-------------- $classOject = new test(); $selectedValueFromHtml = $_POST["selectedValue"]; $classOject->hello($selectedValueFromHtml); ----------------------------------[/PHP] [PHP]---------test.php (class file)---- class test{ function hello($value){ echo 'selected value is '. $value; } } ---------------------------------[/PHP] මේ කෝඩ් එක වැඩ කරන්නේ නෑ මම දැන් නිකන් නෝට්පෑඩ් එකේ ලියපුඉ එකක්. කෝඩ් එක එන්න ඕනේ. වෙන විදියක් දන්නා කෙනෙක් ඉන්නවනම් කියලා දෙයි. මම දන්නා විදිය ඕක. [/QUOTE]
Insert quotes…
Verification
Awruddata maasa keeyada?
Post reply
Top
Bottom