safari 3rd party cookies: Does the browser know if a function was fired via onclick or onload?
I've been told to integrate some JS for setting a third party cookie in safari. This code has a function that will open a new window at the third parties site to set the cookie, then time out, close and set the iframe source.

My question is why does it have to be an onclick function? Why can't I just do this after the page has loaded?

Does safari know that it was a button click that fired off the function that opened the window to the third party site?
safari 3rd party cookies: Does the browser know if a function was fired via onclick or onload?
===

I've been told to integrate some JS for setting a third party cookie in safari. This code has a function that will open a new window at the third parties site to set the cookie, then time out, close and set the iframe source.

My question is why does it have to be an onclick function? Why can't I just do this after the page has loaded?

Does safari know that it was a button click that fired off the function that opened the window to the third party site?