Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Setting A subject field

Status
Not open for further replies.

richrich05

Programmer
Aug 15, 2005
24
US
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?
 
Your first problem is working out that javascript questions should not be posted in the Java forum :p

--------------------------------------------------
Free Java/J2EE Database Connection Pooling Software
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top