Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Troubleshooting
Research
Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

Want to pass javascript variables through paypal button

Avatar of pixelscape
pixelscape asked on
JavaScriptE-Commerce
24 Comments1 Solution742 ViewsLast Modified:
I want to include two javascript variables in my paypal button code to pass to paypal as an option.

I have the following two variables I have passed from another page...

<SCRIPT LANGUAGE="javascript">

var fname = delineate(text)
var lname = delineate2(text)

document.output.fname.value = fname + lname;


document.getElementById('toy-vote').value = fname;  << Trying to pass to paypal code as ID
</SCRIPT>


Paypal code...
<input type="hidden" name="on3" value="Vote">
<input type="hidden" name="os3" id="toy-vote">

ID does not work to pass. This code works, it passed value=staticvalue to paypal's checkout page... not sure how to pass the variable.

ASKER CERTIFIED SOLUTION
Avatar of TRW-Consulting
TRW-ConsultingFlag of United States of America image

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Commented:
This problem has been solved!
Unlock 1 Answer and 24 Comments.
See Answers