I have an online database that I am working on that uses both SQL, Javascript and PHP.
I have it set up so the user creates a job and puts in the job description, name, etc. After that the database user can send an email to our partners. This email page pre-fills the subject and the message itself with the job name (for subject) and the job description (for the message body). The user also can edit this information and add/edit whatever is there before sending the email.
I have noticed that if I make the job description longer than 1 line, the subject and the body will not pre-populate. If it is 1 line or less then it does pre-populate like it should.
I cannot seem to find out what the problem is. I would think that at least the subject would prepopulate, but it won't either.
I know this is a vague description of the problem and I haven't really shown any code. But does anyone have any suggestions on where I should look? I don't know whether to look at the page where the job is built, or whether i should look at the page where the email is sent from.
This is what the pre-filling code looks like:
{
document.getElementById('subject').value = '<?php echo $rfqinfo['name']; ?> Request For Bid';
text = "\n\n\n\t---Job Information:---\n\nProject: <?php echo $rfqinfo['name']; ?> \n";
text = text + "Description: <?php echo $rfqinfo['description']; ?>\n";
text = text + "Due Date: <?php echo $rfqinfo['dateto']; ?> at <?php echo $rfqinfo['time1']; ?> <?php echo $rfqinfo['time2']; ?>\n";
text = text + "Log into the portal to view the project details.\n\n";
text = text + "http://portal.jcc-va.com/ \n";
document.getElementById("bodytext").value = text;
}