Go Back   Webmaster Malaysia Forum » Website Design & Development » Website Programming

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
  #1 (permalink)  
Old 11-01-2008, 09:43 PM
New kid on the block
 
Join Date: Jan 2008
Location: shah lama
Posts: 6
Rep Power: 0
arsenalfc82 is on a distinguished road
Question parse value dari textbox ke textbox...URGENT

mcm nie..aku kena buat system keputusan pelajar...contohnya jika aku masukan markah pelajar dlm textbox tu dpt markah BM=80 ..outomatik sdpt "A"..aku dh try IF else statement..tp tak jadi ar..mcm mana aku nak total kn jumlah markah..pastu nak kira peratus pelajar tu yekk..
kepada otai2 bantuan anda amatlah diperluakan
mcm mana aku nk buat yekk..

PHP Code:
<form name="form1" method="post" action="">
                        <
p>Keputusan Peperiksaan:-</p>
              <
table width="344" border="1">
                <
tr>
                  <
td width="167"><div align="center">Matapelajaran</div></td>
                  <
td width="85"><div align="center">Markah</div></td>
                  <
td width="70"><div align="center">Gred</div></td>
                </
tr>
                <
tr>
                  <
td>Bahasa Melayu </td>
                  <
td>
                    <
div align="center">
                      <
input type="text" size="4" name="MarkahBM">
                    </
div></td>
                  <
td><div align="center">
                 <
input type="text" size="4" name="GredBM">
                 <if 
MarkahBM 40 then
                 GredBM
="A">
                  </
div></td>
                </
tr>
                <
tr>
                  <
td>Bahasa Inggeris</td>
                  <
td>
                    <
div align="center">
                      <
input type="text" size="4" name="MarkahBI">
                    </
div></td><td><div align="center">
                      <
input type="text" size="4" name="GredBI">
                    </
div></td>
                </
tr>
                <
tr>
                  <
td>Sejarah</td>
                  <
td>
                    <
div align="center">
                      <
input type="text" size="4" name="MarkahSejarah">
                    </
div></td><td><div align="center">
                      <
input type="text" size="4" name="GredSejarah">
                    </
div></td>
                </
tr>
                <
tr>
                  <
td>Matematik</td>
                  <
td>
                    <
div align="center">
                      <
input type="text" size="4" name="MarkahM3">
                    </
div></td><td><div align="center">
                      <
input type="text" size="4" name="GredM3">
                    </
div></td
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 11-01-2008, 09:57 PM
mysticmind's Avatar
Super Moderator
 
Join Date: Jun 2001
Location: Mystic Kingdoms
Posts: 2,606
Rep Power: 141
mysticmind will become famous soon enough mysticmind will become famous soon enough
Send a message via Yahoo to mysticmind
apa language nih?
php? asp?

tak pernah lak aku jumpa php kod : <if

__________________
Personal's Blog! - Malaysian Artist!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 11-01-2008, 10:04 PM
New kid on the block
 
Join Date: Jan 2008
Location: shah lama
Posts: 6
Rep Power: 0
arsenalfc82 is on a distinguished road
lupe nak inform aku pakai dreamweaver...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 11-01-2008, 10:06 PM
New kid on the block
 
Join Date: Jan 2008
Location: shah lama
Posts: 6
Rep Power: 0
arsenalfc82 is on a distinguished road
Quote:
Originally Posted by mysticmind View Post
apa language nih?
php? asp?

tak pernah lak aku jumpa php kod : <if

aku baru lahh bro..
baru nak blajar2..tolong ar aku...heheheheh
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 12-01-2008, 12:20 AM
mysticmind's Avatar
Super Moderator
 
Join Date: Jun 2001
Location: Mystic Kingdoms
Posts: 2,606
Rep Power: 141
mysticmind will become famous soon enough mysticmind will become famous soon enough
Send a message via Yahoo to mysticmind
inilah masalah lazim orang bergantung software..
software bukan segalanya.

berdasarkan apa yang nak dibuat, anda memerlukan PROGRAMING yang boleh memproses input. Samada ASP atau PHP (dan yang sepertinya).. yang mana tidak mungkin mampu dipelajari sebulan dua, apatah lagi seminggu..

Selain tuh boleh try javascript.
__________________
Personal's Blog! - Malaysian Artist!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 12-01-2008, 01:52 AM
New kid on the block
 
Join Date: Jan 2008
Location: shah lama
Posts: 6
Rep Power: 0
arsenalfc82 is on a distinguished road
Question

Quote:
Originally Posted by mysticmind View Post
inilah masalah lazim orang bergantung software..
software bukan segalanya.

berdasarkan apa yang nak dibuat, anda memerlukan PROGRAMING yang boleh memproses input. Samada ASP atau PHP (dan yang sepertinya).. yang mana tidak mungkin mampu dipelajari sebulan dua, apatah lagi seminggu..

Selain tuh boleh try javascript.
aku buat nie pakai PHP..aku dh habis cube tgk buku semua dah ..tp tak sure funtion dia nak eltak mana??

bantuan ana amatlah diperlukan...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 12-01-2008, 12:03 PM
mysticmind's Avatar
Super Moderator
 
Join Date: Jun 2001
Location: Mystic Kingdoms
Posts: 2,606
Rep Power: 141
mysticmind will become famous soon enough mysticmind will become famous soon enough
Send a message via Yahoo to mysticmind
dia tak bleh letak merata2..
kene tahu camner nak letak.
tapi kalau still guna dreamweaver susah la..
coding bukan bergantung software.
ia bergantung ilmu

nak cakap camner pun susah..
yang pasti.. kene belajar basic php dulu..
antaranya camner nak display data dari form.

kerana kesian.. saya sertakan contoh simple:

borang.htm
HTML Code:
<form method="post" action="papar.php">
masukkan nama anda : <input type="text" name="nama">
<input type="submit" name="hantar"><br>
</form>
php lak
papar.php
PHP Code:
<?
$nama
=$_POST['nama'];
?>
Hai <? echo $nama ?> !. Selamat Datang!
Try.. tapi tolong research, kat mana boleh php nih JALAN.
bukan bleh run gitu2 jer.. hosting pun kene tgk hosting ape.
__________________
Personal's Blog! - Malaysian Artist!

Last edited by mysticmind : 12-01-2008 at 12:09 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 12-01-2008, 05:33 PM
New kid on the block
 
Join Date: Jan 2008
Location: shah lama
Posts: 6
Rep Power: 0
arsenalfc82 is on a distinguished road
kalu dalam JS mana nak buat..

aku nak biler user masuk kat markah dlm markahBM tu contohnya dpt 80..automatik kat textbox gredmarkahBM tu papar "A"..
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 12-01-2008, 08:02 PM
New kid on the block
 
Join Date: Jan 2008
Location: shah lama
Posts: 6
Rep Power: 0
arsenalfc82 is on a distinguished road
Unhappy

Code:
<script language="JavaScript">

function markah(form)
{
  var MarkahBM = form.MarkahBM.value;
  var MarkahBI = form.MarkahBI.value;
  var MarkahSejarah = form.MarkahSejarah.value;
  var MarkahM3 = form.MarkahM3.value;
  var Markahsains = form.Markahsains.value;
  var MarkahIslamMoral = form.MarkahIslamMoral.value;
  var Markahseni = form.Markahseni.value;
  var Markahjasmani = form.Markahjasmani.value;
  
  var Jummar = (MarkahBM*1)+(MarkahBI*1)+(MarkahSejarah*1)+(MarkahM3*1)+(Markahsains*1)+(MarkahIslamMoral*1)+(Markahseni*1)+(Markahjasmani*1);
  form.JumlahMarkah.value = Jummar.toFixed(0);
  
  var Jumperatus = (Jummar/800)*100;
  form.Peratusmarkah.value = Jumperatus.toFixed(0);
  }
  
function gred(form)
{
 var MarkahBM = form.MarkahBM.value;
  var BM
   if (MarkahBM >=80)
  {
  BM = "A";
  form.GredBM.value = BM;
  }
  
  }
</script>
aku berjaya buat utk kira jumlah markah n jumlah peratus...

tapi utk gre aku berjaya untuk dred 80 keatas jer..
aku tak reti nak kembangkan If statement ni dlm JS...

bantuan....bantuan....bantuan....bantuan....bantua n....bantuan....bantuan....bantuan....
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 13-01-2008, 02:07 PM
shidi's Avatar
Novice Webmaster
 
Join Date: Apr 2004
Location: Ampang
Posts: 18
Rep Power: 0
shidi is on a distinguished road
Send a message via Yahoo to shidi
Quote:
Originally Posted by arsenalfc82 View Post
aku berjaya buat utk kira jumlah markah n jumlah peratus...

tapi utk gre aku berjaya untuk dred 80 keatas jer..
aku tak reti nak kembangkan If statement ni dlm JS...
Tak kira dalam language apa pun. Kalau dah guna IF, untuk keadaan lain gunakan else if atau else
__________________
""If you must break the law, do it to seize power: in all other cases observe it." - Julius Caesar
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Parse error therion Website Programming 25 20-05-2004 02:41 PM
Caj Panggilan Antarabangsa dari RM0.40 seminit classy2003 Mamak Stall 0 13-04-2004 02:36 AM
Caj Panggilan Antarabangsa dari RM0.40 seminit classy2003 Other Webmaster-related Services and Promotion 0 13-04-2004 02:06 AM
how to make function that automatically parse url full time kille Website Programming 6 08-11-2002 05:59 PM



All times are GMT +8. The time now is 12:48 PM. Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.1.0 vBulletin skin by ForumMonkeys.com.


WebmasterMalaysia.com is Proudly Hosted by Exabytes Semi Dedicated Server.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58