I have a login form that opens in a fancybox. My problem is that when the user just clicks on the link nothing wrong happens, but when he opens it in a new tab, the style is messed up, because the page is designed to be minimal (only login form with forgot password link).
How can I make the link on fancybox, not the same as when opened in a new tab?
Can I detect it in PHP (server side)?
Or can I set fancybox to open a different location on clicking on the link ?
I suggest you pass a variable to the login window when the user clicks normally that indicates the page was loaded normally and then server side you decide which CSS to load based on the presence of the variable. That way you can accommodate both cases.
Related
I have made a product landing page (in html ) and a register web page (in php)
I want the user to click on register icon on the html page such that the user should go on to the register page (made in php), to enter it's credentials.
what should i do to solve this problem
welcome!
Let's say the register page is named register.php.
Then simply create a link around the register icon on your landing page, or use text, and link to the register.php file.
E. g.:
🔑 Register
Or if it's on another server, use the full URL (the address the register form in PHP is reachable from your browser):
🔑 Register
Navigating from a .html to a .php-file and vice versa can simply be done using normal HTML links (<a> tag).
i have a php page that logs in an account as if the real person is doing it. i would like to put in a php script that checks the webpage URL currently opened. the page works this way:
i run localhost/loginmirror/index.php from my browser.
new browser window is automatically opened. page loaded is the URL of the page i placed on my code (ex: https://twitter.com/).
i use php scripts to put in the username and password and click the Login button. everything necessary for input and clicking is done by
my php code. no human needed. after clicked, i am redirected to the
next page and so on and so on.
i would like to get the URL of the particular page now opened. i have tried using
$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']
but it retrieves this: loginmirror/index.php instead of returning which page in google mail is now opened.
how do i get the URL that i want to retrieve? thanks
I have this:
Div element (like a bar, with some text and a logo)
Iframe with a page that I cannot modify (in this example: google.com)
What I need is to "catch" (or anything else), all links that user click with mouseweel (or right click it and open it in new window), then, open that link in another window with a div element and an iframe which loads the link inside the iframe, I mean, in a new page exactly like the first, with the div and the iframe.
If user clicks normally any link, it just opens the link inside the iframe (as iframe usually does).
I've found a code that changes all links in website and it opens all of them in new window referring the url of the link to PHP with a parameter, but I don't want to open all links in new window, by default all links in the page it opens inside of a iframe (_self) in html, but if the user wants to open it in new window, I want to allow that, but opening it new window with a div element and an iframe which loads the link inside the iframe...
It is not possible to interact with anything in iframe within different domain. You must use HTTP PHP proxy that will edit the page you display so all links DO redirect on your site.
So the solution would be to have a PHP script that downloads the site you display in iframe, chang ALL links from http://differentsite.com/path/file.php to http://mysite.com/script.php?path=path/file.php so that if the user clicks the link, he gets in your IFRAME view again.
This is how HTTP proxies do work.
From your current question, I understand that you want links to NOT open in a new tab, and to replace the page currently open in the iframe.Short answer: not possible.Full answer:1) Links using target="_blank" cannot be edited inside an iframe hosted on a separate site. This is because of the Same Origin Policy.2) In theory, you cannot ever override what the user wants, even if you could control the iframe content. Specifically, when a user clicks "open in a new tab," this can never be overridden.
I want to display authorization window in popup, however this doesn't seem to be working
getLoginUrl(array('scope' => 'read_stream,publish_stream','display' => 'popup'));
Is it possibble with just php SDK?
Only the client side determines where a page gets loaded (for instance: own window, parent window, top window, popup), server side doesn't control or know about that.
To open a popup window you have to call window.open() (look it up). If you do want to do server-side oauth, you can getLoginUrl() in php and store it in the page (javascript var / data- attribute, etc.) and then call window.open at the right time to open the login url in a popup.
However, you can't just open a popup whenever you want --you'll get blocked. So you'll need to add a "login" link for the user to click on, and an event handler for that click that will open the popup.
I have a web application with a split screen. On one side there is a specific functionality which is linked to the functionality on the right side of the screen.
I need to 'undock' the right side of the screen so the undocked div can be moved (even outside of the browser). This will be a functionality which users with dual screens will largely benefit from.
I managed to do this using a popup window. However, I am not liking the solution. The primary reason is that the popup window is not linked to the main application.
What I mean by not linked is that whenever I click on something from the left pane, its respective page must be popped out in this popup window. However, When I do this, the popup window is closing and opening another one (because of the same ID). This way, I cannot set a boolean variable to set it as false when the popup is closed, because it will be set to false whenever another popup is opened.
Is there a way of knowing when the popup's close button has been clicked from the parent window? That would solve me problems!
Is there a better solution of achieving this without using popup windows. I don't think its possible since when you use modals or functionalities of this sort, the modal will be a child of the parent container and therefore, is an instance in the same browser.
As a side note, this system is implementing with PHP/jQuery
Please let me know your ideas.
whenever I click on something from the
left pane, its respective page must be
popped out in this popup window
It obviously depends on your technical solution. You can handle clicks in the main window and access the DOM in your "undocked" window, so you can get the DIV too and handle it just the way you handled the DIV when it was in your original document.