![]() |
Question for Code Gurus
Question for Code Gurus
I want to add a link from Site A to Site B, where Site B has a link with an onclick attribute. For example: Site B has a welcome page. The welcome page contains this link: <a href="javascript:void(0);" onclick="openLoginModal()">Login</a> I want to create a link from site A, to the welcome page of site B, but that automatically opens the LoginModal as onclick. I tried something like this: <a href = "https://example.com" onclick="openLoginModal()">Click here</a> But it doesn't work. Any help is appreciated. Thanks! |
Simplest way is like this:
Link to https://siteb.com/?modal=true and then on siteb page <?php if($_GET['modal']) { ?> <script> openLoginModal(); </script> <? } ?> If it's a smarty template you have to do it with JS |
This doesn't make any sense to me. Why would a link invoke the modal on the welcome page? The destination page should execute it...
|
Quote:
|
All times are GMT -7. The time now is 12:50 AM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123