Mailto link is not working in chrome and firefox browsers.But same thing working in My android phone - mailto

mailto for email
I wrote below code in my blog,
<a href="mailto:harehare#gmail.com?subject=My blog">
<div class='social-popout'><img alt='Gmail social icon' src='http://i57assa.com/106asaj5h.jpg'/></div>
</a>
I also chnage setting in my chrome browser's handler too...

Your mailto-URl contains a space. Spaces in URLs are unsafe characters and must be encoded. See Is a URL allowed to contain a space?

Related

link to anchor from URL using react

I have a FAQ page i have created with many questions and answers in the form of
<div>
<h4 id="anchor-name">question</h4>
<p>answer</p>
</div>
This works as expected if i have a button or clickable link in the form of
Click here to go to anchor
which takes me directly to my question with that id (expected behaviour)
The problem is when i try to access this from a URL from another tab by doing something like
https://my-app-url/#/FAQ/#anchor-name
it redirects me to my FAQ page but not to my question. Instead, it just loads the FAQ and stays on the top.
Some context:
frontend is in react
the first # in the url https://my-app-url/#/FAQ/#anchor-name is mandatory. Apparently if i just go with https://my-app-url/FAQ/#anchor-name it never loads the page
I have tried enclosing the <div> tags and the <h4> tags by an <a> tag but it didn't work. In those cases what i did was
<div>
<a href="#anchor-name">
<h4 id="anchor-name">question</h4>
<p>answer</p>
</a>
</div>
What i wish to know and cannot seem to find it by doing research a lot is:
Is it possible to access this anchor via URL from an external link by using react-router library?
Could it be that by using react the html way to anchor is not working as expected?
Is my first # in the URL interfering with the anchor linking feature?
You don't need that last / right before the #anchor-tag.
so the URL would be:
https://my-app-url/#/FAQ#anchor-name
For anyone who might be interested, I fixed this issue. The problem was fixed by replacing HashHistory with BrowserHistory. With HashHistory, the URL gets an # that interferes with anchors. By using BrowserHistory, that # is never there so the issue is gone. Hopes this helps.

IE sends ? character instead of Unicode characters in HTTP GET

I've created a web form for search operation in one of my projects, and the HTML is pretty simple:
<form action='/search' method="post">
<input type="text" id='search-term' name='search-term' />
<input type="submit" id='start-search' alt='' value="" />
</form>
So, when user types Unicode search term and hits Enter, an HTTP Get request would be sent to the server with this URL:
http://www.example.com/search?search-term=مثال
This, in server would be:
http://www.example.com/search?search-term=%D9%85%D8%AB%D8%A7%D9%84
and I'm able to retrieve the decoded value of the search-term query string using HttpContext.Current.Server.UrlDecode("%D9%85%D8%AB%D8%A7%D9%84") which returns مثال to me. Till here everything works fine and I have no problem.
However, if somebody type the aforementioned address directly in IE9, and hit Enter, then what I get at server is:
http://www.example.com/search?search-term=????
What's wrong here?
Update: We checked the traffic via Fiddler, and you can see the result in following pictures:
HTTP Get headers, captured by Fiddler, requested with Firefox
HTTP Get headers, captured by Fiddler, requested with IE
IE does not know what charset you want to use when typing the URL manually, so it has to use a default charset. ? characters occur when Unicode characters are converted to an Ansi charset that does not support those Unicode characters. When submitting a webform instead, IE uses the charset of the webform, which can be specified by the <form> tag itself, in <meta> tags within the HTML document, or the HTTP Content-Type header, so there is less chance that IE has to guess the correct charset to use.

Adding sound in a web site

How can I add sound to a web site . I don't want to show .swf player in the page .music should play in the background
You can use the <audio> tag, but check if that is supported in all browsers you are interested in. If not, you can use an invisible swf.
But I'd recommend you not to putting background sound into the site, it tends to be really annoying.
Hide the div element inside which you put the swf object, in the page. Set the display state to none instead of block. Something Like :
<div style="display:none;">
<Your swf object>
</div>
It's old but it works.
9 Versions to play a sound on a web page
I've used version 8 "Using a Java Applet called from JavaScript" for firefox and IE8.

Mobile Phone Browse Escape Ampersand (&) for URL Developed in ASP.NET MVC?

This is a strange one that I cannot see to figure out. I have a basic mobile site that is coded in ASP.NET MVC (really shouldn't matter in this case but just to put it out there)
When I browse to the specific page, I receive the following error.
This page contains the following errors:
error on line 56 at column 43: EntityRef: expecting ';'
Below is a rendering of the page up to the first error
Now the line specifically is rendering a basic anchor tag does have an ampersand in the query string (should be pretty standard right?). Why might this be an issue?
The IPhone does not have any problem rendering it, nor do regular browsers (IE8, Chrome, FF, etc). By my the Palm Pre Browser, Android, and BlackBerry Bold all display it.
Specifically, below appears to be the offending line (part of a basic paging control):
<a href="/Mobile/LotBrowse?page=2&watchList=False" style="text-decoration: none" title="go to page 2">
<span class="page-numbers">
2</span></a>
You need to use & for all & in your XHTML code. Any where and every where it is used
http://www.w3.org/TR/xml-entity-names/
http://www.digitalmediaminute.com/reference/entity/index.php

Adding presence indicator to a custom web part

I have a custom web part which is generating some user data. I have added the appropriate code to output the standard presence icon and menu however this is acting rather stangely.
The rendered html of my web part is as follows:
<span>
USERNAME
<img border="0" height="12" width="12" src="/_layouts/images/blank.gif" onload="IMNRC('USEREMAIL')" id="imnUSERID" ShowOfflinePawn="1" />
</span>
Obviously replacing USERID, USERNAME, USEREMAIL etc.
The problems are twofold.
1) In IE7 the presence information does not get retrieved. The menu displays correctly but the icon does not appear and when you hover over the gap the drop down menu does not provide IM settings.
2) In IE8 RC1 the presence information comes back correctly and the icon displays, but the drop down list is rendered severeal inches above the icon. (see this screenshot)
Any help with these issues, or with other tips about adding presence to custom web parts would be greatfully received.
Update on progress
- Adding web page to 'Trusted Sites' for IE7 - did nothing
- Compatability view for IE8 makes no difference.
- Changed to id="CSRP_id,type=sip"
Changed code to the following on recommendation:
<span>
<img class="PresenceImage" src="/_layouts/images/imnhdr.gif" onload="IMNRC('USEREMAIL')" name="imnmark" ShowOfflinePawn="1" id="contact_im,type=sip" />
</span>
None of the above updates have been succesful.
First, you are going to have to eliminate whether you have a styling issue or a javascript issue.
If all of your presence bubbles display correctly, then get the IE Developer Toolbar and try and trace the css back. Even change the themes of the site and see if you get a different result.
This is our html, which works nice
<span>
<img width="12" src="/_layouts/images/blank.gif" onload="IMNRC('[USERMAIL]')" id="IMID[GUID]" ShowOfflinePawn=1 alt="Presence bubble">[USERNAME]</span>
Note:
[USERMAIL] = obvious
[USERNAME] = obvious
[GUID] = random guid
Also note the malformed img tag with no end "/>" (just ">"). We use this as this is the html generated by SharePoint (please don't get me started on that).

Resources