Sean has attended:
Dreamweaver 8 Introduction course
Web 'Calculators'
Hi Trainer, if I want to incorporate a form into a page into which you enter data which when submitted returns a result, like a typical mortgage calculator for example, what type of application would I have to sit behind Dreamweaver? Would Excel suffice and where can I find some info on linking the two? Thanks in advance, Sean
RE: Web 'Calculators'
Sean,
I'd use Javascript for instant results (ie. the figures change in front of the user's eyes as they type), or a server-side scripting language (CGI) such as PHP, ASP, .NET or Perl if you don't mind your user inputting data then hitting 'submit', and the page returning the answer.
To run the server side scripts, the appropriate settings will need to be set up on your web server. For example, if you have Windows hosting then your site will most likely run on IIS, which includes ASP and sometimes .NET by default. Whereas PHP is most likely to be installed if your server is Apache/Linux.
A simple calculator is easy enough to program in either Javascript or PHP, you just need to know a bit of syntax.
For example, in PHP, you can have a form with various fields, then PHP code might look like this:
<?php
$value1 = $income * $rate;
$value2 = $interest * $income;
$total = $value1 / $value2;
print "You're total is $total";
?>
Some links to help you get started:
http://www.javascriptkit.com/script/cut18.shtml
http://www.w3schools.com/js/default.asp
http://www.w3schools.com/php/default.asp
You can't really link Excel to a web page for this, because your users would all need to have Excel installed, and not everyone does. But even then, I don't think you can link that software package with any web pages.
Hope this helps,
Rich