Knowledge Base support case for Likno Web Modal Windows Builder, abstracted and stripped of all user’s private info.
Initial Email From: John
Initial Email Subject: How do you ?
Support Case Month: July 2012
Hello,
Situation: A modal window is already open.
Want to do: Click a link in that modal window which first closes the existing window and then opens a new modal window.
At the moment the second window simply overlays the first making the background very dark.
I have looked through your site and can't find the solution, but I am sure I did once read something about it.
Is there a prescribed method?
Best Wishes, John
Reply From: Likno Customer Support
Dear John,
This depends on the content of the first Modal Window. If it is a plain in-page content then simply opening a second Modal should close the first.
If however the first modal is an external page, then you need to manually close the first window. You can do this with code, but I would need to see the page in order to tell you the exact code.
The main idea is: 'parent.likno_modal_project.close();' where 'likno_modal_project' is the actual compile name of your modal project.
Regards,
Kostas
Likno Customer Support
www.likno.com
Create any type of javascript menu (CSS menu, drop-down menu, sliding menu), button, html tree, modal window, tooltip, accordion, tab, scroller, jQuery slider or design for your websites!
Like us on Facebook – Follow us on Twitter
Reply From: John
Hello again,
Well I am getting some very strange results. I will stay with the most recent otherwise it will become very confusing. Inside the development environment all code works exactly as required.
Please find attached the current project. All modal window code is Embedded.
How it all works..
A web page :
http:www.the-kellys.co.uk/narpo/report/W/walker_william_sergeant.shtml can call the modal window Uncle_Bill
At the bottom of Uncle_Bill is the option to call the second modal window John_Barker
It works well until Uncle_Bill calls John_Barker.
In IE9 : Nothing happens
In Chrome: a completely different base page is called. There are NO links to that page in either Modal window or from the underlying page. The page called is http://the-kellys.co.uk/narpo/absentfriends.html#
Calling John_Barker from his own page works exactly as required.
I should explain that this is a frame based environment, but all actions are called by and related to the one frame. To see the frame setup please look at http://www.the-kellys.co.uk, select Absent Friends (Either sub-menu as in this case they both call the same files) and then scroll down to "W" and select Walker, William
I have tried changing the single quotes to double quotes in the code with no effect, and because it does make a difference, made sure that both modal windows use just single quotes instead of one having single and the other double.
I won't alter any of these pages until you have the time to give a view.
Best Wishes, John
Reply From: Likno Customer Support
Dear John,
It seems that this is just an error in the HTML:

This should be:

Regards,
Kostas
Likno Customer Support
www.likno.com
Create any type of javascript menu (CSS menu, drop-down menu, sliding menu), button, html tree, modal window, tooltip, accordion, tab, scroller, jQuery slider or design for your websites!
Like us on Facebook – Follow us on Twitter
Reply From: John
Hello there,
The part you outlined is a link to another page (which happens to be the one on Sgt Walker). The target mentioned there “detail” is the name of the frame the new page should go into. Its not the link that calls the modal window. Or are you saying that I cant call a page and tell it where to go if I am also calling a modal window on that same page.
Best Wishes, John
Reply From: Likno Customer Support
Dear John,
Sorry, I believe that I misunderstood you… possibly because of the initial URL you sent (http:www.the-kellys.co.uk/narpo/report/W/walker_william_sergeant.shtml) which is the subpage that goes in one of the page frames. Can you please describe the way to reach this problematic link again?
What is the first page I should start from? Is it “http://www.the-kellys.co.uk/narpo/absentfriends_web.html”?
I noticed that if I open “walker_william_sergreant.shtml” directly in a browser, then click on “Funny Story”, then on “Click Here”, the modal window closes and the new one opens.
The same is not true if I start from “absentfriends_web.html” and follow the same procedure. This happens because of the frames.
I will have to investigate this further, once you send me more specific instructions.
Regards,
Kostas
Likno Customer Support
www.likno.com
Create any type of javascript menu (CSS menu, drop-down menu, sliding menu), button, html tree, modal window, tooltip, accordion, tab, scroller, jQuery slider or design for your websites!
Like us on Facebook – Follow us on Twitter
Reply From: John
Additional to prior message from me.
I have just taken your example 12 and compiled for my domain. I linked it to a similar page in absent friends. Clicking on the link produces the first modal window but clicking on the link inside that modal window has no effect in IE9 or Chrome.
I moved the page to the root and re-linked example 12 and all works exactly as it should, so even though my problem page is self-contained, that makes no difference, the frames are somehow breaking the code.
I suppose the easiest thing to do is forget it and modify my first modal window so as to include the contents of the second window. It’s not as though the website is important, so unless YOU feel it’s important to solve this I would leave it for one of those days you have nothing to do 
Best Wishes, John
Reply From: Likno Customer Support
Dear John,
Indeed the problem is with the frames as I originally suspected. I am afraid this is not something that can be resolved on our side. Instead you can adjust your code to fix this in your side.
Instead of this:
<a href="#" target="John_Barker">Click Here</a>
Try using this in your Modal:
<a href="#" onclick="top.detail.John_Barker();">Click Here</a>
This follows the path to where the modal is actually linked (the “detail” frame within the “top” page).
Regards,
Kostas
Likno Customer Support
www.likno.com
Create any type of javascript menu (CSS menu, drop-down menu, sliding menu), button, html tree, modal window, tooltip, accordion, tab, scroller, jQuery slider or design for your websites!
Like us on Facebook – Follow us on Twitter
Reply From: John
Hello,
That’s great!! It works a treat. Thank You very much for the help. I was just thinking about making one larger modal window , I loaded Outlook for a quick look first and there’s that answer…Brilliant.
Best Wishes, John