I would like a script, written in JavaScript, that passes a variable to the server in a url string, and then sets the variable as a cookie on the visitors computer. I would then like to be able to retrieve this cookie and pass it as a hidden form field, when a particular form is submitted.
Example:
http://www.mydomain.com/?afid=123456
Once the visitor gets to www.mydomain.com , the afid is read; a cookie is set with the value 123456, on the visitors computer.
Then when an order form is submitted, I would like to have a hidden form field that I can set and have it pass the cookie as part of the form submission.
This is very similar to an affiliate program where a affiliate sends their unique link, and it sets the value that can be retrieved to determine the source of the order later.
Thanks
接包方 | 国家/地区 | |
---|---|---|
![]() |
3
Icubicles
|
|
![]() |
2
Olekbeluga
|
|
![]() |
3
Zenchina
|
|
![]() |
2
Janico59
|
|
![]() |
2
Karta_mobile
(中标)
|
|
![]() |
2
Jmrodg
|
|
![]() |
2
Dynamixsoftware
|
|
2
Binary123
|
||
![]() |
0
Zhang116868
|
|
0
Thinker
|