Maths in HTML
Quick question regarding HTML. Is is possible to use simple mathematical functions such as division within html code?
I am pulling a variable from a DB that gives me durartion in hours and i want to display it in working days. I.e Divide by 8.
Is this possible in HTML or would i have to use JS or some server side scripting?
Thanks in advance,
Not possible with only HTML.
Didnt think so, was just chancing my arm to see if any bright sparks out there could show me the light.
Cheers for the quick response.
There is no Maths in HTML. There is no Arithmetics, nor Algebra, nor Geometry.
HTML is just a markup language. It transfers and displays some text and picture in a document copied in user's browser and let the user to navigate from a web document to another using the Hyper links capabilities. It migh create, also, interactive forms. That is all.
So... Which are your needs now?
Last edited by Kor; 05-09-2008 at
Let me give you some more information on what i am trying to achieve here:
I am creating an email that pulls a figure from a DB and places it in my HTML based email.
I.e "You worked 400 hours this month." Where the number 400 is pulled from the DB.
However the figure is in hours and i want to display it in days (i.e divide by 8)
I tried embedding JS but because Outlook displays emails as HTML the JS is never executed.
I am about to try it by embedding php into the html but i have a feeling i will get the same result.
I do not want to change the values in the DB before i pull them.
What pulls the information from the database
Great wit and madness are near allied, and fine a line their bounds divide.
I am using software that has prebuilt namespaces that i can call which are assigned to specific fields in the DB. So as such all that is called in html is something like:
You have worked #HoursWorked# Hours
Php didnt work either.....
Show us the HTML part of the document
Does the server you are runing on even support PHP?
Last edited by Ballochio; 05-09-2008 at
Where #ExpectedDuration# returns a number in hours and i want to divide it by 8.
FONT is deprecated. use CSS. Give your span an id:
I tried JS before i posted. It doesnt work because the JS never gets exectuted because emails are sent in pure HTML.
Oh, I see... It's an E-mail... In this case there is nothing you can do, except for transforming that #Service.ExpectedDuration# at a server level before sending the mail.
Users Browsing this Thread
There are currently 1 users browsing this thread.
(0 members and 1 guests)