Win a copy of The Journey To Enterprise Agility this week in the Agile and Other Processes forum! And see the welcome thread for 20% off.
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
Bartenders:
  • Carey Brown
  • Tim Holloway
  • Joe Ess

Onload script does not work in subview page  RSS feed

 
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Here i write two jsp page like outerPage.jsp and innerPage.jsp

The outer page include innerPage.jsp

The inner page have one textfield and one button..

I need focus for textFiled while page loading(innerPage.jsp).. I write a javascript, but not work it...

The code is

outerPage.jsp


innerPage.jsp



The cursorFocus script does not called...
Here i need cursor focus for textFiled after display the page ...
please help me about this ..

Thanks in advance.
 
Ranch Hand
Posts: 138
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Jack,

Check your element id.Thats wrong.
If you include the page using jsp:include.
your element id has to be changed.So you must add the subview id before the element id,So if you replace your element id like this you have your desired result.




If you Use

Insted of


you got your desired result.

Hopes this helps.

 
Robert Jack
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Its worked...
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!