• 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

About frames in jsp

 
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I have a scenario in which I am having two frames in one parent page.I want to use the javascripts used in the page included via frame in the main parent page so that if I use the javascript function in the child page it effects the whole parent page.

Right now the js is effecting only the child page(included via frame).

I have tried including the js function in the parent page but in that case the function is not working as the call to the function is inside the child page.

Please help me out regarding this.

Aashu.
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This should probably be in HTML/JavaScript.

I think you'd have to explicitly call the parent's JS function (parent.blah() or something like that, I don't recall).
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please take the time to choose the correct forum for your posts. This forum is for questions on JSP. For more information, please read this.

This post has been moved to a more appropriate forum.

 
Ashutosh Arya
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Bear,I will keep that in mind from next time.

Please elaborate the solution if you can.

 
Bear Bibeault
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The child frames can reference the parent via parent.
 
Ashutosh Arya
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the solution Bear but if I explicitly call the function from parent window the effect of the function is limited to child window only as the call to the function is in child window.

I want the effect of the javascript function (actually being used to open a dhtml window) to be shown over parent(i.e.,the dhtml window should superimpose parent frame).

A little explanation:

I am having two frames in a jsp.Each frame is used to show a separate jsp.
Now the top frame is containing some header jsp and some javascript function which is used to open a dhtml window when we click on a relevant link.

The problem is that this new window is being superImposed by the bottom frame thus hiding the dhtml window.I want that the dhtml window superimpose both the frames.

I hope now you can help me out.

Aashu.
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It can not happen, the two frames are "seperate" windows, hence why you really should not use frames in applications theses days.

Eri
 
Ashutosh Arya
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Eric..

Now In place of using frame I am trying to include that page inside <td> tags.But still I am not able to include a servlet which is responsible for output of one frame?

How can I include a servlet using jsp include tag?

Or please suggest any other better approach for the scenario.

Thanks again.

Aashu
 
Bear Bibeault
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Ashutosh Arya wrote:How can I include a servlet using jsp include tag?


Using the JSP include action (not the directive) simply reference the URL of the servlet.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic