[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details

javascript onfocus -display a text and move to top of page

Asked by newbie_janet in Hypertext Markup Language (HTML), Document Object Model, JScript

onfocus of a text field I need to display a text that is at the top of the page
I do a window scroll to get to the top of page
This works fine in Safari and firefox on mouse click
When I tab to the text field this doesnt work
i have attached the code .
please let me know a solution
Thanks
janet
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
130:
131:
132:
133:
134:
135:
136:
137:
138:
139:
140:
141:
142:
143:
144:
145:
146:
147:
148:
149:
150:
151:
152:
153:
154:
155:
156:
<html>
 
<body>
 
<form method="post" name="my_form">
<body style="border:solid;"/>
 
<div id="showme" style="display:none;border:solid;">
here I am sitting at the top
</div>
 
Skip to main content
 
 
We know--you just got home and you're hungry now. You'd never know these delicious recipes only take 15 minutes to prepare.
 
    *      Avocado is a complete food with many essential nutrients like proteins, vitamin E, C, B, folic acid, iron, minerals, antioxidants and fiber. It has no cholesterol and is sodium free. Avocado shake with milk and sugar is a famous drink. It can be used to make salads, shakes, sandwitches etc.
                In this recipe, Ive tried to give an Indian touch to the fruit. Since the fruit has a neutral taste, it easily blends with the things that are added to it. This chutney can be had as a dip for chips or used to make sandwitches.
 
Ex-NFL player Burress enters prison
    *   1 French deli roll, split
    * 1 teaspoon balsamic vinegar
    * 2 slices mozzarella cheese
    * 1 small tomato, sliced
    * 4 fresh basil leaves
    * olive oil
 
 
updated 1:12 p.m. EDT, Tue September 22, 2009
 
      Avocado is a complete food with many essential nutrients like proteins, vitamin E, C, B, folic acid, iron, minerals, antioxidants and fiber. It has no cholesterol and is sodium free. Avocado shake with milk and sugar is a famous drink. It can be used to make salads, shakes, sandwitches etc.
                In this recipe, Ive tried to give an Indian touch to the fruit. Since the fruit has a neutral taste, it easily blends with the things that are added to it. This chutney can be had as a dip for chips or used to make sandwitches.ntonio Pierce, drove him to a hospital and arranged to have the pistol delivered to Burress' New Jersey home, according to a statement from the district attorney's office August 3.
Don't Miss
<br/><br/><br/>	
 
    Ingredients
Brinjal - 5
Onion - 1 (finely chopped)
Ginger garlic paste - 1 tsp
Green chilly - 1 (minced)
 
Sesame seeds - 1/2 cup
Peanuts - 1/4 cup - 1/2 cup (You can add this as per your taste. Generally Sounth indians use more of coconut and less of peanuts whereas north indians use more peanuts than coconut)
 
Coconut - 1 cup
 
Whole garam masala(cinnamon stick - 1, cloves -3-4 , Cardomon -3, bay leaf - 1)
Cumin seeds - 1 tsp
Corriander powder - 1 tblsp
Chilly powder - 1/2 tblsp
Oil - 2 tblsp
Tamarind juice - 1/2 cup (pulp -2-3 tblsp)
 
Share this on:
Mixx Facebook Twitter Digg del.icio.us reddit MySpace StumbleUpon
| Mixx it | Share
 
All About Plaxico Burress " National Football League
 
    * E-mail
    * Save
    * Print
 
From the Blogs: Controversy, commentary, and debate
loading Sit tight, we're getting to the good stuff
powered by Sphere
Top News
	Feds: Stadiums, hotels attract terrorist interest		'Last thing they heard ... she was floating away'
Most Viewed 	Most Emailed 	Top Searches
 
   1    *   1 French deli roll, split
    * 1 teaspoon balsamic vinegar
    * 2 slices mozzarella cheese
    * 1 small tomato, sliced
    * 4 fresh basil leaves
    * olive oil
    *   1 French deli roll, split
    * 1 teaspoon balsamic vinegar
    * 2 slices mozzarella cheese
    * 1 small tomato, sliced
    * 4 fresh basil leaves
    * olive oil
 
 
 more most popular »
    *   1 French deli roll, split
    * 1 teaspoon balsamic vinegar
    * 2 slices mozzarella cheese
    * 1 small tomato, sliced
    * 4 fresh basil leaves
    * olive oil
    *   1 French deli roll, split
    * 1 teaspoon balsamic vinegar
    * 2 slices mozzarella cheese
    * 1 small tomato, sliced
    * 4 fresh basil leaves
    * olive oil
 
 China
   4. 4 moos
   5. 5  anthony
   6. 6 tv is tv 
   7. 7 larry king
   8. 8 susan boyle
   9. 9 zachirrr
  10. 10 horse
<br/><br/><br/><br/><br/><br/><br/>
 more most popular »
 
Tips
- Same recipe can be followed just with pearl onions or with just garlic and peppercorns or with any vathal or with drumstick or with drumstick and brinjal together.
- Can be cooked with couple tablespoons of ground coconut paste also (another variation).
 
 
 more most popular »
 
Find a local lawyer at Martindale-Hubbell's® Lawyers.com"
Start Your Law Firm Search
Search for attorneys by location and area of practice.
 
<br/><br/><br/><br/><br/>
<br/><br/><br/><br/><br/>
	
Area of practice
	
    *  1 French deli roll, split
    * 1 teaspoon balsamic vinegar
    * 2 slices mozzarella cheese
    * 1 small tomato, sliced
    * 4 fresh basil leaves
    * olive oil
 
The key you pressed was:
<input type="text" id="key1" size="2" /><br/><br/>
<input type="text" id="key2" size="2"onfocus="show_key();"/><br/><br/>
<input type="text" id="key3" size="2"/><br/><br/>
<input type="text" id="key4" size="2"/><br/><br/>
</form>
 
<script type="text/javascript">
 
function show_key( )
 
{ 
document.getElementById('showme').style.display='block';
  document.getElementById('showme').focus();	
 window.scrollTo(0,0);
 
   
}
 
</script>
 
</body>
 
</html>
[+][-]09/23/09 12:24 AM, ID: 25400660Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09/23/09 12:40 AM, ID: 25400730Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091111-EE-VQP-89 - Hierarchy / EE_QW_3_20080625