View Single Post
Old 04-02-2020, 01:22 PM  
2MuchMark
Videochat Solutions
 
2MuchMark's Avatar
 
Industry Role:
Join Date: Aug 2004
Location: Canada
Posts: 48,928
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!
2MuchMark is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote