By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,569 Members | 1,181 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,569 IT Pros & Developers. It's quick & easy.

window.yzq_a

P: n/a
Hi,
Can anyone please tell me what is window.yzq_a? It is often used like
in "if(window.yzq_a == null)". Does it check if a window is open or is
that something else?

Thanks,
~Parthi.

Sep 23 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Parthi said the following on 9/23/2005 2:58 AM:
Hi,
Can anyone please tell me what is window.yzq_a? It is often used like
in "if(window.yzq_a == null)". Does it check if a window is open or is
that something else?


It is checking a custom property of the window object. Probably a
variable. Can you give a URL to a page that uses it?

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Sep 23 '05 #2

P: n/a
Thanks for the quick reply.
I found one URL:
http://sports.groups.yahoo.com/group...ub/message/669

Sep 23 '05 #3

P: n/a
Parthi said the following on 9/23/2005 3:23 AM:
Thanks for the quick reply.
I found one URL:
http://sports.groups.yahoo.com/group...ub/message/669


View the source. Somewhere in that 423 lines of garbage HTML code you
will find somewhere where it either defines it or doesn't. And then
based on that variable, it writes a garbage script tag, probably for the
ads.

I *can* tell you this though, it is not a normal feature of the window
object, it is something specific to that site.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Sep 23 '05 #4

P: n/a
Parthi wrote in message news:11*********************@g47g2000cwa.googlegro ups.com...
Thanks for the quick reply.
I found one URL:
http://sports.groups.yahoo.com/group...ub/message/669


if I hadn't read Randy's previous post, I would have no idea
what you're talking about.

You need to quote relevant information for others to understand
what is going on.

now, on the page you mentioned, there is the following line:
if (window.yzq_a == null) document.write("<scr" +
"ipt type=text/javascript src=http://us.js1.yimg.com/us.yimg.com/lib/bc/bc_1.7.0.js></scr" +
"ipt>");

what this does, it checks if there is an object named yzq_a,
and if not (or is "== null") then write a line to load the file
http://us.js1.yimg.com/us.yimg.com/lib/bc/bc_1.7.0.js.

in that file you will find the following line:

function yzq_a(p,v){var w=window;if(w.yzq1==null)w.yzq1=new Object();var d=w.yzq1;if(p=='a')p+=Math.random();if(d[p]==null)d[p]=v;}

so now window.yzq_a is a function and not "== null" anymore

now on a line further down the page you find something like
if (window.yzq_a)
{
yzq_a('p', 'P=WiSZlkLa[...]'); /* I removed stuff and */
yzq_a('a', '&U=13apl03[...]'); /* replaced it by [...] */
}

this now runs the function with different parameters since the
function is available.
HTH
Sep 24 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.