Add to Favorites link (is it possible these days?) - hyperlink

I'm in a corporate environment. We have an internal web site with lots of pages that shows data for various employees based on a selected date from a drop-down list. When they favorite a page, the selected date is in the URL so that gets favorite'd as well. I need to make it so when they add a page to their favorites, the date portion of the url is removed so they always come back to the latest date available. I know the AddFavorite functionality doesn't work anymore. It's looking like I am going to have to make a link that redirects them to the current page without the date part of the url so they can favorite that. But that just seems clunky.
tl;dr I need to make a Favorite This Page link that removes the date part of the url. Is it possible without the use of the javascript AddFavorite function?

Related

importxml function in Googlesheet

First of all, I'm completely incompetent and my hours-long attempts at trying to make this work have been fruitless. So, please, there's someone that can help me.
I have
table id="..........." tablesorter class="........"
They are in the same line of code ad I'm able to scrape until the first element. For me it's important to scrape by the second one. I'm tryng different way but nothing
investing
In the image, in the part highlighted on the left where there is the drop-down menu, it's possible to select the different American markets (Nasdaq, DowJones,
S&P500 etc.). When I select a market other than DowJones, the URL of the page always remains the same, while the part that I highlighted on the right changes (tablesorter class = "............").
In my sheet, I've done this but it can't allow me to scrape different market (only the default table thay you see when open the webpage)
spreadsheet
Your main problem is that IMPORTXML can only retrieve information from static content in websites. Therefore, any content inserted dynamically can't be retrieved by this function.
In your case, you can check what content is not static by heading over to the website https://it.investing.com/equities/americas and then disabling JavaScript on it. To do so if you are using Chrome please follow this guide.
As Javascript will add dynamic content to the site, when you disable it you will observe that the information subject to change with the dropdown doesn't actually change which means that it was dynamically inserted and therefore can't be accessed by IMPORTXML. I have attached an image below showing this.
As a workaround to this you will need to use other web scraping techniques.

Can I use a URL link to pre-select the value of a drop down menu?

This is the webpage: http://dnr.alaska.gov/ssd/recoff/sag/BookandPageSearchMenu.cfm
I would like to be able to pre-select the District drop down menu using the URL that goes to that page.
Something like:
http://dnr.alaska.gov/ssd/recoff/sag/BookandPageSearchMenu.cfm?District=Palmer-311
But that doesn't work.
Is this possible using the URL?
If the web page is set up with a script to parse the URL and set the select box accordingly, yes. It is not possible on a random page lacking such built-in capability (which is likely the vast majority of pages).

Joomla - Wrong url path from google results

I have a strange problem in one Joomla website.
If i access from homepage and then navigate into the site it works correct, but if i go in some internal page from google results it shows uncorrect page layout, because the url is not correct.
This is the correct url
Correct page from homepage
and this the uncorrect url that Google finds Uncorrect page from Google
in this second page is showed rating module (that i never used) instead of an article, as you can see in links.
Someone can help me?
EDIT: I'm using Joomla 2.5 version. Every menu item is category blog type, and must show all articles of one category. Each category have 2 articles. In the uncorrect link seems that it access to single article, adding the rating that i have hidden in each article
Which version are you using?
if you can turn on SEF option in the global settings in joomla admin. Then you need to make sure all your articles are in menus. then if you link them on different pages it should keep the url the same.
The way you have it at the moment with all the x=123&... get params pages will show for what ever ids you change the menu to.
The reason you are seeing an uncorrect layout is the two different Itemid parameters (the right url has 127 while the wrong one has 104). The rest of the difference in the urls will be ignored by Joomla.
Solution: Find your menu item with id 104 (look at the menu ids on the right of the menu items view), then check which modules appear on the page from there. There may be modules in non-visible positions.
One of these modules is publishing the links with the wrong ids. If it's a Joomla core (like a search module) you can usually force the Itemid either in the module or in the component's configuration. Else you need to fixsome third party code.
Only once you have solved the multiple-itemid should you turn on SEF, otherwise you'd get the same problem only more difficult to trace.
sh404 could help you with this, I'd give it a try on a test site to see if it gets you out of trouble faster.

Linking to a specific section of a page from Google custom search engine result

I would like to know if there is a way when using Google custom search engine to have Google CSE link to a page with a URL like this
http://www.mysite.com/mysection/mysectionarticles.html#myarticle234
or something close to that.
Let’s say Google would find the searched words in a certain part of the page it could be in a or after an anchor or something like that and would supply in the search result a way to link to this specific section of the page.
So if you have big pages the user wouldn't have to scroll through the page to find the relevant part he saw in the CSE snippet.
It could also be used if you have a dynamic page that change state using JavaScript. Part of the page is hidden to the user until he does an action in the pages, but this hidden content was indexed by Google because it’s part of the page. So when the user clicks on the link in the search result he ends up on a page and can’t find the relevant part because it’s hidden.
Take a look at Google's support for structured/rich data and ajax urls for crawling (aka hash-bangs). One or both of them ought give you access to the pages with the right things displayed.

hide hyperlink text of anchor <a> tag in browser status bar but it should navigate

I have a referral project.
In that there is an agent between the
affiliate(my site) and the target site.
So all hyperlinks displayed in my
site will be redirected to the agents
site and then it is redirected to the
target site.
The hyperlink itself is the link to
the agents site.
So i am displaying all products. I
have given links to them. When users
hover a hyeprlink you can see the
href text displayed in the status bar
which will be the agents site.
The requirement is the hyperlinks of
an agent site should not be displayed
in the status bar.
My solutions and assumptions
So i can use span onclick =
window.location = hrefOfAgentLink.
I have seen in other sites that they
redirect to another scripting page
and then the redirection takes
place. for example
http://sitename.com/click/id=32.
The id refers to the hyperlink in
database. hope they fetch the link
and they do a location header to
redirect to the agent page.
Why so? because the user should not see where the link goes.
I want to know whether there is(are) any other option(s) so that the hyperlink will not be visible in the status bar and in the address bar when it is redirecting.
Anyway when redirecting the agents url is not visible because it immediately redirects to the target site.
I would like to have the stackoverflow users suggestions. Thank you.
You used to be able to set the status bar message using javascript, but you can not do that reliably anymore. This is most probably because the browser wants to protect the user. Instead of trying to hide the URL, perhaps you should work on a "redirect-URL" that looks reliable and that makes it obvious to the user both that it is a redirect-URL and where it is going. For example this kind of URL would both make me aware of where I am going and that my access is going to be recorded:
tracker.my-ad-network.com/stacktrace.com/ad/568
Instead of something like this (that would not make me feel safe):
dashj2.gggfbad.com/index.php?aid=1232808432&ref=123432.
And as noted above, start accepting serious attempt to help you or people will simply stop :)
Piotr
You can use the new data attribute so your code would look something like this:
link text
Then in your JS, if you're using jQuery for example:
$('a').click(function(e){
e.preventDefault();
var loc = $(this).data('redir');
window.location = loc;
}
Not too hacky for what you're trying to accomplish.

Resources