• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

how to fire the events when page loads

 
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi evereybody,
here i have a question i want to fire a event which presses down arrow button once and up arrow button once when page loads .

Thanks
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can not have a function that acts like you are pressing the arrow keys, but I am assuming that you want the page to scroll?

If I am corrct with my assumption, then you can use the window.scrollBy() or window.scrollTo() menthods.

You can learn more about them here:
http://www.webreference.com/js/tutorial1/manipulate.html

OR

Do you want to detect a keypress of the arrows after the page has loaded?

Eric
 
giri shetty
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Eric ,
here i will explain what iam gonna do in my JSP page there are list of radio buttons iam putting the focus on the very first radio button here if fire the event which is "DOWN" arrow button pressed once and next "UP" arrow button pressed the focus is on the first button right. thats what ia want to do.it seems to be funny right but i need this one plese help me.

thanks
 
Eric Pascarello
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think this should do it, you should replace the formName and also the radiobutton name with the correct values. I did not test this out to see if it works, I am not sure if it will. lol... Yell if it doesn't!



Eric
 
giri shetty
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Eric,
I think this very useful for me.
 
reply
    Bookmark Topic Watch Topic
  • New Topic