Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Dec 2012
    Thanked 0 Times in 0 Posts

    Access iframe element on the top of another page

    - I have two jsp pages. 1.customer.jsp 2. menuBanner.jsp
    - customer.jsp has an iframe at the top of its contents. that iframe is nothing but menuBanner.jsp file.
    - menubanner.jsp has only two contents. an image and a button. on click of the button it has to open a dialog box. the dialog box code should be in menubanner.jsp page.
    - When i click on the button from this url host/port/example/menuBanner.jsp, am getting dialog box and the dialog box is at the page center.
    - But when i try from this url host/port/example/customer.jsp, the dialog box is sticking at the page top and not getting the height of the box as well.
    - My need is, when i try from this url too host/port/example/customer.jsp, i have to get the dialog box at the page center. i mean it should be at the top of customer.jsp page contents.

  • #2
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Thanked 4,325 Times in 4,291 Posts
    And what, pray tell, is your definition of a "dialog box". There is no standard HTML element with that designation, so it must be something *YOUR CODE* is creating.

    And that being so, how can we guess what you are doing wrong?

    If you want help, you will have to show your code.

    And *PLEASE* do *NOT* post your JSP code. Instead bring up your page(s) in your browser, click on the browser's VIEW menu and then on the SOURCE or PAGE SOURCE menu item. Copy/paste the HTML that the browser is seeing and using to here.

    Or, even better, give us a live URL to look at.

    *** AS A GUESS ***
    I would tell you to simply have your button's onclick handler call the code in your <iffame>, rather than duplicating the code in both JSP pages.
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.


    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts