![]() |
![]() |
![]() |
||||
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
Videochat Solutions
Industry Role:
Join Date: Aug 2004
Location: Canada
Posts: 48,880
|
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! |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
Confirmed User
Industry Role:
Join Date: Aug 2006
Location: Poland
Posts: 9,228
|
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
__________________
Mechanical Bunny Media Mechbunny Tube Script | Mechbunny Webcam Aggregator Script | Custom Web Development |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
Confirmed User
Industry Role:
Join Date: Feb 2001
Location: Northern Cali, USA
Posts: 3,442
|
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...
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 |
Confirmed User
Industry Role:
Join Date: Aug 2006
Location: Poland
Posts: 9,228
|
While that is what he wants to do, he's thinking about it the wron gway. He needs to invoke the modal without pressing the button when linking from the other page, not invoke the modal from site A
__________________
Mechanical Bunny Media Mechbunny Tube Script | Mechbunny Webcam Aggregator Script | Custom Web Development |
![]() |
![]() ![]() ![]() ![]() ![]() |