• 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

onload function required for multiple tiles in a single form

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have multiple tiles, each of them requires enable/disable some controls when the form is initially loaded, they are used together inside a single form of a generic layout jsp, which I can't modify, anybody knows how to make it work?

Thanks in advance.

Eric
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Just put the enable/disable code in a <script></script> tag set at the bottom of your HTML in each page. I'm not talking about writing a function, I'm talking about just writing lines of JavaScript code that will run when the page is rendered. This will have the same effect as having it executed by the body's onload event.
 
eric he
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Merrill, your suggestion worked, it seems have the same effect as putting a function call inside form.onload.

Eric
 
eric he
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
more interesting question would be, what if I want to do something on form.reset, suppose I know the form.onreset for the layout is empty, and I have resetTile1, resetTile2 on two different tiles, is there any javascript solution to do that without changing the layout? this should be a common tiles question.

Thanks
 
Make yourself as serene as a flower, as a tree. And on wednesdays, as serene as this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic