I am basically creating an external shopping cart system for users on my site that will lead to a secure system that I am paying for, and in their shopping pages, they auto-generate a PHP GET variable called CFTOKEN
that I need to access so I can send cart updates.
I am loading an iframe with the URL that redirects to the shopping cart with the CFTOKEN
variable in the URL. I need to get this variable in javascript so I can send updates to the cart.
I have tried accessing the URL by the following code:
$("#iframe").contents().get(0).location.href
but I not only get a cross domain error, I get undefined
for the location.
How can I get the URL?