The field I am wanting to pull from is labeled "Name". Below was one of my attempts, all of which have not worked.
var Name = this.getField("Name").value;
cURL: "mailto:firstname.lastname@example.org?subject=TSC Form (Name)&body= ) ",
Can someone point me in the right direction or help me with where I went wrong in the script? I am new to this and glad I was able to execute the first script successfully but I feel I am in over my head with the customization.
"mailto:email@example.com?subject=TSC Form (Name)&body= ) "
it's taken as a literal piece of text. How does js know that when you say "Form" it means the word "Form" but when you say "Name" it means the value of a variable called "Name"? Instead you need to use string concatination to construct the string you want;
"mailto:firstname.lastname@example.org?subject=TSC Form (" + Name + ")&body= ) "
That makes sense, I revised the script but now I am getting the following error.
SyntaxError: missing } after property list
line 7: cSubmitAs: "PDF"
The script I was using:
var name = this.getField("Name").value;
cURL: "mailto:email@example.com?subject=TSC Form (" + Name + ")&body= ) "
I added a comma, a semicolon, a curly bracket... didn't change the error. This was not an error previously and that syntax worked when I wasn't trying to do anything complex with the subject line. Do I have to change the syntax because of what I am trying to accomplish with the subject line?
Go to Parent-------------------------------------index.jsp-----------------------------------------
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
What part of "don't just dump your unformatted code and expect us to figure out what it's supposed to be doing" did you not understand?
Edit your post. Remove any code that isn't relevant. Add a clear description of what the code is supposed to be doing, what the code is actually doing, and the full details of any errors and exceptions. Remember to tell us which line of code the error is thrown from.
And while you're at it, remove the duplicate copy of this post from QA.
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
Please do not just dump a load of unformatted code and expect someone to figure out what it is supposed to be doing. Edit your question and explain the problem properly, with only the relevant portions of the code, properly enclosed within <pre> tags for readability.
No, you have just dumped the same totally unformatted code. Please stop doing this. Post only the code (enclosed within <pre>) that demonstrates your problem, as I already suggested. And please add a proper description of your problem.