Passing popup link so it shows on the address bar - javascript

I'm very familiar with php/js/ajax, but I'm a little confused as to how to pass the popup link to the address bar.
Basically I have a custom jquery popup. Let's say I click on a link that loads the popup, I want to pass parameters to the address bar so that it reads out the address of whatever I want.
So let's say my page that contains the videos with the links is:
mydomain.com/videos/index.php
and when a video is clicked I want it to read the following in the address bar:
mydomain.com/video/youtubeid
I actually have it all set up to work on the video page if they were to come back to that link. I don't want a popup to come up obviously. The popup links page is like /video/video_pop.php
How would I go about doing this? Is there some way to change the address bar? Is this a htaccess rewrite thing?
Thanks!

You can use the Javascript history API to change the address in the address bar without reloading the page. Mozilla provides instructions at https://developer.mozilla.org/en-US/docs/Web/API/History_API

Related

Navigate without showing page name in navigation bar and w/o frames

I have navigated sites where after signing in, i see the address as, for example:
https://examplesite.com/access
Once arrived, all the links on the landing page are navigable, but the corresponding address of the link never appears in the address bar.
I don't want to hide the address bar, I just don't want the page names to appear in the address bar. It is a cleaner way, instead of having the user see all the lame names of each of the web pages. To me, it just looks better.
Download the wappalyzer extension for chrome / firefox this will help you determine what technologies are being used on the website (though not all the time).
Those sites that are not changing the url will be either utilizing React, AngularJS or another form of JS library which is pulling in data using ajax.
Hope this helps

Url pr0blem, unable to retrieve ?tema=79 after page loads in address bar

http://fb.9nty.com/?t=Outrage+ShopRite&l=www.learnmoreng.com/forum2_theme_111582910.xhtml?tema=79
I use a Facebook share plugin to share links, but after links is shared and been click upon, the browser opens the page ignoring ?tema=79
Is there any ways to help?
I would want to use this: http://fb.9nty.com/?t=Outrage+ShopRite&l=www.learnmoreng.com/forum2_theme_111582910.xhtml&tema=79
And implementing a code that automatically changes &tema to ?tema and reloads the page
url encode the link (the part after &l=) - so the share link becomes:
http://fb.9nty.com/?t=Outrage+ShopRite&l=www.learnmoreng.com%2Fforum2_theme_111582910.xhtml%3Ftema%3D79

Why does Facebook navigation bar fixed and placed on top does not reload on moving to other pages?

I was curious about this since a long time ago. When we click on any link in the page, like security page or even a person's name or inbox, the url changes but the navigation bar remains as it is. It does not reload but the rest of the page does, I know things like this can be done using Jquery and by changing the elements of display but how does the url change too!
It is a combination of AJAX and the history.pushState() method which allows you to update the URL and manipulate the browser's history:
https://developer.mozilla.org/en-US/docs/Web/Guide/API/DOM/Manipulating_the_browser_history#The_pushState()_method

Open fancybox with url of page in address bar

I have stucked somewhere please have a look and get back to me if you have some idea on that:
I want to open a page in fancybox and url of page which is opened in fancybox should display in address bar. I dont want to display url with http://abc.com#divid it should be a proper url without #divid.
It should be something like that :
http://exanple.com/title1
here is my html code:
<a id="example1" href="general.php">Recent Trip to New York</a>
jQuery code:
$("a#example1").fancybox();
Is there any way I can implement the things like I have mentioned..
URL in the browser can be manipulated with HTML5 history, but in this case it would not be advised as the user is simply viewing another page via an iframe, and they remain on the parent page.
Mozilla Developers: Manipulating The Browser History

Facebook share with custom text on button

It used to be done this way:
<script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"></script>
<a type="button_count" share_url="http://google.pl" name="fb_share">Share this page on Your's wall</a>
And it used to generate a share button with text "Share this page on Your's wall" instead normal "Share". Since last update it doesnt work anymore.
Is there any posibillity to change the text on share button?
With Facebook JS SDK:
You now have to use the Feed Dialog, which is part of the Facebook JavaScript SDK.
Without Facebook JS SDK:
If you don't want to be bothered with their SDK, you can use this simple link instead:
Share this page on your wall
Here's what it'll look like if you're sharing Google.com with this link:
https://www.facebook.com/dialog/feed?app_id=140586622674265&link=http%3A%2F%2Fgoogle.com&name=Google&redirect_uri=http%3A%2F%2Fs7.addthis.com%2Fstatic%2Fpostshare%2Fc00.html
Also, please acknowledge these three things:
You need to replace [[URL]] and [[TITLE]] with a link to the page you want to share and its title (both url-encoded).
The Feed Dialog has to show from which Facebook app the post comes from. The app_id parameter in the URL above is the one from AddThis. Create a Facebook app and put its own id in the URL to use the name you want instead of "AddThis Sharing". You can keep the app_id from AddThis though, it works just fine.
The last parameter (redirect_uri) is the page where the user will be redirected after sharing. It's currently a page from AddThis with some JavaScript that will close the tab / window. That way, the dialog just disappears when it's not needed anymore. You don't have to change it either, works great.

Categories

Resources