Friday, June 19, 2009

The Nightingale and the Rose




"She said she would dance with me if I brought her red roses," cried the young Student, "but in all my garden there is no red rose."

On a branch in the old orange tree, a Nightingale sang her songs of love, but the Student did not hear the bird. When the Nightingale heard his voice, she stopped singing and wondered.

"No red roses in all my garden!" the Student cried, and his beautiful eyes filled with sadness.

"Oh! Happiness comes from such little things! No red roses!"
"Here, at last, is a true lover," said the Nightingale. "Night after night I have sung about him, but I didn't know him. Night after night I have told his story to the stars, and now I see him. His hair is as dark as the night, and his lips are rose-red, but his face is white, and sadness has set her mark upon it."

"The Prince is giving a big party tomorrow night," said the young Student quietly, "and my love will be there. If I bring a red rose she will dance with me till daybreak. She will rest her head against me, and I will hold her hand in mine. But there is no red rose in my garden, so I shall sit lonely, and she will pass me by. She will not notice me and my heart will break."

"Oh yes, here is the true lover," said the Nightingale. "I only sing of sadness, but he feels its hurt. To me, love is happiness: to him it is emptiness. It is a greater treasure than jewels, but it cannot be bought with gold."

"The music will play," said the young Student. "My love will dance lightly and her feet will not touch the floor. But with me she will not dance, because I have no red rose for her," and he threw himself down on the grass, put his head in hands, and cried.

"Why is he crying?" asked the animals and the flowers in the garden.
"He is crying because of a red rose," said the Nightingale.
"For a red rose!" they cried; and they laughed out loud.
But the Nightingale understood the secret of the Student's sadness, and she sat silent in the orange tree, and thought about the mystery of love.
Suddenly she flew into the air, and sailed across the garden like a shadow.
In the centre of the garden was a beautiful 7 Rose-tree, and when the Nightingale saw it, she flew over to it and landed on a branch.
"Give me a red rose," she cried, "and I will sing you my sweetest song."
But the Tree shook its head.
"My roses are white," it answered, "whiter than the snow upon the Mountain. But go to my brother and perhaps he will give you what you want."
So the Nightingale flew over to the other Rose-tree.
"Give me a red rose," she cried, "and I will sing you my sweetest song."
But the Tree shook its head.
"My roses are yellow," it answered, "yellower than the flowers in the summer fields. But go to my brother who grows below the Student's window, and perhaps he will give you what you want."
So the Nightingale flew over to the Rose-tree that was growing below the Student's window.
"Give me a red rose," she cried, "and I will sing you my sweetest song."
But the Tree shook its head.
"My roses are red," it answered, "as red as the sunset. But I am still cold from the Winter winds and the storms have broken my branches, and I shall have no roses at all this year ..."
"One red rose is all I want," cried the Nightingale, "only one red rose. How can I get one?"
"There is a way," answered the Tree, "but it is so fearful that I dare not tell it to you."
"Tell it to me," said the Nightingale. "I am not afraid."
"If you want a red rose," said the Tree, "you must build it out of music by moonlight, and redden it with your own heart's blood. Look at these thorns along my branches - they are as deadly as the points of knives. You must sing to me with your body against a thorn. All night you must sing to me, and the thorn must enter your heart, and your life-blood must pass into my body and become mine."
"Death is a great price to pay for a red rose," cried the Nightingale, "and Life is very dear to all. It is wonderful to sit in the green wood and watch the Sun and The Moon and smell the flowers. But Love is better than Life, and the heart of a man is surely more valuable than the heart of a bird."
So once again she rose into the air and like a shadow she sailed through the trees.
The young Student was still lying on the grass, and his eyes were still wet.
"Be happy," cried the Nightingale, "be happy: you shall have your red rose. I will build it out of music by moonlight, and redden it with my own heart's blood. In return, I ask you to be a true lover, because Love is the greatest power in the world."
The Student looked up from the grass and listened. But he could not understand what the Nightingale was saying to him. He only knew the things that were written down in books.
But the old orange tree in the garden understood, and felt sad, because he liked the Nightingale who lived in his branches.
"Sing me one last song," he said very quietly. "I shall feel lonely when you are gone."
So the Nightingale sang to the orange-tree and her voice was like clear water from a silver cup.
When she finished her song, the Student got up and pulled a note-book and a pencil out of his pocket.
"The song has form," he said to himself, as he walked through the garden, "but does it have feeling? I don't think so. In fact, the Nightingale is like most artists - she thinks only of music and herself. But she has some beautiful notes in her voice. It's sad that they don't mean anything, or do any real good for anyone." And he went into his room and lay down on his bed, and began to think of his love; and after a time he fell asleep.
And when the Moon shone in the night sky, the Nightingale flew to the Rose-tree and pressed her body against the thorn. All night long she sang with her body against the thorn, and the cold silver Moon listened. All night long she sang and the thorn went deeper and deeper into her body, and her life-blood went slowly from her.
She sang first of the birth of Love in the heart of a boy and a girl. On the top branch of the Rose-tree there slowly flowered a wonderful rose, as song followed song. It was very, very white at first.
But the Tree cried to the Nightingale, "Press closer, little Nightingale or the Day will come before the rose is finished."
So the Nightingale pressed closer against the thorn, and her song grew louder and louder, as she sang of the love between a man and a woman.
And a pink colour came into the leaves of the rose, like the pink in the face of a girl when her husband kissed her for the first time. But the thorn was not yet at her heart, so the rose's heart remained white. Only a Nightingale's heart's-blood could redden the heart of a rose.
And the Tree cried to the Nightingale, "Press closer, little Nightingale, or the Day will come before the rose is finished."
So the Nightingale pressed closer against the thorn, and the thorn touched her heart. And her song grew wilder because she sang of the Love that does not die.
And the wonderful rose became dark red, like the rose of the eastern sky at sunrise.
But the Nightingale's voice was failing and a curtain of darkness began to fall over her eyes. Her song became weaker and weaker. She could almost sing no more.
Then she gave one last note of music. The white Moon heard it and stayed in the sky. The red rose heard it and opened in the cold morning air. The hills and the rivers and the sea heard it.
"Look, Look!" cried the Tree, "The rose is finished now," but the Nightingale made no answer. She was lying dead in the long grass, with the thorn in her heart.

And at mid-day the Student opened his window and looked out.
"What a wonderful piece of luck!" he cried. "Here is a red rose! I have never seen any rose like it in all my life. It so beautiful that it must have a long name," and he picked it from the Tree. Then he put on his hat and ran up to his love's house with the rose in his hand.
She was sitting in the doorway, and her little dog was at her feet.

"You said you would dance with me if I brought you a red rose," cried the Student.

"Here is the reddest rose in the world. You will wear it tonight next to your heart. As we dance together I will tell you how much I love you."
But the girl's face darkened.

"I'm sorry but it's the wrong colour for my dress," she answered, "and in any case, a certain young man has sent me some real jewels. And everyone knows that the jewels cost far more than flowers."

"Well, you're not very kind. You should thank me," said the Student angrily; and he threw the rose into the street and a car went over it.

"Not very kind!" said the girl. "I can tell you something. You are rough and thoughtless. And after all, who are you? Only a Student. You have no silver on your shoes like rich young men have." And she got up from her chair and went into the house.

"Love doesn't make any sense," said the Student as he walked away. "It's useless - it can't prove anything. And it's always telling us things that are not true. In fact, it's a waste of time. It's much better to study something useful."
So he returned to his room and pulled down a great dusty book about science, and began to read it.

-- Short Stories by Oscar Wilde

Wednesday, June 10, 2009

Handling BackSpace to avoid navigation to Back Page

This situation was faced in one of my current projects where client required Backspace functionality to be disabled so that it doesn't move to previous page if backspace is hit accidently. Although bacckspace was required to work in text areas and text boxes.

Here is a simple solution i found after some googling and experiments:

function conFunction()
{
return 'Please make sure you have filled in form correctly before navigating to next page!';
}
window.onbeforeunload = conFunction;

place this in Head tag of your page
onbeforeunload bydefault shows a confirm dialogue box, that helps preventing undesired navigation to backpage.