I've created the following JavaScript which works but needs to be corrected to solve a browser time out problem. Note: A PayPal merchant account was established before I used this code.
This is the Mouse Up JavaScript for the Submit button
this.mailDoc(true, "myemailaddress [at] msn [dot] com", "", "", "Banner Ad Form");
This is the Mouse Down JavaScript for the same Submit button
// Get the item name and cost from a field on the page
var name = this.getField('serialNumber').value;
var cost = this.getField('Cost').value;
// Construct the paypal url. Change the email address and currency code as appropriate
var url = "https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=myPayPalEmailAddress [at] msn [dot] com¤cy_code=USD"
url = url + "&item_name=" + name;
url = url + "&amount=" + cost;
app.launchURL(url, true);
The serial number is a text number field that is Read Only and set to auto increment each time the form is opened.
This is the auto increment code:
// Get and increment Form ID
this.getField("serialNumber").value++;
The Cost field is a drop down field that populates the Cost field with default values.
I'd like suggestions for solving the time out problem and a method of including the words Invoice Number on the same line as the serialNumber.
I don't understand your last question. Can you explain the problem in more detail as well?