richrich05
Programmer
I need help i'm trying to control the subject of a email on a form using set text plus a drop down field value.
function getsubject()
{
var Request = document.FrontPage_Form2.Request
for (i=0; i < Request.length; i++)
{
if (Request.options.selected)
{
var subject = Request.options.value
}
}
return subject;
}
function setsubject()
{
var subjectFixed = "Process Development Request:"
if (subjectFixed.length > 0)
{
document.FrontPage_Form2.subject.value = subjectFixed + getsubject();
}
else
{
document.FrontPage_Form2.subject.value = getsubject();
}
document.FrontPage_Form2.submit();
window.alert("recipient = " + document.FrontPage_Form2.subject.value);
}
the name of the drop down field is Request. Does anyone know what i'm doing wrong?
function getsubject()
{
var Request = document.FrontPage_Form2.Request
for (i=0; i < Request.length; i++)
{
if (Request.options.selected)
{
var subject = Request.options.value
}
}
return subject;
}
function setsubject()
{
var subjectFixed = "Process Development Request:"
if (subjectFixed.length > 0)
{
document.FrontPage_Form2.subject.value = subjectFixed + getsubject();
}
else
{
document.FrontPage_Form2.subject.value = getsubject();
}
document.FrontPage_Form2.submit();
window.alert("recipient = " + document.FrontPage_Form2.subject.value);
}
the name of the drop down field is Request. Does anyone know what i'm doing wrong?