R
roN
Hi,
I get a weird error in Firefox, it tells me: "Not enough arguments" but the
function doesn't require any arguments.
The function looks like:
function add(void)
{
score+=parseInt(document.getElementById('new_business').value);
score+=parseInt(document.getElementById('starting').value);
score+=parseInt(document.getElementById('liquid').value);
score+=parseInt(document.getElementById('funds').value);
score+=parseInt(document.getElementById('home').value);
score+=parseInt(document.getElementById('income').value);
score+=parseInt(document.getElementById('excited').value);
alert(score);
document.getElementById('postscore').value=score;
document.getElementById('cusscore').innerHTML=score;
var curdate = new Date();
var hour = curdate.getHours();
hour=hour-3; // convert hour from EST to PST
if (score >=70 && hour>=8 && hour<=16) // only between 8am and 5pm PST
{
dosomething();
}
else
{
dosomethingelse();
}
}
and i call it with calls like:
<select name="new_business" id="new_business" onchange="add()">
The whole page would be at: http://www.dvdnowkiosks.com/callcenter3.php
It's a form for a call centre and different answers give different points
which then will be displayed on the bottom in the field "cusscore".
Any help would be appreciated!
Thanks lots!
Ron
I get a weird error in Firefox, it tells me: "Not enough arguments" but the
function doesn't require any arguments.
The function looks like:
function add(void)
{
score+=parseInt(document.getElementById('new_business').value);
score+=parseInt(document.getElementById('starting').value);
score+=parseInt(document.getElementById('liquid').value);
score+=parseInt(document.getElementById('funds').value);
score+=parseInt(document.getElementById('home').value);
score+=parseInt(document.getElementById('income').value);
score+=parseInt(document.getElementById('excited').value);
alert(score);
document.getElementById('postscore').value=score;
document.getElementById('cusscore').innerHTML=score;
var curdate = new Date();
var hour = curdate.getHours();
hour=hour-3; // convert hour from EST to PST
if (score >=70 && hour>=8 && hour<=16) // only between 8am and 5pm PST
{
dosomething();
}
else
{
dosomethingelse();
}
}
and i call it with calls like:
<select name="new_business" id="new_business" onchange="add()">
The whole page would be at: http://www.dvdnowkiosks.com/callcenter3.php
It's a form for a call centre and different answers give different points
which then will be displayed on the bottom in the field "cusscore".
Any help would be appreciated!
Thanks lots!
Ron