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 Likno Web Modal Windows Builder, abstracted and stripped of all user’s private info.


Initial Email From:
Diane
Initial Email Subject: Modal Windows
Support Case Month: May 2012

Hi Kostas,
I've created a modal window in which I'm displaying the login portion of another web page. My intent is that the user would login via the modal window and when the Enter (submit) button is clicked, the user should be validated, the modal window closed, and the page that results from the users login should display in the parent window. But, the page that results from the users login is displaying in the modal window. I'm also having trouble getting the modal window to close consistently when the user clicks to close it (or hits ESC).
I've tried using the code both inside and external to the modal project. Right now it is external.
I appreciate whatever direction you can provide.
Best regards,
Diane

Reply From: Likno Customer Support

Dear Diane,

Regarding the form not loading in the main window, all you need to do is to add “target=’_top’” in your form:

<form name="loginform" id="loginform" method="post" target="_top" onsubmit="return submitForm(this.submit1)" action>

You also say that the modal does not close consistently. I assume you refer only to the ESC key, which will indeed not work while the focus is in the form (which is within an iframe). I am afraid that there is not much we can do about this though.

If you see the closing problem anywhere else (or any other issues at all), please let me know.

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

Reply From: Diane

Hi Kostas,
Thanks so much for your quick reply. Unfortunately, the form is a core component of the Learning Management System we're logging into, and is an .asp page that I don't have access to. Can you suggest any other way?
My thanks,
Diane

Reply From: Likno Customer Support

Dear Diane,

How about the landing page? Is this also part of the system?

If you can edit the landing page, you can add a JS check that will “break out of frames” and always load in the top window.

If this is also not possible, then you may try loading the form as “Ajax” instead of “External”. This should also work, as long as the login form does not have scripts.

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

Reply From: Diane

Thank you, Kostas … you’ve solved my problem!

Best wishes for a wonderful weekend!

My regards,

Diane

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

 


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