setting html parameter option dropdown value via url - html

I would like to set the default of a drop-down menu of a webpage by passing the default value in the url.
Id like to put a link on a another webpage to this site where the: "I would like my contribution to go to:" option is set to Pakistan: moonsoon floods e.g. by doing something like:
http://donate.ifrc.org/?desc=Pakistan: monsoon floods
but this doesnt seem to work. Any ideas i want to put up this link to get as many people to donate as possible. Thanks.
~f

Unless the site you are linking to has specifically included code on their pages to support it, you are not going to be able to control how their site performs by changing the URL.
If you were trying to do this on your own site, you could easily do it by referencing the querystring parameters in whatever server-side language you built the site with, or on the client-side via Javascript. But in either case, the site itself controls how it responds to a URL, not the other way around.

Related

wants that when I click on the any index hyperlink, then it is displayed on main description page

I have made an web page. There are two iframes
In it. First is of index and second one is description page. I want that when I click on the any index hyperlink, then it is displayed on main description page.
How it will be possible? please give me the HTML code
You can use a button and when clicking it, change the url of the iFrame using Javascript like this:
document.getElementById('iframe-id').src = newLink;
You can use the data-attribute to store the wanted link in your html.
In case you want to do that: It is not possible to react to things outside of an iFrame through an iFrame. So you cannot put a link in iFrame1 and have it reload iFrame2, because those are two different websites and don't see each other.
Now, idk what exactly you are planing to do, but I really hope, that you don't want to make your entire site like that. Using iFrames is really only useful for things like inserting widgets (like Codepen etc.), but should never be used to display information from your own site. If you don't want to copy your html for every site then use PHP. If you don't want to reload your entire webpage (which is pretty much never a problem) you can use AJAX-requests to load parts of your website. (Frameworks like React.js, Angular.js and Vue.js do that for you)

Jumping to anchor on existing ajax/hash url

I have an ajax application that uses links like the following to serve appropriate pages...
www.mysite.com/#story=1
Depending on what link a user clicks on at www.mysite.com, I want the appropriate ajax-served page (e.g. www.mysite.com/#story=1) to load with the user directed to a page anchor.
The problem I'm having is that something like this doesn't work...
www.mysite.com/#story=1#pageHeadingAnchor1
(Because I'm assuming the initial hash I'm using to denote a page is preventing the second hash functioning as a page anchor).
Does anyone have an idea of how to deal with this combination of requirements (Ajax app hash plus page anchor hash)? Seems like I might need a javascript solution to parse a second argument and then programatically jump to the anchor? Or perhaps there's a better way?
Thanks for any thoughts at all.

How to get website URL in a SharePoint custom masterpage?

I'm making a custom masterpage and on the navigation bar, I would like to have a button which goes back to the current site main page. This masterpage will be use for other subsites as well. Is there a way for me to get the current site URL within the index file?
You can use URL Tokens to get your site URL.
<SharePoint:SPLinkButton runat="server" NavigateUrl="~site/" id="homelink">
</SharePoint:SPLinkButton>
Notice the URL token of ~site used in attribute NavigateUrl="~site/". You may have to use the $SPUrl command also.
<%$SPUrl:~site/myPage.aspx%>
You can also refer to this discussion for more usage examples.
NOTE: I haven't tried the above examples, but these should be sufficient to provide you a path to your answer.

Blogger no longer respects the chosen dynamic view

I have a Blogger site with CSS customized dynamic view template, where each section on the menu had a default view (magazine, flipcard, mosaic).
I say "had", because recently I've noticed that Blogger does not longer respect the choosen view, when passing from one section to another which has a different view (for example url: from ?view=mosaic to ?view=flipcard). I wonder if anyone has encountered the same problem, or if there is a way to "force" a certain view, as formerly.
I'm no expert at all, but i think the fastest solution should be finding a way to 'force' the browser on refreshing the URL query strings. For example, when I navigate from
www.alesserfate.com/search/label/audioKB?view=timeslide
to
www.alesserfate.com/search/label/videogame?view=mosaic,
, and then back to the first link, the URL query "?view=timeslide" seems to be overridden and the page is displayed with the (wrong) mosaic view.There must be a way to fix this ("forcing" to refresh url query?). I want to emphasize that, this behaviour is NEW ,without touching anything on the blog. Definitely Google has changed something under Blogger's hood.

how to know from where the page is loaded

Is there a reliable way to know from where my page is called? I know there is the referer string in header, but it's not reliable.
I'm building a page that contains some elements (like logo for example) that should be loaded if the page is called by the same context and not loaded if it's called by outside.
I'm thinking to put a hidden attribute somewhere that could be used in any href of submit, but I don't know the better way to do it.
I'm using sitemesh and boostrap.
I could manage this using urlRewrite.
I created a rule like this:
<rule>
<from>^/popup(.*)</from>
<to>$1?popup=true</to>
</rule>
Whit this rule, I can call any url that I need using /popup before to change the layout I need.
So, using the url http://www.mypage.com/mypage.jsp will show the page fully formated and using the url http://www.mypage.com/popup/mypage.jsp will show the page without logo (what I need).