November 12th, 2014LWMW: How to call a modal window through the Modal Window API
Knowledge Base support case for Likno Web Modal Windows Builder, abstracted and stripped of all user’s private info.
Initial Email From: Patrick
Initial Email Subject: Modal window API
Support Case Month: March 2014
HELP!! I cannot get the API commands to work. I've tried EVERYTHING today. EVERYTHING. I've put the
<script>
function openModal(url, w, h) {
popup_with_id({bodySource:"<div externalUrl=\'"+url+"\'/>",containerCss:{width:w, height:h}});}
</script>I've put in several test links
<a href="javascript:void(0)" onclick="popup_with_id({bodySource:'hello'})" >Click for product3 comparison</a>
<a href="javascript:void(0);" onclick="popup_with_id({footer:{text:'new footer'});">Click here</a>
<a onclick="openModal('test1',300,400)" href="javascript:void(0);">Test modal2</a>
<a href="#" onclick="popup_with_id('BITE ME','1','2')" alt="" title="" target="Popup_Window">See Popup Window</a>
</head>
per like this KB page
It will not open a window with the API commands inside the modal popup_with_id. If I take out the "{" then it puts the text inside the window and works
popup_with_id("test stuff);
I just need a little nudge in the right direction before i lose any more time on this, PLEASE
Sincerely,
Patrick
Reply From: Likno Customer Support
Hello Patrick,
According to your project the modal window name you have is Popup_Window, so the popup_with_id is going to be undefined.
You should have Popup_Window instead of popup_with_id
Please, correct the above and let me know how that worked for you.
Please, let me know if I can be of further help.
Kind Regards,
Aggelos Tsakonas
www.likno.com
Powerful javascript menus (CSS menus/drop-down menus/sliding menus), web trees, buttons, tabs, modals, tooltips, accordions, scrollers, designs for your websites!
Reply From: Patrick
YES! wow i lost a lot of hours yesterday and looked though the blog and couldn't sort it! works PERFECTLY now.
Sincerely,
Patrick
Tags: API, function, jquery, jquery modal window, modal window, popup, script