So I was chasing my tail today doing some PHP work (deadline way tight, of course!) only to find out that the bloody weakly typed language allows instantiated a variable because I did not use its global
construct to tell it to use the variable of the same name that is external to the method. Argh!
So yeah, mind your global
s.
Author: yuval
Campbell Select
Campbell Soup, a product I religiously try to avoid, released a new line that aims for the upper crust of, well, the canned soup consumer. Maybe they can crack through the resistence, thinks Campbell, if we launch the product with an actor with a fancy accent.
Enter John Lithgow, not too busy at present, Harvard grad, fancy accent in tow.
All of this would have been in vain, but the copywriters did their job this time complementing Lithgow with a brilliant slogan:
Why settle when you can select?
Is it just me or is that great?
In one of my current assignments, I am working on creating a visual element in JavaScript. This involves dynamic generation of page elements through the page DOM. I attempted to attach the dynamically generated element to the body
element, and then re-positioned it somewhere on the page.
This worked fine in Firefox (common theme, it also follows the DOM event model – while Internet Explorer does not). It did not work fine in Internet Explorer displaying the message:
Internet Explorer cannot open the Internet site http://example.com.
Operation aborted.
Microsoft knows about this and other issues but so far did nothing to correct it.
The solution – based on one mentioned on the afore-linked page – is to not call the DOM method appendChild()
on the body
element. Place an empty div
and append the child elements to it instead.
Yaay hacky!