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

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 13-08-2004, 09:38 AM
Novice Webmaster
 
Join Date: Aug 2003
Location: sabah
Posts: 23
Rep Power: 0
smartki is on a distinguished road
Send a message via Yahoo to smartki
Angry Help ME!!

i need someone to help me on this
javascript(embedding) in HTML
document that has text boxes
for mango 5cent, papaya
5cent and banana 5cent.

And These text boxes will take
a number, which is the purchased
number of the fruit.

someone help me!!

1. How to make sure the number entered was between 0-99?
2. How to make the total counter(number x the cost of the specific fruit??)?


Hope Someone, can help me out of this..

Last edited by smartki; 20-10-2004 at 03:34 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 17-08-2004, 12:04 PM
webek's Avatar
Novice Webmaster
 
Join Date: Aug 2004
Location: Kuching, Sarawak
Posts: 27
Rep Power: 0
webek is on a distinguished road
<script>
function TokeyBrp()
{
value1 = eval(document.form.display1.value);
value2 = eval(document.form.display2.value);
value3 = eval(document.form.display3.value);
sum = eval(value1 + value2 + value3);
document.form.display4.value = sum
}
function Kira()
{
document.form.display1.value=eval(document.form.in put1.value * document.form.input2.value);
document.form.display2.value=eval(document.form.in put3.value * document.form.input4.value);
document.form.display3.value=eval(document.form.in put5.value * document.form.input6.value);
TokeyBrp();
}
</script>

<input type=button value=price><input type=button value=Quantity><input type=button value=Total>
<form name="form">
apple: <input type=input name=input1 value=60 readonly>cents

<input type=input name=input2>

<INPUT type=input NAME="display1" readonly><br>

orange: <input type=input name=input3 value=70 readonly>cents

<input type=input name=input4>

<INPUT type=input NAME="display2" readonly><br>

banana: <input type=input name=input5 value=70 readonly>cents

<input type=input name=input6>

<INPUT type=input NAME="display3" readonly><br>

<INPUT type=input NAME="display4" readonly>
<INPUT TYPE="button" VALUE="enter" NAME="enter" ONCLICK="javascript:Kira();">

</form>
__________________
http|//www.jelajahborneo.uni.cc
Semuanya Bermula Di Sini!

Last edited by webek; 17-08-2004 at 12:07 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 18-08-2004, 10:16 AM
unclejim's Avatar
Inspired Webmaster
 
Join Date: Jun 2004
Location: Setia Alam, Selangor
Posts: 177
Rep Power: 55
unclejim is on a distinguished road
Sounds like a class assignment

Smartki, how's it going? Did webek's answer do it for you?

If you still need help, I may be able to sit down and find a solution. But only if you reply to this, since this is a bit outdated.

Cheers.

Last edited by unclejim; 18-08-2004 at 11:44 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 20-08-2004, 08:51 PM
Novice Webmaster
 
Join Date: Aug 2003
Location: sabah
Posts: 23
Rep Power: 0
smartki is on a distinguished road
Send a message via Yahoo to smartki
Hmm, Its ok..im trying to make it just receive number of order between (0<= and =<99) ..... and if the number entered is invalid it will pop up prompt that told the user to enter again...the right value!.. Thanks webek for the script!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 20-08-2004, 08:55 PM
Novice Webmaster
 
Join Date: Aug 2003
Location: sabah
Posts: 23
Rep Power: 0
smartki is on a distinguished road
Send a message via Yahoo to smartki
Quote:
Originally posted by unclejim
Sounds like a class assignment

Smartki, how's it going? Did webek's answer do it for you?

If you still need help, I may be able to sit down and find a solution. But only if you reply to this, since this is a bit outdated.

Cheers.
Hmm.. Sumting Like that la :P ive tried to make it but but but...i got many error..huhu!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 21-09-2004, 08:27 PM
Inspired Webmaster
 
Join Date: Jul 2004
Location: SJ, Selangor
Posts: 189
Rep Power: 54
vcheewei is on a distinguished road
lol,HOR!! i report to your lecturer!! haha..jk
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 21-09-2004, 10:48 PM
mysticmind's Avatar
Super Moderator
 
Join Date: Jun 2001
Location: Mystic Kingdoms
Posts: 2,619
Rep Power: 141
mysticmind will become famous soon enough mysticmind will become famous soon enough
Send a message via Yahoo to mysticmind
pemalas nih...
kalau aku laa.. mati aku tak bagi / paste source tuh..

:roll:
__________________
Personal's Blog! - Malaysian Artist!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 21-09-2004, 11:11 PM
Inspired Webmaster
 
Join Date: Jul 2004
Location: SJ, Selangor
Posts: 189
Rep Power: 54
vcheewei is on a distinguished road
haha....if refer okie la...but if copy u wont learn also mer...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 05-10-2004, 09:38 PM
Novice Webmaster
 
Join Date: Oct 2004
Location: SG
Posts: 32
Rep Power: 0
List is on a distinguished road
Could this be a helping hand
www.marzlist.com/JavaScriptsPro
__________________
BookMark System Script
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 06-10-2004, 12:39 AM
Novice Webmaster
 
Join Date: Oct 2004
Location: --== Malaysia ==--
Posts: 87
Rep Power: 49
lowyat99 is on a distinguished road
lol
lol
lol
lol
__________________
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
<img src="http://www.outsource.net.my/graphics/sywavelogo.jpg" width="373" height="52">
<strong><a href="http://www.outsource.net.my">Outsource.net.my</a></strong> - <em><font size="2">the search for competitiveness</font></em>
<font size="2">( Project Managers : You can outsource your job to freelancers and get it done with the price you want to pay. )
( Freelancers : You can do what you love to do and get paid. ) </font>
</body>
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #11 (permalink)  
Old 17-10-2004, 12:04 AM
Novice Webmaster
 
Join Date: Aug 2003
Location: sabah
Posts: 23
Rep Power: 0
smartki is on a distinguished road
Send a message via Yahoo to smartki
thanksla buddies.. i'm just paste the problem for my friends. im ok on html but poor on javascript.. c,delphi, yeslah!!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #12 (permalink)  
Old 17-10-2004, 12:08 AM
Novice Webmaster
 
Join Date: Aug 2003
Location: sabah
Posts: 23
Rep Power: 0
smartki is on a distinguished road
Send a message via Yahoo to smartki
Thanks webek for your help. its helping me, i found the solution.
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 Search this Thread
Search this Thread:

Advanced Search
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

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



All times are GMT +8. The time now is 09:29 AM. Powered by vBulletin® Version 3.7.3
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 59