background
I have an online form that I wish to use for multiple 3rd party sign-ups.
The form itself works fine, capturing customer data entered as well as some variables that I am passing using a promotional url, like the 3rd party referral etc.
What I want on the form is a link, whereby someone can just go to our site and start browsing around before giving all there details. As a failsafe (incase they don't come back to the form and fill it in) I want to pass a promocode to this link so we can manually update them if they purchase without signing up correctly (for 3rd party tracking etc)
This is what I have come up with so far, but it keeps passing promocode=undefined
<script type="text/javascript" language="javascript">
var s_promocode = nlapiGetFieldValue('promocode');
document.write("<p onClick=window.location='http://www.wineboxwarehouse.com.au/?promocode=' + s_promocode>link 3</p>");
</script>
The promocode field is hidden on the form and is populating from the promotional url correctly. I just can't to get it to populate to the created url.
Any ideas?