text:
This is an archived article that was published on sltrib.com in 2013, and information in the article may be outdated. It is provided only for personal research purposes and may not be reprinted.
A prosecutor's job is to convict criminals, get them off the street and into a place where they will do no harm, and, with any luck, change their ways.
But prosecutors also carry a much larger burden: Find the truth. They must pursue that elusive ideal without fear of, or favor toward, the powerful. That mission becomes especially hard when the path points to possible wrongdoing by someone who is supposed to be on the same side of the law as they are.
Salt Lake County District Attorney Sim Gill found himself in that uncomfortable place in 2013. Not once, but twice.
Time will tell how allegations of influence peddling by former Utah Attorney General John Swallow and his predecessor, Mark Shurtleff, develop. Same goes for potential criminal charges in the shooting death of Danielle Willard by West Valley City narcotics detectives, a shooting Gill ruled unjustified.
But in the case of West Valley City, the Salt Lake County prosecutor has pulled back the sheet covering a culture of what could be law enforcement incompetence at best, criminal wrongdoing at worst.
In the wake of the Willard shooting, and the district attorney's dismissal of more than 110 drug cases because of investigative irregularities, the new police chief is taking a hard look at how things have been done in Utah's second largest city, auditing more than 1,300 criminal cases. West Valley City can't help but emerge as a better place to live, visit and do business.
Gill spent the past 12 months asking tough questions to shine a light on two of the biggest Utah stories of 2013, stories about abuses of power.
For that, he is The Salt Lake Tribune's Utahn of the Year.
Sim Gill grew up in Utah, graduating from Kearns High School and the University of Utah before earning a law degree from Lewis and Clark in Portland, Ore.
But his path to a career in law and order started in a small village in India, where, as an 8-year-old, he witnessed a neighbor being wrongly arrested and beaten for stealing jewelry. Gill remembers wondering: Who polices the police?
Ironically, that experience would be used against him when, after a nine-month investigation, he ruled that West Valley City officers were not in personal danger when they shot and killed the unarmed Danielle Willard.
First it was the officers' attorneys who made personal attacks on Gill, but the rhetoric soon turned political when the Salt Lake County GOP chairman proclaimed that the Democratic D.A.'s boyhood experiences had made him soft on criminals. "It might simply be that Sim is a cop hater," Chad Bennion surmised.
Gill's cool response: "At the end of the day, it is the facts and the evidence at hand that drive the situation. Nobody is above the law."
With the Swallow investigation, Gill knowingly entered tricky political water mitigated by the fact that his partner, Davis County Attorney Troy Rawlings, is a Republican and the FBI and the Utah Department of Public Safety are assisting.
Gill and Rawlings are leading one of five investigations of Swallow with allegations involving bribery, extortion and influence peddling. The U.S. Justice Department ended its probe in September, announcing it would not file charges against Swallow or Shurtleff. An inquiry by the lieutenant governor's office determined Swallow committed five election-law violations. But the attorney general's resignation precluded any further action.
A Utah House investigation of Swallow is wrapping up after two days of stunning revelations as special counsel Steve Reich and his investigative team told of Swallow falsifying calendar entries to cover up his relationship with indicted businessman Jeremy Johnson, and that Swallow gave preferential treatment to big campaign donors and went to great lengths to keep those relationships from public scrutiny.
Now, only the investigation by Gill and Rawlings continues, and presumably it will be up to them to follow up on the information ferreted out by the House probe. Two weeks ago they filed charges against a central player in the scandal, Tim Lawson, a close associate of Shurtleff with ties to Swallow as well. Lawson was charged with six felonies, accusing him of tax evasion, retaliating against witnesses, obstruction of justice and a pattern of unlawful activity.
Gill and Rawlings can't say where their investigation will lead. But the fact that charges have been filed shows that a couple of watchdogs are on the case, watchdogs with some teeth.
Sim Gill likely would tell you that what he has done in 2013 is nothing out of the ordinary; he's doing his job. In the past, he has said precisely that when someone attempted a compliment. He knows the job is bigger than he is. He describes his role as a "temporary caretaker" who serves at the will of the public.
"It's never my office," he told Tribune reporter Jennifer Napier-Pearce last week. "It is really your office and you just give me the privilege to tend it for a period of time."
He showed similar deference when asked about sanctioning Salt Lake County marriage certificates in the wake of U.S. District Judge Robert J. Shelby declaring Utah's same-sex ban to be unconstitutional.
Said Gill, moments after advising Salt Lake County Clerk Sherrie Swensen to make licenses available to same-sex couples:
"Our commitment is to the rule of law, our commitment is to making sure the constitutional rights of every citizen in the United States and state of Utah are protected. As of this moment, that means we do not discriminate. If a person stands in line, as a citizen they have a right to apply for that license and we have a responsibility as a public institution to honor their expectation."
Sim Gill is just doing his job.
But it is a very tough job, a very important job one that has profound bearing on how people in power in Utah conduct themselves, one that demonstrates to all that justice will be served for all.
In West Valley City, a young, troubled woman is dead at the hands of police, and scores of alleged drug offenders will not be prosecuted. In the Utah Capitol, the office that stands up for and protects law-abiding citizens is tainted and in question.
And across the state, Utahns watch as investigations led by Sim Gill play out.
Terry Orme is The Tribune's editor and publisher. Reach him at firstname.lastname@example.com.
Online readers vote for Utahn of the Year
Comic Con impresario Dan Farr was the runaway winner with online voters for The Salt Lake Tribune's 2013 Utahn of the Year.
The founder of Salt Lake City's phenomenally successful fan convention attracted almost twice as many votes as the nearest competitor, which were not humans but water-friendly rodents, the so-called "Hero Beavers" whose dams helped keep diesel fuel leaking from a Chevron pipeline from reaching Willard Bay and, potentially, the Great Salt Lake.
The poll, which was posted at sltrib.com in early December, should be considered an unscientific sample of Utahns' opinions. Almost 2,000 votes were cast.
The Tribune's choice for Utahn of the Year, Salt Lake County District Attorney Sim Gill, was a distant third among voters, followed by University of Utah economist and demographer Pam Perlich.
The biggest newsmaker of the year, former Utah Attorney General John Swallow, was low in the voting, behind documentary film producer Geralyn Dreyfous and former Real Salt Lake coach Jason Kreis.
Actor-director Robert Redford, the daughters of convicted murderer Martin MacNeill, Sen. Mike Lee and Utah House Speaker Becky Lockhart came in at the bottom third of the ballot.
In dead last: Glenn Taylor of YouTube and Goblin Valley infamy.
Many readers offered write-in options. Among them: Maryann Martindale, executive director of the Alliance for a Better Utah; Tribune reporters Robert Gehrke and Tom Harvey, who broke and led the way on the Swallow saga; and the plaintiffs who filed suit against Amendment 3 Karen Archer, Kate Call, Derek Kitchen, Moudi Sbeity, Laurie Wood and Kody Partridge. Their fight last week led to Judge Robert Shelby's historic decision making Utah the 18th state to legalize same-sex marriage.
Past Utahns of the Year
2012 • Mormons Building Bridges
2011 • Salt Lake City Police Chief Chris Burbank
2010 • Kidnapping survivor Elizabeth Smart, her mother, Lois, and her sister, Mary Katherine
2009 • Kidnapping survivor Elizabeth Smart
2008 • Utah entrepreneur and philanthropist Larry H. Miller
2007 • First responders to tragedies including the Trolley Square shooting rampage and the Crandall Canyon Mine disaster
2006 • Latino leaders Jorge Fierro, Andrew Valdez, Ruby Chacon and Alma Armendariz
2005 • Pamela Atkinson, advocate for the poor
2004 • Utahns killed in Iraq and Afghanistan
2003 • Gov. Olene Walker
2002 • LDS Church President Gordon B. Hinckley
2001 • 2002 Winter Games organizer Mitt Romney
2000 • Salt Lake City Mayor Rocky Anderson
1999 • The letter that sparked the Olympic bribery scandal
1998 • Mary Ann Kingston, who suffered a brutal beating after escaping plural marriage
1997 • NBA MVP Karl Malone


text:
Not an uncommon story: I was raised Christian, and woke up one day in my teens to discover myself an atheist. Since then, I've been indifferent to Easter, happy or otherwise.
Key, 'historically unimportant' text:
Only bishops may ordain penances for forbidden acts of sexual intercourse, including that with nuns, virgins, Jewesses, Muslim women, or brute animals. Furthermore, Jews must wear a rose on their breasts. They may not appear in public during the Easter season, nor are they to consume meat in public during Lent. Christians must refrain from eating unleavened bread at Passover, living in Jewish homes, frequenting public baths in Jewish company, or receiving medicines from Jewish physicians" (254-55).A depressing record of antisemitism, certainly, but with (at least) two possibilities of something more hopeful:
- First, that per the Jewish Virtual Library, "the bishop of Nîmes, who had authority over the Jews of the town, was nevertheless able to protect them [for a time], even from King Philip IV the Fair who had ordered the imprisonment of several Jews." Which bishop that was, I haven't bothered yet to learn: but his protection, even here in one of the nodes of promulgation for doctrinal antisemitism, should be admired and praised, even as we righteously recall Christianity's own ongoing lachrymose history of intolerance.
- Second, the Synod's decree may be understood as unnecessary: were Christians and Jews really that close? Is the law just an attempt to make known, formally, a separation already in place? Is the law just a self-satisfied repetition of Christian practices already followed? Maybe, yet it may well be a record that Christians and Jews were in fact living in each other's houses; that Christians were joining with Jews to celebrate Passover; that they did this without, however, either Christians or Jews ceasing to be Christians and Jews, and that this therefore might have been a heterotopia. Please reread the last paragraph of Jeffrey's post with this possibility in mind.
Imagining such meals, I am more than happy to acknowledge an offered 'Happy Easter,' or, for that matter, a 'Happy Passover.' Do enjoy your holidays, whatever, wherever, and whenever they are.
(photo from here, itself reprinted from the 3rd of the Washington Post's ongoing peeps contest)

subset: commoncrawl


text:
Cool War — Warm War — Hot War
Part 2
by Paul Weston
The second strand of the cool war is the political/propaganda war, which we are also losing. Whether this is this because our ruling elites are terrified of Islamic aggression, harbour a loathing of the West bordering on the suicidal, or exhibit ignorance verging on the criminally negligent is not completely clear at the present moment, but may yet be discovered at some future Nuremberg style war trials.
As "The Religion Of Peace" bombs, beheads, maims, murders and rapes its way around the globe, the citizens of the West find themselves inhabiting some sort of parallel universe where the daily evidence placed before their eyes is flatly contradicted by their own liberal ruling elites. Western politicians appear to have appraised the situation and made a decision, based on short-term political expediency, to side with an alien culture that promises violence rather than their own indigenous people, who peacefully — to date — accept pretty much anything.
The attempt by Western liberals to portray Islam as the religion of peace is nothing short of pathological. In a sane world this would not be possible, but the West is no longer sane, and this is the message promulgated by our political, media and educational establishments.
The Muslim radicals, acutely aware of what would happen if Christians emigrated en masse to say, Saudi Arabia, and behaved as they themselves do in the West, can only rub their eyes in amazed disbelief at not only what they are able to get away with, but the subsequent debased reaction from their victims, manifested in the cringing appeasement of Western elites as they apologise for their wicked existence and prostrate themselves before Allah.
Prostrate themselves before Allah! What a typical example of reactionary, right wing, racist hysteria the liberal/left will shriek, but how does one explain the following?
When Islamic terrorists blow us up in skyscrapers, trains, metros and buses, the ruling elites immediate response is to ask what wrongs the West must surely have perpetrated in order to attract such animosity. If no particular wrong can be found, our politicians will try to explain it away as the result of poverty and oppression, and should that prove to be false, then some past act of Christian aggression from the 11th century, or the full moon, or Europe's dreary weather, or anything, simply anything, save the one simple, unpalatable truth: Jihad for the sake of Allah in pursuit of the Global Caliphate.
After 9/11, the FBI asked the terrorist linked Council on American-Islamic Relations (CAIR) to provide "sensitivity training" for their agents, whilst in the wake of the 7/7 transport bombings in London, leaders from the Muslim Brotherhood were asked to help draft the new anti-terror laws, which included the notification of Muslim communities prior to any police raids, the requirement by the police to remove their shoes and socks before entering a Muslim house, times when they could and could not carry out said raids, and the stipulation that police dogs were strictly "canina non grata."
In France, the Muslim street riots of 2005 led to French politicians promising more money for the banlieus and agreeing to turn a blind eye to the Sharia courts, the honour killings and the polygamy carried out within them. In Belgium, native socialist sympathisers have allied themselves with Islam and now politically dominate Brussels, where they use this political clout to ban demonstrations protesting Islam's growing political control in Europe.
In Holland, 2006, the Dutch justice minister, Piet Hein Donner had no objection to Sharia law being imposed, providing it was done democratically, and in Sweden, integration minister Jens Orback declared: "We must be open and tolerant towards Islam and Muslims because when we become a minority, they will be so towards us."
In Spain the Madrid train bombings ushered in a new era of dhimmified government more in tune with Islam's demands and in Britain, after yet another transit bombing by the religion of peace, Hazel Blears, the Home Office Minister, immediately set up a committee to advise and "reassure" Muslims on the "Islamophobic" backlash (which never materialised) and said: "What we have discussed today is the need to teach the true nature of Islam, which is about peace and love."
- - - - - - - - -
The legislation emanating from the European Court Of Human Rights has meant terrorists wanted for questioning in Egypt and Syria are allowed to remain free in Britain, lest they be tortured if their extradition were granted, whilst Oriana Fallaci, whose passionate love for Italy and democracy was proven in her resistance against Mussolini's fascist state, was forced to die in exile in America, even as the Italian courts pressed for her extradition to face charges contravening EU laws on racism and xenophobia.
Her crime? She wrote two deeply moving books, The Rage And The Pride and The Force of Reason, lamenting the death of her beloved Italy and its replacement by resurgent Islam. If she had sought refuge in any EU country, she would have been forcibly extradited by Europol under another new EU law, The European Arrest Warrant, and tried by Eurojust, who along with Europol now possess powers that override those of nation states; their personnel are also covered by diplomatic immunity. These people were not fit to wait on her table; the idea that she had to flee them is obscene.
When Jewish graveyards were desecrated in France and Germany a few years ago, the EU commissioned a report, assuming it was the work of the Neo-Nazi "right". When it turned out, all too predictably, to be the work of the followers of Mohammed, the report was quietly shelved and replaced with one six months later, exonerating the Muslims. Or to use Oriana Fallaci's words, "the sons of Allah."
When investigations (Daily Mail, 23 Nov 2005. No link) suggested that some 2,000 young Muslims — annually — attend terrorist training camps in Britain for unarmed combat training, the politicians and media tell us that it is only a tiny minority of Muslims who wish us harm, a lie countered by Daniel Pipes who has a web page devoted to surveys revealing the true extent of support for radical Islam. The politicians and the media, who prefer to call Pipes an extremist, ignore this site.
The manipulative tactics of EU politicians do not stop at mere misrepresentation; they also use their new laws to curtail free speech. The rights of Freedom of Assembly, and Freedom of Expression, as ordained by the EU, do not hold up to close inspection. The attempt to hold a demonstration in Brussels on 9/11 2007 was thwarted lest our freedom of expression interfere with Islam's freedom not hear it. Terry Davis, the socialist Secretary General of The Council of Europe, put out the following press release:
It is very important to remember that the freedom of assembly and expression can be restricted to protect the rights and freedoms of others, including the freedom of thought, conscience and religion. This applies to everyone in Europe including the millions of Europeans of Islamic faith, who were the main target of today's shameful display of bigotry and intolerance."
One cannot pick and choose freedom of speech, it either exists, in which case one lives in a democracy, or it does not, and one does not. Islam is not simply a religion; it is also a political ideology. The EU has therefore made the protest of a political movement illegal. This is totalitarianism.
When Nick Griffin of the BNP predicted — before the London transport bombings of 7/7 — that Britain would be attacked, that the terrorists would be home grown "British boys" and that Islam was a "wicked, vicious faith," he was prosecuted and tried not once but twice, in an attempt to jail him for inciting racial hatred. When he was found not guilty, the government's response, at the behest of Muslim leaders, was to bring in a new law, The Racial and Religious Hatred Act under which they could be more confident of jailing him the next time he correctly predicted a terrorist attack and accused Islam of being wicked and nasty.
Contrast this with the surreal antics of the British police when radical imams were exposed calling for the overthrow of the West in Channel 4's undercover dispatches program. The immediate response of the police was not to prosecute the imams for sedition and incitement to racial hatred, but the makers of the program themselves! By drawing attention to genuine racial and religious hatred, Channel 4 was accused of inciting racial hatred. This is more than merely bizarre; this is insane.
To date, not one of the Islamic preachers has been tried and prosecuted, despite calling for the murder of Jews and homosexuals, the beating of women and the subjugation of the infidel kuffar. A BNP member calling for the death of "niggers" would quite rightly be arrested and prosecuted, whilst I, as a white European Christian "kafir," can be abused in a similar vein with impunity. This situation is fast becoming intolerable.
When Muslim radicals see this craven appeasement they become, quite naturally, emboldened. Despite being a significant minority, they are aware that they can punch well above their weight, which in Britain now means pushing for Sharia schools and a semi Sharia state.
In February 2007, The Muslim Council of Britain (MCB) issued a 72-page manifesto demanding that British schools adopt Islamic guidelines. These included pretty much everything you would expect of a school in Saudi Arabia, including veils for ALL female students, full-length swimming costumes for boys, and separate wash areas for Muslims. The report, which was available at the MCB website has since mysteriously disappeared.
Dr Bari, the Secretary General of the MCB, also thinks the British should adopt arranged marriage, recruit 3,000 Muslim policemen in London to "restore trust," attend Muslim institutions, stop drinking and gambling and accept Muslim dress codes, saying: "That is another thing the British should learn from us, modesty is attractive."
If Europeans try to resist further Muslim immigration, they are liable to fall foul of being labelled xenophobic, which under EU laws can carry a prison term of up to three years. If the native British resist the MCB's ongoing Islamisation of their country then they could, in Bari's words, only be compared to Nazi Germany. In other words: Peace On Our Terms, as prescribed by Islam and the EU.
Hizb ut-Tahrir, the Islamic movement banned in Middle-Eastern countries and dedicated to bringing about a global Islamic Caliphate, was supposed to be banned by the British government in the wake of the 7/7 bombings. It has not, and one if its leaders actually works in the Home Office's Immigration and Nationality Directorate. Needless to say, membership of the BNP would preclude you from such a position.
Whilst we are busy denying our culture, Islam is busy promoting theirs. If they run into difficulties, a simple accusation of racism tends to make any potential resistance disappear, whilst our appeasement, increasingly mandated by legal requirement, is one part of our culture that Islam has no problem interacting with. The result of their aggression, combined with their tactical awareness of how to use our appeasing liberalism against ourselves, has bought them a great many political concessions, where our culture and our civilisation are forced to bow to theirs.
Halal food is served in many public institutions, swimming baths have Muslim only sessions, crosses are removed from public areas, Christmas is downplayed lest it upset Muslim sensibilities, the Holocaust is dropped from school curricula, as it opposes the Holocaust denial that Muslim children are taught at home and in the mosques. The police drastically lower their entry standards in order to fill racial quotas and then stand idly by as street preaching imams promote death and destruction to the West, spurred into activity on occasion only to arrest members of the native population who heckle or attempt to take photographs.
The EU passes laws criminalizing the indigenous population if they speak out, backed up by national governments that do the same. The police arrest us on the slightest pretext, yet ignore genuine hatred emanating from Islamic preachers, and our politicians appear to have tacitly accepted that peace can only be bought off via our appeasement. Living in Europe is becoming a wholly surreal experience that defies logic and reason as we slowly sink into state-enforced Dhimmitude.
The various councils, parliaments, brotherhoods and associations, all prefixed by "Muslim" are driven more by political ambition than religious empathy, and their advance is both remorseless and relentless. The political parties representing the indigenous peoples of the West are retreating, apologising, appeasing and betraying. We are not just losing the political war. We are being annihilated.
To be continued in part three: The Propaganda War.


text:
10 Types of Women to Stop Dating. #1 is an Absolute Must.
Be on the lookout for these women on the prowl. They might look appealing, but they'll make your life a living hell. This collection of 10 Types of Women to Stop Dating represents ladies who will put your interests on the back burner in order to bleed you dry, whether it be emotionally, attentively or economically. Here at GuySpeed, we're all about treating the ladies right, but there is always the question of how far we must go in order to do that. While nobody is perfect, there are certain traits in females that are telltale signs that you shouldn't stay. Be prepared for selfish divas, crazy chicks and an important lesson on happiness with the list below.
- 10
The Attention Whore
Having a Personality Doesn't Mean Hogging the SpotlightTo start off our list, we have the lady who always demands the spotlight. Every single thing this girl does happens to turn into a scene. She talks loud, her arms flail when she speaks, she dresses provocatively for the sake of having everyone's eyes on her and her stories are nothing but unbelievable, over-the-top lies. These ladies will exhaust you and will always demand your full attention. Relationships should be about honesty and compromise, and you won't get much of it here - if they act like that in public, who knows what they'll demand when it's just you two. Having a personality or being chatty is one thing, but demanding everyone's focus at every possible moment is a completely different story.
- 9
The Spoiled Brat
Good Luck CompromisingThese were the type of girls you hated throughout your whole life. As a kid, they were raised to be selfish. In high school, they were stuck up. As an adult, they think everything should go their way no matter what. They might look good, but these self-proclaimed princesses will have nonsensical expectations from the get-go. The spoiled brat will always want things to go her way no matter what. You will always find yourself running in circles desperately trying to accommodate every ridiculous demand this girl may have, no matter how trivial.
- 8
The Insecure
Confidence is a Must for Both PartiesSure, we might be very judgmental on a woman's body and this might lead to ladies questioning themselves as to how they appeal to us. But we assure you, there's a difference between that and being insecure. A girl who is very insecure about herself may never end up fully trusting you. This can lead to control issues and her thinking that you're going to cheat on her or leave her to the point where she'll try to dominate your social interactions. Even worse, she might end up invading your privacy (going through your text messages, Facebook, etc. when you're not looking) just to make sure you're not talking to other females.
- 7
The Hulk
Always Angry and Bitter is a Bad SignIt doesn't matter what originally inspired these women to always be angry, but for some reason they can't turn it off, which looks so ugly in the long run. Just because a woman got screwed over or jaded by another guy somewhere in her past doesn't mean that you have to deal with her defenses being cranked to the absolute maximum. Even if these ladies are amazing in bed, that doesn't excuse her bitterness and anger towards the outside world. Many of times, this gets directed at you, especially if you are the guy she is most comfortable with. She could even be nice at times, but these women hold grudges and will remember every small, unintentional mistake you will ever make and will proceed to rub it in your face in every argument at the drop of a hat.
- 6
The Rebound
Only an Alley-Opp at BestHave you just gotten over a fairly serious breakup? Perhaps your last girlfriend cheated on you. Nevertheless, never settle on the rebound girl. Getting over a girl you parted ways on bad terms with usually ends up with you looking for the nearest female who either is the exact opposite of your ex or is way outside of what you normally go for. While we're all for diversifying our female conquests, a rebound girl usually results in you ending up with one of these other types of undesirable girls on this list. Either that or you end up sacrificing logic for the sake of finding a good lay. Give yourself time to breath and don't just look for a substitute girl.
- 5
The Bimbo
Yes, Her Brain MattersThis girl is gorgeous and sexy but the second she opens her mouth and you hear a marbled, incoherent mess, you'll realize it was all just a front. These are the girls who end up dominating conversations with you simply for the fact that you have nothing to say in response. If you find yourself simply smiling at most of the things she says out of common courtesy without ever saying anything requiring thought in response, she isn't a keeper. Any sort of long-term connection to these girls should come with a dire warning - prepare to facepalm. It might be cute at first, but when it comes to her opinions and rationales about serious things in your relationship or future, you will find yourself losing interest very fast.
- 4
The Gold Digger / Material Girl
Don't Go Bankrupt on a Broad You Just MetYou already know who she is. She's the girl who asks what your job is and what kind of car you drive just minutes into your first conversation. She'll look for your watch and either comment on it or ask what brand is it, just to judge you. Relationships are more than just buying stuff and girls should be interested in other things than what brands you wear. These girls know their way around, and will determine whether or not your bank account is the correct combination into getting into her panties right off the bat. Again, these girls could be a great one night stand, just don't expect that Pabst is tonight's menu.
- 3
The Psycho
Lines Need to be DrawnThis is the girl who will never let you breathe. She will try to command every aspect of your life until you find yourself caught in her maze, struggling to get out. These ladies are tornadoes of chaos, she's the one who will break your video game system for playing it in her presence or will start throwing the nearest object just for being pissed off. These women cannot control their emotions and will simply use them as fuel to absolutely ruin your life. Even worse, the psycho will utilize many aspects of the other avoidable types on this list in order to get their way. For example, they'll act like a bimbo in regards to things they want to hide. Or they're an attention whore to the point where they'll become belligerently angry for you not spoiling her and grovelling at her feet. If you hear from a friend that a girl you want to talk to is a psycho, do yourself a favor - move on.
- 2
The Savior
Find Happiness in Yourself Before Finding It in a WomanTake notes fellas, if you're depressed, sad or lonely, many of times finding a female will only make things worse. If you're not happy with who you are on the inside, you won't be happy in a long-term relationship with anyone else either. You have to create stability in your own life before you can share that with someone else. If you're sad that you can't land a girl that you want, just remember that women like confidence. And if you've gotta fake that confidence, you're going into the world of women with the wrong mindset, which makes you prey to these avoidable types we're trying to warn you about. It sounds sappy, but finding love isn't the answer if you can't love yourself. How can you make some smokin' hot chick happy if you can't make yourself happy first?
- 1
The Transformer
Don't Change Yourself for a GirlAt the top of our list of 10 Types of Women to Stop Dating, we have the most controlling and manipulative of all. The premise of a relationship is absolutely simple: a girl should like you for who you are, and vice versa. If you find that your girl is constantly trying to change your life, something is wrong. Unless she's trying to ween you off of a meth addiction, inspire you to get a better job or convincing you to hit the gym every once in a while, a girl trying to change who you are is usually a bad sign. It means that she sort of likes you, but she's trying to mold you into what she personally wants. If you're not what she likes, she shouldn't try to force her expectations onto you. Never go out with a girl who treats you like her son (you can't spell smothering without mothering). Like the savior type, a woman should like you for you, and you shouldn't rely on the ideals of another person who doesn't even fully like you in order to decide how you live your life.


text:
I've seen a variety of mumbled pre-announcements, second hand announcements, and outright rumours over the last couple of days. I thought I'd collect them here, and see if anyone wanted to confirm, deny, or add some more.
- There's more autotest functionality on the horizon, after a refactoring
- It looks like ZenTest will be supporting Behavior Driven Development (BDD) and rspec soon
- Wrox is looking into entering the Ruby on Rails book fray with at least a couple of titles
- Canada on Rails went well enough that there will probably be a European Country on Rails Conference this year
- A group of Michigan based groups are putting together a Michigan Ruby Conference for late this summer or early this fall.
I'm looking forward to seeing these come to pass. I thnk they'd all be good things for the Ruby community.


text: Paula, Kim Kanye, Edward and Putin, I am sick of you. I'm sick of hearing about you, viewing your pictures and listening to the talking heads regurgitate your idiocies and criminal acts. We're through! As a member of a civilized society I will worry about losing what little sanity I have left by way of a comfy book store that offers the mind a respectable respite and the soul a place to dream. I'm going to spend a couple of hours sitting at my favorite B & N perusing the crisp pages of promise. No doubt, the privilege won't be here forever.


text:
John Describes Jesus As Son of God or Messiah Home > Historical Sources Describe Jesus > Eyewitnesses Describe Jesus > John Describes Jesus > John Describes Jesus As Son of God or Messiah |
My Workspace
"No one has ever seen God. It is God the only Son, who is close to the Father's heart, who has made him known." ( John 1:18) "Who is the liar but the one who denies that Jesus is the Christ? This is the antichrist, the one who denies the Father and the Son. No one who denies the Son has the Father; everyone who confesses the Son has the Father also. Let what you heard from the beginning abide in you. If what you heard from the beginning abides in you, then you will abide in the Son and in the Father." ( 1 John 2:22-24) "The Son of God was revealed for this purpose, to destroy the works of the devil." ( 1 John 3:8) "And this is his commandment, that we should believe in the name of his Son Jesus Christ and love one another, just as he has commanded us." ( 1 John 3:23) "Everyone who believes that Jesus is the Christ has been born of God, and everyone who loves the parent loves the child Who is it that conquers the world but the one who believes that Jesus is the Son of God?" ( 1 John 5:1-5) And we know that the Son of God has come and has given us understanding so that we may know him who is true; and we are in him who is true, in his Son Jesus Christ. He is the true God and eternal life. ( 1 John 5:20) |


text:
Memento Pattern
Author: Deron Eriksson
Description: This Java tutorial describes the memento pattern, a behavioral object pattern.
Tutorial created using:
Windows Vista || JDK 1.6.0_11 || Eclipse JEE Ganymede SR1 (Eclipse 3.4.1)
The memento pattern is a behavioral design pattern. The memento pattern is used to store an object's state so that this state can be restored at a later point. The saved state data in the memento object is not accessible outside of the object to be saved and restored. This protects the integrity of the saved state data. In this pattern, an Originator class represents the object whose state we would like to save. A Memento class represents an object to store the state of the Originator. The Memento class is typically a private inner class of the Originator. As a result, the Originator has access to the fields of the memento, but outside classes do not have access to these fields. This means that state information can be transferred between the Memento and the Originator within the Originator class, but outside classes do not have access to the state data stored in the Memento. The memento pattern also utilizes a Caretaker class. This is the object that is responsible for storing and restoring the Originator's state via a Memento object. Since the Memento is a private inner class, the Memento class type is not visible to the Caretaker. As a result, the Memento object needs to be stored as an Object within the Caretaker. Now, let's look at an example. The DietInfo class is our Originator class. We'd like to be able to save and restore its state. It contains 3 fields: a dieter name field, the day number of the diet, and the weight of the dieter on the specified day of the diet. This class contains a private inner class called Memento. This is our Memento class that is used to save the state of DietInfo. Memento has 3 fields representing the dieter name, the day number, and the weight of the dieter. Notice the save() method of DietInfo. This creates and returns a Memento object. This returned Memento object gets stored by the caretaker. Note that DietInfo.Memento is not visible, so the caretaker can't reference DietInfo.Memento. Instead, it stores the reference as an Object. The restore() method of DietInfo is used to restore the state of the DietInfo. The caretaker passes in the Memento (as an Object). The memento is cast to a Memento object and then the DietInfo object's state is restored by copying over the values from the memento. DietInfo.javapackage com.cakes; // originator - object whose state we want to save public class DietInfo { String personName; int dayNumber; int weight; public DietInfo(String personName, int dayNumber, int weight) { this.personName = personName; this.dayNumber = dayNumber; this.weight = weight; } public String toString() { return "Name: " + personName + ", day number: " + dayNumber + ", weight: " + weight; } public void setDayNumberAndWeight(int dayNumber, int weight) { this.dayNumber = dayNumber; this.weight = weight; } public Memento save() { return new Memento(personName, dayNumber, weight); } public void restore(Object objMemento) { Memento memento = (Memento) objMemento; personName = memento.mementoPersonName; dayNumber = memento.mementoDayNumber; weight = memento.mementoWeight; } // memento - object that stores the saved state of the originator private class Memento { String mementoPersonName; int mementoDayNumber; int mementoWeight; public Memento(String personName, int dayNumber, int weight) { mementoPersonName = personName; mementoDayNumber = dayNumber; mementoWeight = weight; } } } DietInfoCaretaker is the caretaker class that is used to store the state (ie, the memento) of a DietInfo object (ie, the originator). The memento is stored as an object since DietInfo.Memento is not visible to the caretaker. This protects the integrity of the data stored in the Memento object. The caretaker's saveState() method saves the state of the DietInfo object. The caretaker's restoreState() method restores the state of the DietInfo object. DietInfoCaretaker.javapackage com.cakes; // caretaker - saves and restores a DietInfo object's state via a memento // note that DietInfo.Memento isn't visible to the caretaker so we need to cast the memento to Object public class DietInfoCaretaker { Object objMemento; public void saveState(DietInfo dietInfo) { objMemento = dietInfo.save(); } public void restoreState(DietInfo dietInfo) { dietInfo.restore(objMemento); } } (Continued on page 2) Related Tutorials:


text:
You'll want to save this one for the upcoming holidays!
"This is an heirloom recipe made by many members of my family. It can be made ahead of the holidays and the balls frozen. One less job at the end. We always formed the stuffing into balls so they were easy to serve individually, easy to grab a cold stuffing ball as leftovers. My Grandma made extra to freeze and use for stuffed chicken breasts later. Grandma always said to try and get a little bit (a speck) of poultry seasoning on each piece of bread. If you like to stuff a bird with it, just place the stuffing balls in the cavity loosely." ~charlie #5
2 loaves white bread
2 eggs
1 cup milk
1 cup water
1/4 cup butter
2 stalks celery, chopped
1 large onion, chopped
1 small green pepper, chopped (optional)
salt, to taste
pepper, to taste
1/4 cup fresh parsley, chopped
2 teaspoons ground sage
1 1/2-2 teaspoons poultry seasoning
Turkey broth
Open the loaves of bread and allow the bread to get stale for a day.
Tear the bread into 1-1/2″ pieces including the crusts.
Beat the eggs with the milk and water; sparingly, drizzle this mixture over the bread and mix it in just to moisten.
Saute the celery, onions, and green pepper in the butter until translucent. Salt and pepper to taste.
Add the warm celery and butter mixture to the bread.
Add the parsley and sprinkle in a little rubbed sage.
Cover lightly with poultry seasoning.
Gently toss with your hands.
Gently push the stuffing mixture into the corner of your mixing pan and allow to sit for 30 minutes to absorb the liquid in the bread.
Form the stuffing into small balls similar to a baseball.
You may freeze the balls at this point by arranging on a baking sheet and flash freezing.
When frozen, place stuffing balls in the bread bag wrappers.
When ready to bake, place balls in a 9 x 13 inch pan with about 1/4″ hot broth in the bottom of the pan.
You can bake them frozen or defrosted, adjust your time accordingly.
Bake at 350 degrees Fahrenheit for about 30 minutes, basting a few times until browned.
Source : allrecipes.com
Sharing the recipe is simple, click the f button below to share it with your friends. To print the recipe please click the green printer icon.


text:
Safety, Health And Environment
INEOS takes its responsibility for the environment very seriously and is fully committed to delivering a record of responsible environmental performance across all its operations. We continually strive to meet and exceed strict safety, health and environmental performance targets and are committed to continuous improvement in all aspects of our operations. Excellence in safety, health and environmental performance is our top priority and we are open and honest about such performance, which we publish locally and nationally, as required.
INEOS operates to strict regulations that are set by the national environment agencies of the countries in which we operate. We are committed to ensuring that our facilities have as low an impact as possible on local people and the environment and we continue to work in close partnership with community groups and other stakeholders to ensure that we are a responsible neighbour.


text:
Help! Randy Houser Is Having Major Baby Troubles
Randy Houser isn't afraid to admit he forgot how difficult raising a baby can be. The "No Stone Unturned" singer and his wife Tatiana are in the thick of many of the newborn problems parents often have, and he doesn't pretend to have all the answers.
When Taste of Country Nights host Evan Paul asks Houser if the couple want to have more children, the singer smiles a terrified kind of smile, scratches his cheek and musters, "Let's just get this one sleeping first. He's a mess." It's a familiar look and sentiment to any mother or father who can remember life with an 8-week-old.
Huckleberry Randolph Houser was born on June 9. The baby is Houser's first with Tatiana, but he has a 7-year-old son named West from his first marriage.
"He has reflux, you know," Houser says of baby Huck. "He eats and the (bleh). And it burns, you know?"
Tatiana Houser breast feeds baby Huckleberry, which Randy has nothing but praise for. "But she has to really watch what she eats to make sure it's not something that aggravating there," he says. "What it boils down to is just some babies have reflux."
The 43-year-old Houser is a hands-on father when he's at home. The process of carrying and giving birth to a child has pushed him to see his wife of three years in a whole new light.
"My wife is tough," he says. "I knew she was tough, but she's amazingly tough. I mean not just in her pregnancy but her childbirth and so far — and this is in all honesty, this is the reality of what we do — until this past Thursday I've been home three nights in four weeks, and she understands that and knows I have to go out and make a living for our family. She just, on zero sleep, has continued to kill it."
Watch Houser's full interview above. The baby talk starts at the very beginning, after which he talks about the origin of his new single, how the FBI contacted him after a particularly aggressive Twitter imposter swindled money from a fan and his new Magnolia film and album.
We Think Randy Houser Fans Will Love Riley Green:
Here Are the Top 10 Randy Houser Songs:


text:
5.47 Oz. 100% Polyester. Personalized all-over print T-shirt for women.
Light weight and soft, comfortable and breathable.
Taped neck and shoulders for comfort and style. The collar is not customizable.
Each panel is cut and sewn together to ensure a flawless graphic. Its details will elevate your wardrobe year round.
Easy to clean and dry.
Sizes: XS, S, M, L, XL, XXL, XXXL.
Please calculate your size from the measurement chart below.


text:
Free shipping within India | Free international shipping on orders over Rs. 25,000
Made in Banaras. Made by Tilfi.
About Us
Spirit of Creations
Simple yet classic. An elegantly woven satin silk saree that is perfect for any occasion. A mesmerising silken weave with a beautiful and unfussy Kadhua border and aanchal.
Since this product is handwoven, there might be slight irregularities. But don't you think these add to the singular charm of a handloom beauty?
We ship orders all across India and the world.
Subscribe to keep in touch with us.


text:
"Be like water making its way through cracks. Do not be assertive, but adjust to the object, and you shall find a way around or through it. If nothing within you stays rigid, outward things will disclose themselves. Empty your mind, be formless. Shapeless, like water. If you put water into a cup, it becomes the cup. You put water into a bottle and it becomes the bottle. You put it in a teapot, it becomes the teapot. Now, water can flow or it can crash. Be water, my friend."
"The warrior learns of the spiritual realm by dwelling on the cutting edge of the sword, standing at the edge of the fire pit, venturing right up to the edge of starvation if necessary. Vibrant and intense living is the warrior's form of worship."
"I dislike death, however, there are some things I dislike more than death. Therefore, there are times when I will not avoid danger."
"I fear not the man who has practiced 10,000 kicks once, but I fear the man who has practiced one kick 10,000 times."
"Everyone has a plan until they've been hit."
"The best fighter is never angry."
"Use only that which works, and take it from any place you can find it."
"The historic beauty of BJJ rests not with its ability to allow a smaller man to maim a larger man, but with its ability to allow any man of any size to survive."
"Never interrupt your enemy when he is making a mistake."
"Don't hit at all if it is honorably possible to avoid hitting; but never hit softly."
"A warrior may choose pacifism; others are condemned to it."
"To win the battle is to be prepared to die."
"Where there is only a choice between cowardice and violence, I would advise violence."


text:
Create awesome lock screen backgrounds with Imagefusion
Imagefusion is an interesting app, enabling you to create images for the lock screen background from local libraries. If you've used media players in the past where a collage of images are displayed from multiple artist albums, this is the same affect but with images you choose. The end result can be quite something and best of all: it's free and really simple to use.
Multiple sources can be used, including the profile pictures of contacts stored on the Windows Phone (Hello Friends?), album covers from the local music library (see above note about similar examples used externally) and photos from the local library. Images are loaded and tiled on the lockscreen to produce a collage of images that matter to you, adding a personalised touch to the first screen displayed when turning on the device.
Recently updated to version 2.0, Imagefusion now sports an image picker to let you pick the exact images you want in your lock screen background. A new "accent tint" effect has also been added to provide a lock screen tint to match the phone accent colour. It's the little touches like this that really make the difference.
As noted above, Imagefusion is free and also sports zero advertising so the experience is both clean and clutter-free (you are encouraged to rate the app though, if you like it or even donate via the about screen). A total of six image effects can be added to the chosen collection of items, including black & white, polaroid, sepia, negative and accent tint. Images can be shuffled once selected to create a unique, random affect and it's possible to preview the end result before applying it to the live environment.
Once done, you can save the result for further use externally, or directly apply the new lockscreen background from within Imagefusion. More filters are stated to be on the way, so be on the look out for future updates that include more choice. We've given it a go and can safely recommend the app, especially if you're looking at more ways to personalise your Windows Phone.
You can download Imagefusion from the Windows Phone Store (available for free - Windows Phone 8 only).
Get the Windows Central Newsletter
All the latest news, reviews, and guides for Windows and Xbox diehards.
Rich Edmonds was formerly a Senior Editor of PC hardware at Windows Central, covering everything related to PC components and NAS. He's been involved in technology for more than a decade and knows a thing or two about the magic inside a PC chassis. You can follow him on Twitter at @RichEdmonds.


text:
Elder Stoddard
Elder Matthew Stoddard will return to the local area July 24 after serving in the Australia-Perth Mission for the Church of Jesus Christ of Latter-day Saints.
Elder Stoddard will speak July 28 at 11 a.m. at the Huntington 1st LDS Ward. The ward chapel is located at 115 South in Huntington.
He is the son of Willie and Patsy Stoddard of Huntington.


text:
All Barton products and purchases carry a full 365-day satisfaction guarantee.
Each band includes two integrated stainless steel 22mm quick release spring bars (pins).
Our Sailcloth Quick Release watch straps feature padding for comfort, a 316L surgical grade brushed stainless steel buckle and a 2mm taper from watch head to buckle. Designed with a premium nylon sailcloth weave, these straps are up for almost any challenge. If you do encounter a fit issue, we offer a money back guarantee. Swap out in just a few seconds and without tools! Read more about the design features here.
Additional resources
All Zenwatch Bands | FAQ | Guarantee
Shipping calculated at checkout.


text:
3 Beeswax Food Wraps: Red Gingham
One 6" X 6" good for jars and cans
One 9" X 9" good for bowls, snacks, and sandwiches
One 11" X 11" good for large bowls, plates, bread, and melons
Wash wrap with cold water and soap. Wraps last approximately one year. Keep wrap away from heat.
Cotton fabric is coated in a beeswax, pine resin, coconut oil mixture. The wraps are then dried, and cut to size. These wax wraps are made using zero waste principles, from the ingredients (California beeswax) to biodegradable packaging. Wraps and packaging arrive plastic free.


text:
The Bourne Supremacy
They should have left him alone.
A CIA operation to purchase classified Russian documents is blown by a rival agent, who then shows up in the sleepy seaside village where Bourne and Marie have been living. The pair run for their lives and Bourne, who promised retaliation should anyone from his former life attempt contact, is forced to once again take up his life as a trained assassin to survive.


text:
EN ISO 11611 - Protection against small splashes of molten metal, and brief contact with flame
Replaces EN 470-1. Protective clothing certified according to EN ISO 11611 gives the wearer protection against small splashes of molten metal, and brief contact with flame. The garments certified to this standard are suitable for use in welding and allied processes.
The garment is classified for the protection ability against different levels of welding technology, which cause more or less spatter and radiant heat.
Class 1 - Protects against less hazardous welding techniques and situations, causing lower spatter and radiant heat
Class 2 - Protects against riskier welding techniques and situations, which causes higher levels of spatter and radiant heat
(A1) Limited flame spread
(A2) Limited flame spread, hemmed specimens


text:
It's not your imagination that rent keeps going up. In fact, across the United States, from the end of summer 2013 to the end of summer 2014 rents increased over six percent … and in some housing markets rents increased by as much as 10%. Perhaps now is the time to make the move to home ownership.
Calculating the cost
There are different costs and benefits associated with owning versus renting, so a simple comparison of monthly payments might lead you to believe one is better over the other. To calculate the real differences, and therefore the real cost or benefit, you need to dig a little deeper. For instance, in this New York Times article, they used a $250,000 home as their example with a 9-year tenure, a 30-year fixed 4.34% loan with a 20% down payment. In addition to these basic costs, they factored in taxes, maintenance and fees (including estimated closing costs). Using the resulting monthly cost of $961, you can determine if buying or renting is better if you can rent a similar home for less than $961 (assuming the rent remains static for the nine years.
You can change the amounts in the calculator by moving the sliders so you can put in your own numbers. Remember, however, that there are extra fees associated with renting too: broker fees, security deposits, renters' insurance and pet fees, among others. Additionally is the potential for rent increases at the end of each lease period.
One benefit of home ownership not taken into account in this model is the potential to reduce your income tax burden. A portion of your mortgage interest may be deductible as well as some of the points and property taxes.
Budgeting for hidden costs
Before buying, talk to us about the additional costs of home ownership. We can help you estimate maintenance expenses such as a new roof or heating and air-conditioning system. When we help you budget for your new house, we can factor in what you'll need to set aside to cover these expenses.
Tax increases, levies for schools, roads and community improvements and other municipal costs can increase even in your first year of home ownership so when calculating what you can afford, add in a little extra for taxes too.
If you purchase a condominium or a home that is part of an association, you can expect association dues to rise annually unless the bylaws stipulate otherwise. Since one of the factors affecting association costs is insurance, expect your dues to increase, or to have a special assessment if your community suffers storm damage or liability costs. In addition, speaking of insurance, your premiums tend to go up each year as well. Consider these extra items as part of your overall housing cost.
Other expenses to figure into your budget:
- Lawn and garden care—including extra water costs if you have large grass and flower areas, equipment and fuel or landscaping services, new plants, mulch and fertilizer
- Insurance deductibles—if a hailstorm damages your roof, your insurance will replace it, but you'll have to come up with the deductible to get the job done
- Liability insurance—as the homeowner, if someone is injured on your property you're responsible. You'll need to make sure your homeowners' insurance includes liability.
We want you to be prepared
Buying a home is a long-term commitment. We want to partner with you to make sure you're able to both keep and enjoy that commitment. Call us today and we'll help you prepare for that move from renting to owning … eyes wide open, so that your purchase remains a lifelong joy.
Compliments of Virtual Results


text:
Mick Jagger: Movie Star? Exploring the Rolling Stones Singer's Film Career
Mick Jagger knows it's only a movie role, but he likes it. Although the Rolling Stones didn't become film stars like their British Invasion rivals the Beatles, the band's singer has long held a fascination with motion pictures. It's more than a mere hobby. Film fans, writers and critics have often commented on how well Jagger's charisma transfers from the rock stage to the silver screen.
The rocker's movie career began with two feature films released in 1970. Ned Kelly had Jagger put on an Irish-Australian brogue to play the famous outlaw – although his turn (and Amish-like beard) weren't received well. He fared much better later that same year in Donald Cammell and Nicolas Roeg's Performance, in which he played a rock star named Turner.
Many expected to see more of Jagger in the movies, but the lead Stone mostly focused on music for the duration of the '70s, appearing only in smaller, artsy projects and one, notable mockumentary. The '80s brought opportunity, but also disappointing failure, when Jagger's supporting part was cut in Werner Herzog's Fitzcarraldo and another planned feature fell apart before shooting commenced.
He made a high-profile return to big screen acting in the 1992 sci-fi flick Freejack, earning modest praise as villain Victor Vacendak (while the Emilio Estevez vehicle was largely derided by moviegoers). The experience seemed to stir his interest in feature films, not only on the acting side, but also as a producer. Jagger gained the best notices of his acting career in the indie films Bent and The Man From Elysian Fields while working behind the scenes on projects including Enigma, The Women, Get on Up and a few Stones documentaries. He most recently helped bring HBO's cinematic Vinyl to life, with co-producer Martin Scorsese.
But for the above gallery, we're focusing on Jagger's film work in front of the camera – and not as the stage-commanding Stones frontman. Sure, in some of these movies, Jagger plays a famous singer (even one named Mick), but he also becomes an Aussie outlaw, a drag queen, a heartbroken gigolo and a bank employee. Guess his time at the London School of Economics really paid off.


text:
Free Shipping within Canada and USA on orders over $150
Vintage Made Modern Jewelry
~ What's Green Bijou all about? We source all over the globe to bring you the best in fashion forward finds!
~ Things I used: • sterling silver smooth ball studs • sterling silver butterfly backings
~ Why You'll Love It: • size, 6mm • lightweight • sit beautifully • shine brightly especially in the light • our sterling silver wires are hypoallergenic and nickel free• perfect for gifting • classic in design, perfect for everyday wear and also for special occasions
Your item will arrive in our signature damask packaging. Depending on the size of the item, it will either come in a beautiful and reusable organza bag or a black gift box with damask tissue. Both options are perfect for gift giving! Each piece comes with a description card indicating what was used in the design.
Looking for something more custom? I have many beautiful authentic and true vintage pieces in my inventory and I would be thrilled to create a custom piece for you! Interested in having a special piece made from your own beautiful treasures? Please feel free to contact me to discuss your wants & needs.
From the moment you place your order, you can rest assured that a beautiful keepsake will be in the works for you or for that special someone. My designs are created in-studio with antiques sourced globally in my travels - it ensures that everything I create is truly unique!


text: A cute little spencer in Merci, a wonderful combination of wool and cotton, for the littles ones. Ava can be worn either with a little bodystocking and bare legs, or with little tights and a long-sleeved top. If the suspenders are knitted extra-long, all you have to do is move the buttons to extend the use of the romper.


text:
Acton figure
Stock California is a toy store located in Los Angeles. We have the toys and games that will make a difference in a child's life. Explore a collection of unique toys, best gift ideas for all occasions in our physical stores located in Glendale and Sun Valley. At our locations, we carry a comprehensive selection of well-chosen toys and gifts for children of all ages. We have toys of well-known brands such as Fisher-Price, Melissa and Dough, Mattel, Cobi, Crayola.


text:
Version 32.2, Updated 2010-10-08, by Garrett Smith
This is the comp.lang.javascript meta-FAQ, 32.2. The latest version is available at http://jibbering.com/faq/ in HTML form.
Each day, one section of the FAQ is posted for review and questions, and as a reminder that the FAQ is available.
For additional explanation and detail relating to some aspects of the FAQ, please see the FAQ Notes. It has been provided separately to avoid increasing the size of the FAQ to a point where it would be unreasonable to post it to the group.
Code examples in this FAQ use JSDoc Toolkit comments.
The official Big 8 Usenet newsgroup dealing with javascript is comp.lang.javascript. Some "language" hierarchies also have *.comp.lang.javascript groups.
c.l.js is an unmoderated newsgroup.
Javascript and Java are two completely different languages. Java questions should be asked in one of the comp.lang.java.* newsgroups; they are not appropriate for c.l.js (as Java and javascript are distinct programming languages with only superficial similarities due to sharing a C-like syntax and some of the characters in their names).
Questions dealing with other scripting languages, such as VBScript, PerlScript or CGI scripting are also off-topic, as are HTML-only or CSS-only questions.
Questions that are specific to Microsoft's JScript may also be appropriately asked at: microsoft.public.scripting.jscript
The comp.lang.javascript newsgroup charter is included in faq_notes/cljs_charter.html.
Before posting to c.l.js, you should read this document. You should also check the Resources section.
Relevant announcements are welcome, but no more often than once per major release, as a short link to the product's webpage.
This could be for several reasons:
If it is not one of these, then after a few days consider reposting after checking http://groups.google.com/group/comp.lang.javascript/topics for replies. Make sure the post is phrased well, and everything needed to answer is correct, and the subject is appropriate.
ECMA-262 is the international standard that current language implementations (JavaScript™, JScript etc.) are based on.
defines the language Syntax, Types, Keywords, Operators, and built-in
objects. The ECMAScript specification is the reference to determine the
expected behavior of a program. ECMAScript does not define any host
objects, such as document
, window
, or ActiveXObject
ECMA-327 defines the Compact Profile of ECMAScript by describing the features from ECMA 262 that may be omitted in some resource-constrained environments. http://www.ecma-international.org/publications/standards/Ecma-327.htm
The most widely supported edition of ECMA-262 is the 3rd edition (1999). There is fair support for this edition in JScript 5.5+ (buggy) and good support JavaScript 1.5.
The term "javascript" is used as a common name for all dialects of ECMAScript.
JScript is Microsoft's implementation of ECMAScript.
Questions that are specific to Microsoft's JScript may also be appropriately asked at: microsoft.public.scripting.jscript.
Document Object Model (DOM) is a interface-based model for Document
objects. The DOM allows scripts to dynamically access and update a
document's content, style, and event handlers.
The DOM is not part of the ECMAScript programming language.
Official DOM standards are defined by the World Wide Web Consortium.
Scriptable browsers also have
proprietary DOM features (MSDN, MDC),
such as document.writeln()
Also see the section on DOM and Forms.
Internationalisation means using one form which is everywhere both acceptable and understood. Any international standard not supported by default can be coded for.
For example, there is an International Standard for numeric Gregorian date format; but none for decimal and thousands separators.
Localisation is the process of adapting software for a specific region or language by adding locale-specific components and translating text. It cannot work well in general, because it requires a knowledge of all preferences and the ability to choose the right one, in an environment where many systems are inappropriately set anyway.
ECMAScript has a few
localisation features. The various
methods are all implementation dependent,
but tend to use either UK or US settings (not necessarily correctly).
ECMAScript Ed. 3 introduced some capabilities, including the
method which should create a string
based on the host's locale.
ECMAScript 5th Edition introduces limited ISO 8601 capabilities with
and new behavior for Date.parse()
The 5th edition of ECMAScript was approved on 2009-12-04. There is some support in implementations released before approval date (JScript 5.8, JavaScript 1.8, JavaScriptCore). http://www.ecma-international.org/publications/standards/Ecma-262.htm
Most javascript books have been found to contain so many technical errors that consensus recommendations have not emerged from the group.
The following books have been considered to have value by some individuals on c.l.js. The reviews of these books are provided:
No javascript libraries are endorsed by this group. If you want help with using a library, visit that library's discussion group instead.
This is an anonymous FunctionExpression that is called immediately after creation.
Variables declared inside a function are not accessible from outside the function. This can be useful, for example, to hide implementation details or to avoid polluting the global scope.
The term
function statement has been widely and wrongly used to
describe a FunctionDeclaration
. This is misleading because in ECMAScript,
a FunctionDeclaration
is not a
Statement; there are places in a program
where a
Statement is permitted but a FunctionDeclaration
is not. To add
to this confusion, some implementations, notably Mozillas', provide a
syntax extension called
function statement. This is allowed under
section 16 of ECMA-262, Editions 3 and 5.
Example of nonstandard function statement:
// Nonstandard syntax, found in GMail source code. DO NOT USE. try { // FunctionDeclaration not allowed in Block. function Fze(b,a){return b.unselectable=a} /*...*/ } catch(e) { _DumpException(e) }
Code that uses
function statement has three known interpretations. Some
implementations process Fze
as a
Statement, in order. Others, including
JScript, evaluate Fze
upon entering the execution context that it
appears in. Yet others, notably DMDScript and default configuration of BESEN,
throw a SyntaxError
For consistent behavior across implementations, do not use function
statement; use either FunctionExpression
or FunctionDeclaration
Example of FunctionExpression
var Fze; try { Fze = function(b,a){return b.unselectable=a}; /*...*/ } catch(e) { _DumpException(e) }
Example of FunctionDeclaration
// Program code function aa(b,a){return b.unselectable=a}
ISO 8601 defines date and time formats. Some benefits include:
The ISO Extended format for common date is YYYY-MM-DD
, and for time is
For an event with an offset from UTC, use YYYY-MM-DDThh:mm:ss±hh:mm
Never use a local date/time format for a non-local event. Instead, use
UTC, as in YYYY-MM-DDThh:mm:ssZ
is the only letter suffix).
The T
can be omitted where that would not cause ambiguity. For
rfc 3339 compliance, it may be replaced by a space and for SQL,
it must be replaced by a single space.
Year 0000
is unrecognized by some formats (XML Schema, xs:date
A local Date
object where 0 <= year <= 9999
can be
formatted to a common ISO 8601 format YYYY-MM-DD
/** Formats a Date to YYYY-MM-DD (local time), compatible with both * ISO 8601 and ISO/IEC 9075-2:2003 (E) (SQL 'date' type). * @param {Date} dateInRange year 0000 to 9999. * @throws {RangeError} if the year is not in range */ function formatDate(dateInRange) { var year = dateInRange.getFullYear(), isInRange = year >= 0 && year <= 9999, yyyy, mm, dd; if(!isInRange) { throw RangeError("formatDate: year must be 0000-9999"); } yyyy = ("000" + year).slice(-4); mm = ("0" + (dateInRange.getMonth() + 1)).slice(-2); dd = ("0" + (dateInRange.getDate())).slice(-2); return yyyy + "-" + mm + "-" + dd; }
An Extended ISO 8601 local Date format YYYY-MM-DD
can be parsed to a
Date with the following:-
/**Parses string formatted as YYYY-MM-DD to a Date object. * If the supplied string does not match the format, an * invalid Date (value NaN) is returned. * @param {string} dateStringInRange format YYYY-MM-DD, with year in * range of 0000-9999, inclusive. * @return {Date} Date object representing the string. */ function parseISO8601(dateStringInRange) { var isoExp = /^\s*(\d{4})-(\d\d)-(\d\d)\s*$/, date = new Date(NaN), month, parts = isoExp.exec(dateStringInRange); if(parts) { month = +parts[2]; date.setFullYear(parts[1], month - 1, parts[3]); if(month != date.getMonth() + 1) { date.setTime(NaN); } } return date; }
When formatting money for example, to format 6.57634 to 6.58, 6.7 to 6.50, and 6 to 6.00?
Rounding of x.xx5 is unreliable, as most numbers are not represented exactly. See also: Why does simple decimal arithmetic give strange results?
The statement n = Math.round(n * 100)/100
converts n
to a Number
close to a multiple of 0.01
. However, there are some problems.
Converting the number to a string (n + "")
, does not give
trailing zeroes. Rounding numbers that are very close to x.5
, for example,
results 1
ECMA-262 3rd Edition introduced Number.prototype.toFixed
There are bugs in JScript 5.8 and below with certain numbers, for example
incorrectly results 0.00
var numberToFixed = (function() { return toFixedString; function toFixedString(n, digits) { var unsigned = toUnsignedString(Math.abs(n), digits); return (n < 0 ? "-" : "") + unsigned; } function toUnsignedString(m, digits) { var t, s = Math.round(m * Math.pow(10, digits)) + "", start, end; if (/\D/.test(s)) { return "" + m; } s = padLeft(s, 1 + digits, "0"); start = s.substring(0, t = (s.length - digits)); end = s.substring(t); if(end) { end = "." + end; } return start + end; // avoid "0." } /** * @param {string} input: input value converted to string. * @param {number} size: desired length of output. * @param {string} ch: single character to prefix to s. */ function padLeft(input, size, ch) { var s = input + ""; while(s.length < size) { s = ch + s; } return s; } })(); // Test results document.writeln([ "numberToFixed(9e-3, 12) => " + numberToFixed(9e-3, 12), "numberToFixed(1.255, 2) => " + numberToFixed(1.255, 2), "numberToFixed(1.355, 2) => " + numberToFixed(1.355, 2), "numberToFixed(0.1255, 3) => " + numberToFixed(0.1255, 3), "numberToFixed(0.07, 2) => " + numberToFixed(0.07, 2), "numberToFixed(0.0000000006, 1) => " + numberToFixed(0.0000000006, 1), "numberToFixed(0.0000000006, 0) => " + numberToFixed(0.0000000006, 0) ].join("\n"));
For example, 5 * 1.015
does not give exactly
and 0.06+0.01
not give exactly 0.07
in javascript.
ECMAScript numbers are represented in binary as IEEE-754 (IEC 559)
Doubles, with a resolution of 53 bits, giving an accuracy of
15-16 decimal digits; integers up to just over 9e15
precise, but few decimal fractions are. Given this, arithmetic
is as exact as possible, but no more. Operations on integers
are exact if the true result and all intermediates are integers
within that range.
In particular, non-integer results should not normally be compared for equality; and non-integer computed results commonly need rounding; see How do I format a Number as a String with exactly 2 decimal places?
Otherwise, use Math.round
on the results of expressions which
should be of integer value.
Method parseInt
generally needs a second parameter, radix
for the base (from 2 to 36).
If radix
is omitted, the base is determined by the contents of
the string. Any string beginning with '0x'
or '0X'
represents a
hexadecimal number. A string beginning with a leading 0 may be parsed as
octal (as if raxix
were 8), in ECMA-262 Ed 3 (octal digits are 0-7
If string '09'
is converted to 0
To force use of a particular base, use the radix
parameter: parseInt("09", base)
Variables are not typed; their values are. The conversion between a string and a number happens automatically.
The addition operator (+
) performs concatenation if either operand is a
string, thus "1" + 1
results "11"
. To perform addition, you might need
to first convert the string to a number. For example +varname
or parseInt(varname, 10)
. Form control values are strings, as is the result
from a prompt
dialog. Convert these to numbers before performing
addition: +'1' + 1
results 2
returns a value R
such that 0 <= R < 1.0
; therefore:
// positive integer expected function getRandomNumber(n) { return Math.floor(n * Math.random()); }
- gives an evenly distributed random integer in the range from
to n - 1
inclusive; use getRandomNumber(n)+1
for 1
to n
A native object is any object whose semantics are fully defined by ECMA-262.
Some native objects are built-in; others, such as user-defined objects, may be constructed during the execution of an ECMAScript program.
// Native built-in objects: var m = Math, // Built-in Math object. slice = Array.prototype.slice, // Built-in native method. o = {}, // Native user-defined object. f = function(){}, // Native user-defined function. d = new Date(), a = [], e = new Error("My Message.");
See also:
A built-in object is any object supplied by an ECMAScript implementation, independent of the host environment, that is present at the start of the execution of an ECMAScript program.
ECMA-262 3rd Edition defines the following built-in objects:
ECMA-262 Edition 5 defines also the built-in object JSON
built-in objects may include RuntimeObject
, CollectGarbage
, and more.
A host object is any object supplied by the host environment to complete the execution environment of ECMAScript.
A host object is not part of the ECMAScript implementation, but is exposed to the ECMAScript implementation.
A host object may be implemented as a native ECMAScript object, however this is not required. For example, Internet Explorer implements many scriptable DOM objects as ActiveX Objects, often resulting in unexpected errors.
Availability and behavior of a host object depends on the host environment.
For example, in a browser, XMLHttpRequest
might be available, with or
without standard or proprietary features or events. Windows Script Host object model
has the WScript
object available.
For information on a particular host object, consult the pertinent documentation available for the implementation(s). For web browsers, this usually includes the w3c specifications as well as documentation for that browser. See also:
The eval
function should only be used when it is necessary to
evaluate a string supplied or composed at run-time; the string
can be anything from a simple (but unpredictable) expression such
as "12 * 2.54"
to a substantial piece of javascript code.
When eval( '{"key" : 42}' )
is called, {
is interpreted as a block of
code instead of an object literal. Hence, the Grouping Operator (parentheses)
is used to force eval
to interpret the JSON as an object literal:
eval( '({"key" : 42})' );
There are two ways to access properties: dot notation and square bracket notation. What you are looking for is the square bracket notation in which the dot, and the identifier to its right, are replaced with a set of square brackets containing a string. The value of the string matches the identifier. For example:-
//dot notation var bodyElement = document.body; //square bracket notation, using an expression var bodyElement = document["bo"+"dy"];
ECMAScript 5 defines String.prototype.trim
. Where not supported,
it can be added as a function that uses a
regular expression:
if(!String.prototype.trim) { String.prototype.trim = function() { return String(this).replace(/^\s+|\s+$/g, ""); }; }
Implementations are inconsistent with \s
. For example,
some implementations, notably JScript 5.8 and Safari 2, do not match \xA0
(no-break space), among others.
A more consistent approach would be to create a character class that defines the characters to trim.
In HTML documents, a form may be referred to as a property of the
collection, either by its ordinal index or by name
(if the form
has a name). A form
's controls may be similarly referenced
from its elements
var frm = document.forms[0]; var control = frm.elements["elementname"];
Once a reference to a control is obtained, its (string) value
property can be read:-
var value = control.value; value = +control.value; //string to number.
Some exceptions would be:
First Exception: Where the control is a SELECT
element, and
support for older browsers, such as NN4, is required:
var value = control.options[control.selectedIndex].value;
Second Exception: Where several controls share the same name, such as radio buttons. These are made available as collections and require additional handling. For more information, see:-
Third Exception: File inputs. Most current browsers do not allow
reading of type="file"
input elements in a way that is useful.
Form controls with any "illegal" characters can be accessed with
- The bracket characters,
amongst others, are illegal in ID attributes and javascript
identifiers, so you should try to avoid them as browsers may
handle them incorrectly.
Microsoft introduced a shortcut that can be used to reference
elements which include an id
attribute where the
becomes a globally-accessible property. Some browsers reproduce
this behavior. Some, most notably Gecko-based browsers (Netscape and Mozilla),
do so only in "quirks" mode. The best approach is the document.getElementById
method, which is part of the W3C DOM standard and implemented
in modern browsers (including IE from version 5.0). So an
element with id="foo"
can be referenced
var el = document.getElementById("foo");
Note: make sure not to use the same id
twice in the same document
and do not give an element a name
that matches an id
of another in the same document or it will trigger bugs in MSIE <= 7 with
and document.getElementById
Using the non-standard but widely implemented

Some Content

with script:
document.getElementById("anID").innerHTML = "Some new Content";
Where "anID"
is the (unique on the HTML page)
attribute value of the element to modify.
All versions of Internet Explorer exhibit problems with innerHTML, including:
If the new content is only text and does not need to replace existing HTML,
it is more efficient to modify the data
property of a text node.
document.getElementById("anID").firstChild.data = "Some new Text";
Compatibility Note: Implementations have been known to split long text
content among several adjacent text nodes, so replacing the data of the
first text node may not replace all the element's text. The normalize
method, where supported, will combine adjacent text nodes.
Note: Make sure the element exists in the document (has been parsed) before trying to reference it.
An element can only be accessed after it exists in the document.
A) include your script after the HTML element it refers to, or
B) use the "load"
event to trigger your script.
Example A:

here

Example B:
// In the HEAD.
or id
Write a cookie and read it back and check if it's the same.
The window
object (also referred to by self
) is "DOM Level 0".
No formal standard for it exists.
You can't. The browser's history cannot be modified. However, you
can use self.location.replace(url);
in some browsers to replace
the current page in the history.
To reference another frame on the same domain:
content window of a FRAME
or IFRAME
can be
accessed by the frames
var fwin; fwin = self.frames[0]; // or: fwin = self.frames["iframeName"];
or, from the IFRAME
or FRAME
var iframeEl = document.getElementById("myFrame"); var fwin = iframeEl.contentWindow; // Nonstandard, but widely supported. var fdoc = iframeEl.contentDocument; // DOM2 HTML Standard.
A global identifier moomin
in the the iframe's
content window
is accessed as fwin.moomin
To communicate between frames on different domains:
Where supported, (IE8, Firefox 3, Opera 9, Safari 4), use
window.postMessage( message[, port], otherDomain);
Example: http://jibbering.com/faq/example/postMessage.html
Where window.postMessage
is not supported, the window.name
can be set on the other window, which can poll for updates to that
property using setInterval(checkWinName, 100);
where checkWinName
is a function that polls to check the value of
Here is a detailed explanation of a cross-browser strategy to find the dimensions of the viewport, excepting all chrome (excludes scrollbars, etc).
We can consider various properties:
window.innerWidth document.clientWidth document.documentElement.clientWidth document.body.clientWidth
Of the browsers that have an innerWidth
property, most
include scrollbar dimensions. Some versions of KHTML browsers
(including Safari 2) do not include scrollbar width.
The window.inner*
properties are unreliable and not
useful here. We don't want scrollbar dimensions included.
Certain versions of KHTML, including Safari 2, have
and document.clientWidth
properties. Where supported, these rare properties accurately
return the height and width of the viewport, without including
scrollbar dimensions.
document.documentElement.clientWidth document.body.clientWidth
MSHTML (Trident), Firefox (Gecko), Opera (Presto), and Safari
(Webkit) all support clientHeight
on document.body
and document.documentElement
. The difficulty is figuring out
which one is reliable. In other words which object to get the
property from:documentElement
or body
What the number returned from either of these properties
represents depends on the environment. The environment includes
the browser, its version, and the rendering mode of the document.
In quirks mode, we'll mostly want to use body.clientHeight
(except for in Safari 2).
Some environments will return the viewport height. Others will
return 0
. Yet others will return the clientHeight
the BODY
This is the more "standard" property for getting the height of
the viewport. It usually "works" in modern browsers in
standards mode. Notable exceptions include Safari 2 and
Opera <= 9.25, both of which return the clientHeight
of the html
element. (Oddly, Opera <= 9.25
in standards mode returns the width of the viewport for
With the exception of Safari 2, body.clientHeight
is reliable
where documentElement.clientHeight
is found to be unreliable.
For example, in Safari 3+, Opera, and Mozilla, all in quirks mode,
returns the clientHeight
of the html
element (this may seem unsurprising but
it is not what we want).
Conversely, document.body.clientHeight
will return
the height of the viewport in most cases where
does not. An exception
to that is Safari 2, where documentElement.clientHeight
and body.clientHeight
both return the height of their
corresponding element (not what we want).
By using a combination of Feature Testing and Capability Testing, the dimensions of the viewport can be strategically retrieved from the property that works in the environment the script is running in. The trick is determining which property will give us the value we want.
Since document.clientHeight
is reliable where
(rarely) supported, and since browsers that support this property
don't return the viewport dimensions from
, this should be the
very first condition:
// Safari 2 uses document.clientWidth (default). if(typeof document.clientWidth == "number") { // use document.clientWidth. }
The next strategy is to determine if
property is unreliable.
It is deemed "unreliable" when it is either 0
or taller
than the viewport.
Determining if documentElement.clientHeight
is 0
is easy.
The result is stored in a variable IS_BODY_ACTING_ROOT
var docEl = document.documentElement, IS_BODY_ACTING_ROOT = docEl && docEl.clientHeight === 0; docEl = null;
To determine if documentElement.clientHeight
a value taller than the viewport, we need a
Capability Test.
If we can force documentElement
to be very tall
(taller than a normal viewport) we can then check to see if
returns that "very tall" number.
If it does, then it is unreliable.
We can force documentElement
to be taller than the viewport
(or any "normal" viewport) by adding a div
to the body
give that div
a height larger than any normal monitor,
and then check to see if documentElement.clientHeight
that high (or "almost" that high, to account for documentElement
having a border).
// Used to feature test Opera returning wrong values // for documentElement.clientHeight. // The results of this function should be cached, // so it does not need to be called more than once. function isDocumentElementHeightOff(){ var d = document, div = d.createElement('div'); div.style.height = "2500px"; d.body.insertBefore(div, d.body.firstChild); var r = d.documentElement.clientHeight > 2400; d.body.removeChild(div); return r; }
We can use this function to see if we should use
, instead. (but only after checking if
is supported).
// Safari 2 uses document.clientWidth (default). if(typeof document.clientWidth == "number") { // use document.clientHeight/Width. } else if(IS_BODY_ACTING_ROOT || isDocumentElementHeightOff()) { // use document.body.clientHeight/Width. } else { // use document.documentElement.clientHeight/Width. }
The preceding strategy was developed by Garrett Smith with input
from John David Dalton. A complete and tested example can be found
in APE Library under APE.dom.getViewportDimensions
Source code:
APE is publicly released under Academic Free License.
APE home: http://dhtmlkitchen.com/ape/.
Note: The dimensions cannot be determined accurately until after the document has finished loading.
var myWin; function openWin(aURL) { if (!myWin || myWin.closed ) { myWin = window.open(aURL,'myWin'); } else { myWin.location.href = aURL; myWin.focus(); } }
Popup windows cause usability problems and are generally best avoided.
IE prints the frame that has focus when you call the print
method frameref.focus();frameref.print();
If a window was opened by javascript, then it can be closed
without confirmation by using windowRef.close()
Before calling windowRef.close()
(or other window
methods), make
sure the window reference is not null and its closed
property is false
Popup windows cause usability problems and are generally best avoided.
In the normal browser security model, a script may only access the properties of documents served from the same domain or IP address, protocol, and port.
Any attempt to access a property in such cases will result in a "Permission Denied" error. Signed scripts or trusted ActiveX objects can overcome this in limited situations.
There is no built-in way to pause execution in javascript such
as a sleep function, but hosts usually provide a method of some
form. Web browsers are designed for event driven programming and
only provide the setTimeout
and setInterval
to facilitate timed delays. The delay before calling getSnork
exceed the second parameter to setTimeout
and setInterval
due to implementation differences among browsers.
To call the function getSnork
, approximately 10 seconds
after the function getMoomin()
completes, you would do this:
getMoomin(); setTimeout(getSnork, 10000);
Script execution is not stopped, and adding getSnufkin()
after the
line would immediately execute the function getSnufkin
before getSnork
Achieving delays through running a loop of some sort for a pre-defined period is a bad strategy, as that will inhibit whatever was supposed to be happening during the delay, including blocking user interation.
Other (less event driven) hosts have different wait functions,
such as WScript.Sleep()
in the Windows Script Host.
In a normal security environment, you can't change anything.
Print Stylesheet rules provide options.
For IE, ActiveX
or Plugin ScriptX and
Neptune from Meadroid to give you more control for Windows
versions of Internet Explorer, Netscape, and Opera.
The buttons on a confirm box cannot be changed, nor can a default button be specified.
Change the question to a statement so that "OK" is suitable as the default response.
Example: "Would you like us to charge your credit card?" (wrong) "We will now charge your credit card." (right).
It is not possible with client-side javascript.
Some browsers accept the Content-Disposition header, but this
must be added by the server. Taking the form:-
Content-Disposition: attachment; filename=filename.ext
In a default security environment you are very limited in how much
you can modify the current browser window. You can use
or window.moveTo
to resize or move a
window respectively, but that is it. Normally you can only
suggest chrome changes in a window.open
Use the target attribute on the form, opening a window with that name and your feature string in the onsubmit handler of the FORM.
<form action="" method="post" target="wndname" onsubmit="window.open('',this.target);return true;">
New windows can be opened on browsers that support the
function and are not subject to the action of any
pop-up blocking mechanism with code such as:-
var wRef; if(window.open){ wRef = window.open("http://example.com/page.html","windowName"); }
is shorthand for Asynchronous JavaScript and XML. The technology is
based on the XMLHttpRequest
Object. At its simplest,
it is the sending/retrieving of new data from the server without
changing or reloading the window location.
Although XMLHttpRequest
can be used to download
entire pages, it is often used for downloading small pieces
of data that can be used to update the current page.
Use a server-side language to generate the javascript.
Certain characters of ECMAScript strings must be escaped by backslash. These include quote marks, backslash, and line terminators.
JSP Example, using Apache Commons: org.apache.commons.lang.StringEscapeUtils
var jsVar = "<%= StringEscapeUtils.escapeJavaScript(str) %>";
PHP example using addcslashes
var jsVar = "<?php echo addcslashes($str,"\\\'\"\n\r"); ?>";
This cannot be done reliably. Here's why:
The URL below has more information.
You trigger a server-side script by sending an HTTP request.
This can be achieved by setting the src
of an img
, frame
, or iframe
, or by using
XHR, where supported.
An image will also "swallow" the data sent back by the server, so that they will not be visible anywhere.
var dummyImage = new Image(); dummyImage.src = "scriptURL.asp?param=" + varName;
Mozilla, Opera 7.6+, Safari 1.2+, and Windows IE 7
provide the XMLHttpRequest
(Windows IE versions 5+, provides ActiveX to acheive an analagous
effect). XMLHttpRequest
can send HTTP requests to
the server, and provides access the responseText
or responseXML
(when the response is XML), and HTTP header information.
To reload a page, use location.reload()
. However, this depends
upon the cache headers that your server sends. To change this,
you need to alter the server configuration. A quick fix on the
client is to change the page URI so that it contains a unique
element, such as the current time. For example:
location.replace(location.href+'?d='+new Date().valueOf())
If the location.href
already contains a query String, use:
location.replace(location.href+'&d='+new Date().valueOf())
Browsers cache the results of HTTP requests to reduce network traffic.
To force the browser to request the document from the server, either
set the EXPIRES
and/or CACHE-CONTROL
response header(s)
with a past date or use a unique query string.
req.open("GET", "/example.jsp?date=" + (+new Date), true);
Always use the appropriate HTTP method. Do not use POST
to prevent caching. See RFC 2616.
There are debugging tools for many browsers. Learn to use them all.
, Internet Options
, Advanced
, and uncheck
Disable Script Debugging
. After enabling Script Debugging,
a Script Debugger
option will appear in the View
menu. console
for IE. Internet Options
, Advanced
, deselect "Disable Script Debugging"
select "Display a notification ..."
Tools > Error console
+ Shift
+ j
menu in Safari 3.1 or higher, select
the checkbox labeled "Show Develop menu in menu bar" in
Safari's Advanced
Preferences panel.
menu icon and select
Developer > JavaScript Console
. From here, you'll be
able to view errors in the JavaScript execution, and enter
additional javascript commands to execute.
menu icon > Developer
> Debug JavaScript, the debugger provides a command prompt from which you
can set breakpoints, backtrace, and more. Type help
at the debugger
command line to get started.
The short answer: Don't do that.
The navigator
host object contains properties which
may identify the browser and version. These properties are historically
inaccurate. Some browsers allow the user to set navigator.userAgent
to any value. For
example, Firefox, (type about:config
and search useragent
or Safari, Develop > User Agent > Other...
, IE, via Registry.
Browser detection is unreliable, at best. It usually causes forward-compatibility and maintenance problems. It is unrelated to the problem or incompatiblity it is trying to solve and obscures the problems it is used for, where it is used.
Object detection is checking that the object in question exists. Capability detection goes one step further to actually test the object, method, or property, to see if behaves in the desired manner.
Feature Test Example:
/** * Returns the element/object the user targeted. * If neither DOM nor IE event model is supported, returns undefined. * @throws TypeError if the event is not an object. */ function getEventTarget(e) { e = e || window.event; // First check for the existence of standard "target" property. return e.target || e.srcElement; }
In practice you can't. While you could create a suitable encryption system with a password in the page, the level of support you need to do this means it's always simpler to do it server-side. Anything that "protects" a page other than the current one is definitely flawed.
A context menu, often triggered by right-click, can be requested by the user in a few ways. For example, on windows, shift + F10 and on macs, click-and-hold. Other input devices exist and mouse buttons can be configured, making the term "right click" a misnomer, in context.
In browsers that allow it, a script can suppress the context menu by
returning false from an object's oncontextmenu
event handler.
document.oncontextmenu = function() { return false; };
Some browsers lack context menus (e.g. iphone). Browsers that have context menus do not always have a scriptable event for them. Some browsers can be configured to disallow scripts from detecting context menu events (IE, Opera); others may fire the event but be configured to disallow scripts from suppressing the context menu (Firefox,Seamonkey).
Even when the context menu has been suppressed, it will still be possible to view/save the source code and to save images.
Security means that by default you can't. In a more restricted environment, there are options. For example, using LiveConnect to connect to Java with Netscape, and using the FileSystemObject in IE. Check Google Groups archives for previous posts on the subject.
Whatever the rest of your question, this is generally a very bad idea.
The javascript:
pseudo protocol was designed to replace the
current document with the value that is returned from the expression.
For example:
lastModified
will result in replacing the current document with the value
returned from document.lastModified
, wrapped in an

When the expression used evaluates to an undefined
(as some function calls do), the contents of the current page are not
replaced. Regardless, some browsers (notably IE6) interpret this as
navigation and will enter into a 'navigation' state where GIF
animations and plugins (such as movies) will stop and navigational
features such as META
refresh, assignment to location.href
, and image
swaps fail.
It is also possible for IE to be configured such that it supports
javascript but not the javascript:
protocol. This results
in the user seeing a protocol error for javascript:
The javascript:
pseudo protocol creates accessibility and
usability problems. It provides no fallback for when the script is not
Instead, use

where something.html
is a meaningful alternative. Alternatively,
attach the click
callback using an event registry.
The FAQ uses the stylesheet faq.css and is generated from the xml source index.xml by the windows script host script process.wsf which also checks the links.
If a poster feels that the question they are answering should be covered in the FAQ, placing <FAQENTRY> in the post lets the FAQ robot collect the messages for easy review and inclusion. A Draft Proposal for the FAQ is requested and appreciated.
The <FAQENTRY> should not be used in posts except in conjunction with a suggestion/proposal for the FAQ. It should also not be literally quoted in replies, instead it should be partly obscured as, e.g. <FAQ**TRY> or similar.
The FAQ is currently lacking a maintainer, please contact Jim Ley (email@example.com) if you wish to take it over, you will need to be in good standing in the group and trustworthy to have access to the server. All comments, suggestions, and especially corrections are welcome.