Welcome visitor
* Login
* Register
It is currently May 24th, 2019, 5:07 pm
All times are UTC [ DST ]
* Search
View unanswered posts - View active topics

FORUMS » Client Side » HTML



Post new topic Reply to topic  [ 2 posts ] 
Author Message
  Add 2 numbers provided by the user
PostPosted: November 19th, 2009, 6:44 am 

Posts: 16
Hello, I want to do a simple, nothing complex is just for a homework. How can I get 2 numbers from the user on one page (numbers.htm) and on another page (result.htm) show the sum of the numbers? Do you know an easy way? The easiest?


Top
 Profile  
 
  Re: Add 2 numbers provided by the user
PostPosted: November 19th, 2009, 7:30 am 

Posts: 57
Thats a vague question, I can only come up with a vague answer.

Use a form to get the numbers
http://www.scriptingok.com/forum/t5_8-Using-a-form-on-HTML

then choose a get(html+javascript) or post(html+php/asp/pearl) method
<form method="get"> <<!--the variables are sent through the URL-->
<form method="post"> <<!--the variables are sent in an array-->


if you choose get parse the URL
(this link is not about forms but it shows how to parse the URL using javascript)
http://www.scriptingok.com/forum/t5_852-Link-my-frame-website

if you choose post just add the variables
http://www.scriptingok.com/forum/t4_350-Add-items-of-a-form


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

FORUMS » Client Side » HTML


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron