anchor

How to center text in TD with anchor/link that fills 100%

大憨熊 提交于 2019-12-07 14:06:48
问题 Have made some trials to create a TD with an integrated link that fill the TD 100% so when I hover the mouse over the entire TD I can see a change of the cursor and when selected by tabbing to the element the entire TD gets selected etc. The problem is that I get different behavior across different browsers and I am unable to find a solution that works across different browsers. Mostly a problem to center the text. If I only have the TD and make a Javascript onclick event to handle the click

URL anchor is attached to the title attribute in Internet Explorer — why?

删除回忆录丶 提交于 2019-12-07 13:28:22
问题 I found a weird bug that only occurs in Internet Explorer (6 through 9). Take for example the URL http://www.spiegel.de/#any_anchor_value which I open in any Internet Explorer. (From what I can tell it works with any URL) As soon as the page finishes loading, that anchor tag is attached to the title of the browser window. (In this case even twice…) When I inspect the DOM of this page, it even appears in the title tag: This works on any website and in any version of the Internet Explorer from

Clicking on javascript anchor with htmlunit does not seem to work

ε祈祈猫儿з 提交于 2019-12-07 11:17:36
问题 I am using htmlunit to automatically go through a website. Here is the problem: I want to click on an anchor in order to display a new page of a given table. Here is the anchor: <a href="javascript:__doPostBack('GridView1','Page$7')">7</a> Here is my code: final HtmlAnchor a = page2.getAnchorByText("7"); HtmlPage page3 = a.click(); System.out.println(page2.getWebResponse().getContentAsString()) System.out.println(page3.getWebResponse().getContentAsString()); I do not have any error message.

Chrome not displaying all list items with display:inline

痴心易碎 提交于 2019-12-07 09:20:02
问题 So I have an unordered list with 7 items in it, they are displayed as inline and inside of the li there are empty anchor tags (I really need them to be empty and anchor tags). Here's a link http://jsfiddle.net/FTHMf/2/. Chrome only displays 6 of them, and I wonder why, firefox seems to display all 7. Also, I don't want to use inline-block for various reasons. Is there any way to fix this? What causes the problem? Thank you! HTML <ul class="john"> <li><a href="#"></a></li> <li><a href="#"></a>

XHTML: Placing DIVs in A tags

梦想与她 提交于 2019-12-07 09:14:46
问题 Is it alright to place div tags inside anchor tags? Will contents of the div redirect the page to the href of the anchor tag? 回答1: Is it alright to place div tags inside anchor tags? Yes, if: You are using HTML5/XHTML5; and The anchor tag is not in an inline context. i.e. a descendant of an element that only allows phrasing content. Otherwise no. In HTML5/XHTML5 the <a> element in not simply an inline element as it is in HTML4/XHTML1. Instead it has a transparent content model, which means

How to get anchor tag on background image of div?

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-07 08:40:39
问题 HTML: <div id="facey"> <a href="http://www.facebook.com.au"></a> </div> css: #facey { float: left; width: 32px; height: 32px; background: url(file:///C|/Users/User/Documents/TAFE%20-%20Web/ICAWEB411A%20Design%20simple%20web%20page%20layouts/testing%20color/icons/facey%20sprite.png) no-repeat 0 0; } #facey:hover { background-position: 0 -32px; } I have a css sprite for social media icons and I've been trying to put an anchor tag on them to go to there respective websites and I'm not sure how

Force browser to not use cache when requested for file using anchor tag

风流意气都作罢 提交于 2019-12-07 08:08:44
问题 I have an anchor tag that is used to request the download of a file. Like this: <a href="app/results?fileName=t12.txt&other-param=something" title="Click to download"> Download </a> The file may be modified on the server very often, so I want to make sure the browser does not cache the file. However, testers found out that, although it seems to always download the file when you click on the link, when you right-click on the link and choose "Save As...", the browser seems to choose to use the

Is it possible to use an <a> tag within a <pre> tag?

隐身守侯 提交于 2019-12-07 07:53:29
问题 Im working with some legacy code that generates a given message on a webpage but surrounds it with a <pre> tag - I was hoping to put a link (anchor tags) within it like this: <pre>User created successfully - <a href='/View/User/17'>click here</a> to view the users profile</pre> But I think because its a <pre> tag it ignores tags within it. Is there any way around this? APOLOGIES Im really sorry to have wasted everyone's time - the reason why it was happening was due to the fact that I was

Javascript to redirect from #anchor to a separate page

人盡茶涼 提交于 2019-12-07 04:58:58
问题 I have a set of links with #anchors pointing to a single webpage and I would like to smoothly move to a model with a separate webpage for each of those links. I want the old links to keep working using a redirect. Old link style: /all_products#A /all_products#B /all_products#C New link style: /products/A /products/B /products/C I know that the server does not receive the #anchor name in the request but Javascript might. Is it possible to automatically redirect from /all_products#A to

How to execute javascript of one page on click to trigger a click event on another page?

自古美人都是妖i 提交于 2019-12-07 01:54:01
问题 This is what the link looks like on page 1: <li id="click1"> <a href="products.htm#test4Handle1">TNT Cable System</a> </li>` This is what I want to trigger on page 2: <a name="test4Handle1"> <button onclick="$('#test4Handle1').click()">TNT Cable System</button> </a> my attempt at jquery $("test4Handle1").observe('domready',function() { document.getElementById("test4Handle1").click(); }); What page should have the javascript page 1 or 2? 回答1: Check if this helps you. Following is one example I