Knowledge Base support case for Likno Web Modal Windows,  abstracted and stripped of all user’s private info.


Initial Email From:
Gus
Initial Email Subject: Modal windows with Submit button and return value
Support Case Month: February 2013

Hi Kostas,

How can I get a Web Modal window to activate with an Input type="Submit" or Type="Image" button with onclick? It works great with a Type="Button". And is there a way to return True/False (or any other value) to the onclick so a button can be used for validation or a Go/No Go from the modal window?

Thanks,
Gus

Reply From: Likno Customer Support

Dear Gus,

If you have this submit button in a form and want to show the form result inside the Modal Window, then there is a simple way to capture the “on submit” event. You just need to add the correct “target” to your form:

correct target of the form in a modal window

If you just want to show a standard Modal Window, then there are many ways to do this using the element ID, Class or “onclick” method:

modal window on click event

For example: <input type=”image” onclick=”Modal_Window_1();” … />

Finally, regarding returning a value from the modal, this is not possible in the sense of a “confirm” dialog as the modal is not blocking the JavaScript execution.

Still it allows you to run any JavaScript code on exit, so you can do anything you like there (for example check a modal/page element value and act accordingly):

run JavaScript on modal window close

Best Regards,
Kostas
Likno Customer Support
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!

 

Tags: , , , , , , , , ,

 

Knowledge Base support case for AllWebMenus, abstracted and stripped of all user’s private info.


Initial Email From:
Bob
Initial Email Subject: Execute "Javascript Command" from menu item onclick event
Support Case Month: January 2013

I own AllwebMenus PRO 5.3 build 900.

I checked all the help, and I haven't found an explanation on how to call an in-page javascript function from an AllwebMenus menu item, using the "Javascript Command" feature attached to the item's onclick event.  The javascript function I want to call actually resides in the <head> section of my web page like this:

<head>

<!-- header stuff  -->

<script type="text/javascript">

function changeContentInfo(newText)
{
   document.getElementById('DisplayDate').innerText=newText;
}
</script>

</head>

I can call this function from anywhere in my web page - a button click or focus event etc.  But if I try to call it from the "Javascript Command" entry of an AllwebMenus menu item onclick event, nothing happens.

The "Javascript Command" is entered as: changeContentInfo("Monday");

I sure hope it's possible to call a javascript function that resides on the web page, so I can re-use the call from the AllwebMenus "Javascript Command" feature. I don't want to repeatedly write the same full function details into each "Javascript Command" where I would need it.

I'm experimenting with that neat 'calendar' AWM project, and I was checking that my page could respond to clicking on any day in the calendar.  That would mean that I would call my function 31 times for the 31 days in March.  So far, no luck.

The page I'm working on isn't on my website yet, because it doesn't work.

Thanks,
Bob

Reply From: Likno Customer Support

Dear Bob,

If your page already has the function, then calling it from AllWebMenus should work directly and without problems:

run javascript command

If this does not work, then I will need you to upload your example on a test-page so that I can check it.

Best 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

 

Tags: , , , , , , , , , , , ,

 

Knowledge Base support case for Likno Web Modal Windows Builder, abstracted and stripped of all user’s private info.


Initial Email From:
Brad
Initial Email Subject: modal
Support Case Month: November 2012

How can I instantiate the modal from a asp.net Image button?

Thanks,
Brad

Reply From: Likno Customer Support

Dear Brad,

The modal window can be triggered by JavaScript, by calling the window name followed by parenthesis. For example, if your modal window retains the default name “Modal_Window_1” then you can open it using the following JavaScript code:

Modal_Window_1();

This can be placed in your aspnet image “onclick” event.

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

 

Tags: , , , , , , , , , , , ,

 

Knowledge Base support case for Likno Web Tooltips Builder, abstracted and stripped of all user’s private info.


Initial Email From:
Juergen
Initial Email Subject: Tooltip doesn't show new Likno-Tooltip but standard tooltip
Support Case Month: November 2012

Hi Likno-Team,

within my investigations of a new functionality within our website, I created the content of a DIV via script and set this content via

document.getElementById(DIV-ID).innerHTML = cNewContent;

Within the generating function, there is a definition like:

<a id='cId' href= '#' onclick='MyFunction()' title='Title'>abc</a>

After generating that html, the tooltip is well displayed with Likno-Tooltip.

The function 'MyFunction' has to change the title of the actual link and is defined as:

document.getElementById(cId).title= cNewTitle;

After using that function, the old title is still displayed and additionally the new title is displayed as a standard tooltip.

How can I solve that issue.

Many thanks an best regards,

Juergen

Reply From: Likno Customer Support

Dear Juergen,

The problem is that after the tooltip is applied to your element, the “title” attribute is changed to “oldtitle” in order to avoid the standard browser tooltip from appearing. Hence all you need to do, is to change the “oldtitle” instead. I believe the following should do the trick:

document.getElementById(cId).oldtitle= cNewTitle;

Best 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

 

Tags: , , , , , , , , , , ,

 

Knowledge Base support case for Likno Web Modal Windows Builder, abstracted and stripped of all user’s private info.


Initial Email From:
Quy
Initial Email Subject: Web Modal Windows - API
Support Case Month: March 2012

http://www.likno.com/jquery-modal-windows/api.php

Reading the API, I don't know where to change/add the parameters. Please provide instructions.

Thanks.

Reply From: Likno Customer Support

Hello,

Can you please give me more information on what you want to achieve?

The generic idea is that you can call the modal window directly by using JavaScript:

Modal_Window_1();

And you can pass different properties there:

Modal_Window_1({width:'500px',height:'400px'});

If you have something specific in mind, please let me know so that I can better help you.

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: Quy

Hello,

I will be using PHP. The multi by links will be dynamically generated via PHP/MySQL. I want to display a multisheet of images where the header/footer pertain to the image (sheet). There will be a Like link in the footer. Would it be possible to click the Like link and the current sheet be refreshed with an Unlike link plus the number of likes without dismissing the modal window completely?

Thanks,
Quy

Reply From: Likno Customer Support

Dear Quy,

Everything is possible but this would require custom coding on your side. You could for example give the “like counter” a specific ID and when you click on “like/unlike” you could directly edit this through JavaScript and also change “like” to “unlike” and vice-versa.

I am afraid however that this is completely out of our support scope (as it is not really related to the modal window itself or its API) so I cannot really help you on the implementation details.

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: Quy

Yes I understand. I can do the custom coding but I couldn't tell from the API doc where to insert the parameters to change the header/footer text for each sheet in a multi link window. I wish there was an actual sample so I can see it in action. Is there one?

Reply From: Likno Customer Support

Hello again,

I am afraid that it is not possible to have a different footer per sheet in the modal.

You can generally use the API to change the footer of the modal, but nor “per sheet”.

In order to change the footer of the modal you would need something like this:

Modal_Window_1({footer:{text:"new footer"}});

Or along with other parameters:

Modal_Window_1({footer:{text:"new footer"}, width: "200px", height: "300px"});

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: Quy

I understand the parameters and how to modify them but where to insert them. Do I add it to the onclick attribute? I am on my iPhone so I am unable to test it out.

Reply From: Likno Customer Support

Yes, the onclick property of a page element would be an ideal place to put your code.

Similarly, you could put it anywhere you would put JavaScript code e.g. in the body “onload”, or “onmouseover” of some item, or simple within a <script> tag to be executed immediately. Especially for the last case, please make sure that the modal library has loaded first. A typical way to check for this would be:

if (typeof Modal_Window_1 == "function") Modal_Window_1();

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: Quy

Sorry for being dense. I am just not getting it. How to modify the following to replace the footer text?

<a href="viewtopic.php?id=44390" target="Modal_Window_1_multi_links">Click here</a>

Thank you!

Reply From: Likno Customer Support

Hello,

Unfortunately you cannot use the “page links” method together with the API, so you cannot have “multi_links” AND change the footer at the same time.

If you want a single-sheet Modal with a custom footer, you can do something like this:

<a href="javascript:void(0);" onclick="Modal_Window_1({bodySource:'<div externalUrl="viewtopic.php?id=44390"></div>', footer:{text:'new footer'}});">Click here</a>

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

 

Tags: , , , , , , , , , , , , , ,

 


© 2009-2012 Likno Blog – Drop-Down Menus, Javascript Menus, CSS Menus, jQuery Scrollers/Sliders, Modal Windows