Wednesday, 18 April 2012

Nugent to meet Secret Service over his Obama words

Rocker Ted Nugent is in the news after a searing attack on President Barack Obama. Here are POLITICO’s top 10 facts you might not have known about Nugent: Has twice been a guest star on “The Simpsons,” appearing on Season 19 and 23 of the show. During an appearance in January, Homer Simpson supported him for the Republican presidential nomination. Is on the National Rifle Association’s Board of Directors, currently serving his sixth three-year term. Hosts “Spirit of the Wild,” a show on the Outdoor Channel that is the six time winner of the Golden Moose Award for programming excellence, including two this year. His early band, the Lourds, were given the chance to open for the Supremes after they won a local battle of the bands contest. Marked his 6,000th concert on the Fourth of July 2008 in his hometown of Detroit. Learned how to hunt with a bow at age five, three years before he started playing the guitar. He remains a frequent practitioner of bow-hunting. Is a national spokesperson for D.A.R.E - Drug Abuse Resistance Education - and an Ambassador for Big Brothers/Big Sisters. 


 The hard rocker says it will be obvious when he talks to agents on Thursday that he didn't make any threats. Nugent spoke to radio interviewer Glenn Beck about the controversy. At last weekend's National Rifle Association convention, Nugent referred to what he called Obama's "evil, America-hating administration" and urged NRA members to "to ride into that battlefield and chop their heads off in November." Nugent also said if Obama were re-elected, "I will either be dead or in jail by this time next year." A Secret Service spokesman confirmed that the agency was following-up on the issue but would not give details.

Panetta apologizes for photos with corpses


US military and civilian leaders have attempted to douse the latest scandal involving US troops in Afghanistan by swiftly condemning photographs which showed paratroopers grinning and posing with insurgents' mangled corpses.


President Barack Obama on Wednesday demanded an investigation and for those responsible to be held accountable, White House spokesman Jay Carney told reporters. "The conduct depicted in those photos is reprehensible."


As part of a wide-ranging damage limitation exercise, US defence secretary Leon Panetta made several apologies. "This is war, and I know war is ugly, and is violent. And I know young people sometimes caught up in the moment make some very foolish decisions," he told a news conference during a Nato meeting in Brussels. "I am not excusing that. My apology is on behalf of the department of defence and the US government … Again, that behaviour is unacceptable."


Panetta said he condemned the behavior, but said, "This is war. I know that war is ugly and it's violent, and I know that young people sometimes caught up in the moment sometimes make very foolish decisions."
The U.S. military image in Afghanistan has been taking a beating in recent months. In January, U.S. Marines were found to have made a video of themselves urinating on Afghan corpses. In February, what the military said was the accidental burning of Qurans triggered violent protests and revenge killings of six Americans. And last month, a U.S. soldier left his base and allegedly killed 17 civilian villagers, mainly women and children.
The Times said that a soldier provided the newspaper with a series of 18 photos of soldiers posing with corpses. The soldier served in Afghanistan with the 82nd Airborne's 4th Brigade Combat Team from Ft. Bragg, N.C., and said the photos point to a breakdown in leadership and discipline that he believed compromised the safety of the troops, the newspaper reported.
Even before the photos were published online, Pentagon press secretary George Little said Panetta "rejects the conduct depicted in these two-year-old photographs."
"Anyone found responsible for this inhuman conduct will be held accountable in accordance with our military justice system," Little said.
The U.S. commander of NATO forces in Afghanistan, Marine Gen. John R. Allen, also criticized the troops. He said there is a strict policy for the handling of enemy remains and it dictates they be processed as humanely as possible.
"The incident depicted in the LA Times' photographs represents a serious error in judgment by several soldiers who have acted out of ignorance and unfamiliarity with U.S. Army values," Allen said, adding that commanders "will collaborate with Afghan authorities and carefully examine the facts and circumstances shown in these photos."
A statement by U.S. Ambassador to Afghanistan Ryan C. Crocker and White House spokesman Jay Carney also condemned the behavior.
"Such actions are morally repugnant, dishonor the sacrifices of hundreds of thousands of U.S. soldiers and civilians who have served with distinction in Afghanistan, and do not represent the core values of the United States or our military," Crocker said.
Little said the military had asked the Los Angeles Times not to publish the photographs. "The danger is that this material could be used by the enemy to incite violence against U.S. and Afghan service members in Afghanistan," he said.
There was no immediate reaction from Afghan authorities.
In its story, the newspaper quoted editor Davan Maharaj saying: "After careful consideration, we decided that publishing a small but representative selection of the photos would fulfill our obligation to readers to report vigorously and impartially on all aspects of the American mission in Afghanistan, including the allegation that the images reflect a breakdown in unit discipline that was endangering U.S. troops."


Many troops take photos — and some take these 'trophy' photos — of their tours of duty on the battlefield. And the practice has harmed war efforts in both recent campaigns in Iraq and Afghanistan.

Monday, 16 April 2012

Introduction to Dynamic HTML


Dynamic HTML (DHTML) is a set of innovative features originally introduced in Microsoft Internet Explorer 4.0. By enabling authors to dynamically change the rendering and content of a Web page as the user interacts with it, DHTML enables authors to create visually compelling Web sites without the overhead of server-side programs or complicated sets of controls to achieve special effects.
With DHTML, you can easily add effects to your pages that previously were difficult to achieve. For example, you can:
Hide content until a given time elapses or the user interacts with the page.
Animate text and images in your document, independently moving each element from any starting point to any ending point, following a predetermined path or one chosen by the user.
Embed a ticker that automatically refreshes its content with the latest news, stock quotes, or other data.
Use a form to capture user input, and then instantly process and respond to that data.
DHTML achieves these effects by modifying the in-memory representation of the current document and automatically reformatting it to show changes. It does not reload the document, load a new document, or require a distant server to generate new content. Instead, it uses the user's computer to calculate and carry out changes. This means a user does not wait for text and data to complete time-consuming roundtrips to and from a server before seeing the results. Furthermore, DHTML does not require additional support from applications or embedded controls to make changes. Typically, DHTML documents are self-contained, using styles and a script to process user input and directly manipulate the HTML elements, attributes, styles, and text of the document.
In short, DHTML eliminates the shortcomings of static pages. You can create innovative Web sites, on the Internet or on an intranet, without having to sacrifice performance for interactivity. Not only does DHTML enhance the user's perception of your documents, it also improves server performance by reducing requests to the server.
The following sections describe DHTML in more detail and how to use it.
Document Object Model
Dynamic Styles
Dynamic Content
Positioning and Animation
Filters and Transitions
Font Download
Data Binding
Summary
Related Topics


Dynamic HTML

 Dynamic HTML, or DHTML, is an umbrella term for a collection of technologies used together to create interactive and animated web sites by using a combination of a static markup language (such as HTML), a client-side scripting language (such as JavaScript), a presentation definition language (such as CSS), and the Document Object Model.
DHTML allows scripting languages to change variables in a web page's definition language, which in turn affects the look and function of otherwise "static" HTML page content, after the page has been fully loaded and during the viewing process. Thus the dynamic characteristic of DHTML is the way it functions while a page is viewed, not in its ability to generate a unique page with each page load.
By contrast, a dynamic web page is a broader concept, covering any web page generated differently for each user, load occurrence, or specific variable values. This includes pages created by client-side scripting, and ones created by server-side scripting (such as PHP, Perl, JSP or ASP.NET) where the web server generates content before sending it to the client.





Document Object Model


Document Object Model (DOM) is a cross-platform and language-independent convention for representing and interacting with objects in HTML, XHTML and XML documents. Objects in the DOM tree may be addressed and manipulated by using methods on the objects. The public interface of a DOM is specified in its application programming interface (API).


JavaScript was released by Netscape Communications in 1996 within Netscape Navigator 2.0. Netscape's competitor, Microsoft, released Internet Explorer 3.0 later the same year with a port of JavaScript called JScript. JavaScript and JScript let web developers create web pages with client-side interactivity. The limited facilities for detecting user-generated events and modifying the HTML document in the first generation of these languages eventually became known as "DOM Level 0" or "Legacy DOM". No independent standard was developed for DOM Level 0, but it was partly described in the specification of HTML4.
Legacy DOM was limited in the kinds of elements that could be accessed. Form, link and image elements could be referenced with a hierarchical name that began with the root document object. A hierarchical name could make use of either the names or the sequential index of the traversed elements. For example, a form input element could be accessed as either 


"document.formName.inputName" or "document.forms[0].elements[0]".
The Legacy DOM enabled client-side form validation and the popular "rollover" effect.