hyperlink

CakePHP: image inside link, want to make link point to image location

那年仲夏 提交于 2019-12-19 11:07:01
问题 I have some images inside links that I want to essentially look like this: <a href="/path/to/img.png"><img src="/path/to/img.png" /></a> Clicking on the link should load the image it contains. I'm trying to use CakePHP's HTML helper to do this, as follows: <?php echo $html->link( $html->image('img.png'), 'img.png', array('escape' => false) ); ?> When I do this, however, I get the following code: <a href="/pages/img.png"><img src="/path/to/img.png" /></a> Without using absolute URLs , can I

Defining multiple URLs within a Person

风流意气都作罢 提交于 2019-12-19 10:34:11
问题 I'm defining a Schema.org Person item on my website using Microdata. Most of it is self-explanatory. However, each mini profile on a summary page has three URLs - one which links to the Person's full ProfilePage , and two more for LinkedIn and Twitter. Do I define all three as URLs, or do I ignore the social media account URLs, because only the "read more" style link is actually the URL for that person? 回答1: For the link to the person’s profile page on your site, you should ‎definitely use

I need a regular expression to convert US tel number to link

依然范特西╮ 提交于 2019-12-19 10:25:22
问题 Basically, the input field is just a string. People input their phone number in various formats. I need a regular expression to find and convert those numbers into links. Input examples: (201) 555-1212 (201)555-1212 201-555-1212 555-1212 Here's what I want: <a href="tel:(201)555-1212">(201) 555-1212</a> - Notice the space is gone <a href="tel:(201)555-1212">(201)555-1212</a> <a href="tel:201-555-1212">201-555-1212</a> <a href="tel:555-1212">555-1212</a> I know it should be more robust than

Show a div when click on related link and hide the others

半城伤御伤魂 提交于 2019-12-19 10:18:06
问题 I've this code: <head> <script> $(document).ready(function(){ // Optional code to hide all divs $("div").hide(); // Show chosen div, and hide all others $("a").click(function () { $("#" + $(this).attr("class")).show().siblings('div').hide(); }); }); </script> </head> <body> Click a button to make it visible:<br /><br /> <a href="" class="one">One</a> <a href="" class="two">Two</a> <a href="" class="three">Three</a> <a href="" class="four">Four</a><br /><br /> <div id="one">One</div> <div id=

change domain portion of links with javascript or jquery

风流意气都作罢 提交于 2019-12-19 09:55:09
问题 Sorry for my original question being unclear, hopefully by rewording I can better explain what I want to do. Because of this I need a way to use JavaScript (or jQuery) to do the following: determine domain of the current page being accessed identify all the links on the page that use the domain www.domain1.com and replace with www.domain2.com i.e. if the user is accessing www.domain2.com/index then: <a href="www.domain1.com/contentpages/page.html">Test 1</a> should be rewritten dynamically on

Open pop up/external site link in current webview

爷,独闯天下 提交于 2019-12-19 09:09:45
问题 I am currently writing a webview, it first loads a twitter page (say, NHL, http://twitter.com/nhl) as you can see, you can find the tweet for NHL, and each NHL tweet has another link for user to click, e.g. bit.ly/ujcNZo in my webview, if i click that link (i.e. bit.ly/ujcNZo), my webview, after 1 second, doesn't display anything but a twitter icon on a white color background, it should load the content but it didn't. after some time of investigation, i think it has to do with the fact that

Excel conditional Hyperlink outputs the Hyperlink for both conditions

十年热恋 提交于 2019-12-19 08:13:13
问题 I think I must be going mad here, what I want to do is to write a simple Excel formula that performs an IF test, and if the result is false I want to hyperlink some text, if it is true I want to display some text which is not hyperlinked. So for example - =IF(1=1,"1",HYPERLINK("2")) this returns 1 as you would expect, but the 1 is hyperlinked - I only want to hyperlink if the value is 2. Surely this is possible? Thanks in advance for any advice! 回答1: Update: Oh, I was wrong. I checked into it

Embed hyperlink in PDF using Core Graphics on iOS

你说的曾经没有我的故事 提交于 2019-12-19 08:06:15
问题 I'm trying to do a quite simple thing: write an URL inside a PDF file that can be actually clicked by the user. I know for sure that using libharu it can be done. What I'm looking for is to do the same using Core Graphics since the whole code I already have in my app is already using those methods. == edit == I think I found something: UIGraphicsSetPDFContextURLForRect but I can't make it to work. I'm using something like: NSURL *url = [NSURL URLWithString:@"http://www.google.com"];

Does Chrome have issue with setting a:visited css properties?

我的未来我决定 提交于 2019-12-19 07:44:54
问题 I am unable to set the background color for a :visited hyperlink to a different background-color. Is this a known issue for Google Chrome? I have seen people raising similar issue with background-image. Setting the color attribute seems to be working fine. This is the code that I used: a:visited{ background-color: red; } 回答1: Instead, use the following: a { background-color: white; } a:visited{ background-color: red; } For security reasons -- specifically, in order to prevent history sniffing

How to bind the URL of a GridView HyperLinkField when the bound value contains a colon?

瘦欲@ 提交于 2019-12-19 06:46:46
问题 I'm trying to bind a GridView HyperLinkField such that the bound column is used as a parameter value in the URL. Pretty standard stuff - nothing fancy, but the binding fails when the bound column contains a colon, i.e. : . I'm my particular case, this value is a string representing a duration of time, e.g. "14:35", or "1:07:19". Here's my GridView, with the time value bound to the HyperLinkField url. <asp:GridView ID="ResultsGridView" runat="server" AutoGenerateColumns="False" DataSourceID=