I know how to use fancybox popup, normally, which means making an link and click open the fancybox.
But the requirement is, if the user presses a link without logging in,
it has to refresh the page with the popup already opened.
Is this possible in fancybox?
use jquery click trigger
Script
$("#autostart").fancybox().trigger('click');
HTML
<a id="autostart" style="display:none" href="select_category.html" class="fancybox fancybox.iframe"></a>
Related
I am parsing a page using an iframe.
I need the href element from a link. This link only display hashed data though. On click, the link trigger a popup, which has the right URL I am trying to grab.
How to get it without leaving my main iframe page, and stopping my javascript ?
I grabbed the link using Jquery dom to print a console.log(link.click());
The popup is blocked and it only return me some hashed data.
<div class="blEntry website" data-ahref="PFnGSCJIiuCWJcVt84pIaQtipEnV1zS0pIaQaVMSpa1EVTVEEJc" data-column="2" data-trackingkey="URL_EATERY" data-eventname="bl_contact_website" onclick="ta.prwidgets.call('handlers.onWebLinkClicked', event, this)">
<span class="ui_icon laptop"></span>
<span>Site Web</span>
</div>
Simulating a click open the popup, which has the URL. I don't figured out how to get the URL when the popup try to open.
I have a page with a iframe in it. On the main page there is a menu. On click of a menu item page gets loaded in to the iframe. There are many hyperlink in the loaded page. Now those hyperlinks should be opened in the same iframe.
When some one clicks the hyperlink it will load a page in the iframe.
My question is :
instead of loading the page which is defined in the src="" of hyperlink I want a different page to load after the user clicks the hyperlink.
I need the java script to change the src="" parameter.
I am working in PHP.
You need to call a javascript function on click of hyperlink and in that javascript function you need to redirect to different url, return false in onclick event of hyperlink
open
<script>
function openURL(){
window.location.href="http://google.com";
}
</script>
I have been looking in too many links but I am not getting the desired results, although it is a very basic question to ask but i am unable to find some useful help.
I have a hyperlink pointing to the external link like google,
Now I want to show a popup when somone clicks on this link, I can fire up a jquery modal or fancybox on onclick event, thats not the problem.
I assume that it is not possible to show my own window on external link?
I need to fire up a modal and after closing of modal, the external link should be opened in new tab.Thanks for help.
I don't know what code to share here as i have only hyperlink
If I am getting you right, solution
in your home page add the link to the popup window
Open
in the popup window add the following link
<a href='http://google.com' onclick='window.close();' target='_blank'>LINK</a>
if it is not what you want, I hope it is a starting point to the solution
Is it possible to implement this behavior:
I have a HTML link on one page, and after a user clicks on it, it goes to another page which has several tabs on it. Upon clicking on one of those tabs, it triggers an AJAX post call which populates and displays content for that tab.
I would like that when a user clicks a link on the previous page, it takes him to another page and automatically clicks a specific tab so it triggers an ajax call which displays the content for that tab.
This site is a Wordpress site, if that information helps at all.
On the 'from' page you can have links such as
Click Me
You can set an onpage load function to load and use a trigger like this
if(window.location.hash === "#customHash"){
//my custom tab loader
}
You can use jQuery Cookie plugin to achieve this. http://plugins.jquery.com/cookie/
You just set the cookie on the first page, when the user clicks on the link
$.cookie('the_cookie', 'the_value');
And on the next page use the jQuery on load function to check for the cookie.
I was using window.showModalDialog() but doesn't work on all browsers.
People recommends me jquery, thickbox and also this contact Example
but the problem is when i submit the page, server will send me another page, and that page will replace my original page!
so actually it doesn't fulfill my requirement.
My requirement is on button click modal page should open and it can redirect to other page on same window without disturbing my original page and when I close My original page get reflections.
So is it possible?
Sounds like you need a simple html target="_blank" in the link to the other page.
http://www.htmlcodetutorial.com/linking/_A_TARGET_95y98y108y97y110y107y.html