anchor

Sliding Doors Technique - Browser Compatibility

I am using the sliding doors technique to style buttons on a site I'm making and it seems to be working within Chrome but the background is not displaying for any other browser. My code for the button is below: <div class="small-white"><a href="#">Done Reading</a></div> CSS: .small-white { float:left; background:url(images/small-...

HTML: Empty-linked anchor

I have an anchor that doesn't go anywhere but has an onclick (e.g. <a onclick="..."></a>). My question pertains to the href attribute. What should I put for the value? If I simply omit href, the anchor doesn't have the appropriate decoration--the mouse pointer icon doesn't change when the mouse is put over it. If I use href="#", then t...

How to track anchor tags with Google Analytics

I'm trying to track clicks via Google Analytics that do not result in a new request. Specifically, clicks on tabs that are created via the jQuery UI tabs widget. I'm using the older version of the code ('urchin tracker') and trying to log the clicks like so: $('.ui-tabs-nav li a').click(function() { val = "/tab/" + $(this).attr('hre...

Forms Authentication Redirect cause Anchor loss

So here is the problem. I use Anchors as a non-refreshing way to allow bookmarking of currently view objects. http://myserver/showobject.aspx#objectid=10 I use this so when updating the object id it doesn't try to do a refresh on the page. Heres the rub. I am using forms Authentication to handle access to these pages. So When you t...

HTML anchor link with no scroll or jump

I have various links which all have unique id's that are "pseudo-anchors." I want them to affect the url hash value and the click magic is all handled by some mootools code. However, when I click on the links they scroll to themselves (or to the top in one case). I don't want to scroll anywhere, but also need my javascript to execute and...

jquery - Activate and deactivate hyperlink

suggest me some sample codes to activate and deactivate a hyperlink on clicking it. i tried some of these, but no result 1) $("a#click").onclick = function() { return false; } 2) $("a#click").attr ('href', '#'); 3) $(#document).ready(function(){ $("#disabled a").click(function () { $(this).fadeTo("fast", .5).removeAttr(...

Find spaces in anchor links

We've got a large amount of static that HTML has links like e.g. <a href="link.html#glossary">Link</a> However some of them contain spaces in the anchor e.g. <a href="link.html#this is the glossary">Link</a> Any ideas on what kind of regular expression I'd need to use to find the Spaces after the # and replace them with a - or _ ...

What is the difference between these two HTML anchors?

I tried to use Link Checker to find any broken links, but the second one is not included, the displayedPage.html shows 404 error, but it will not show in the Link Checker's report. What is the difference between the two <a></a>? Why wasn't the second one being checked as a link? <a href="showpage.go?page=mypage&room=yours"> <span>my own...

Image rotation using jQuery but anchor remains the same

I have set up an image slideshow with captions using jQuery. The entire image and caption div is surrounded by a linked anchor. For some reason even though the slideshow function works fine the anchor remains the same as the last one set. i.e. using the example below, the slideshow content will only ever link to "shows/". <div id="mainf...

How do I run PHP code when a user clicks on a link?

I want to have a page run some PHP code when a user clicks on a link, without redirecting them. Is this possible with <a href=""></a> or with the javascript onclick event? ...

Facebook-like anchor scroll

Facebook has a nice scroll effect which I would like to replicate with jQuery. When you load a page it starts at the top then scrolls to the selected anchor. I've tried doing this (page.html#anchor) and using the scrolling plugin for jQuery however it just goes straight to that anchor without using the scroll effect. So can I delay the...

Javascript - getElementById fails if anchor also has a name attribute

I'm running into an odd failure. It seems that if I have both an ID and NAME attribute on an anchor element, document.getElementById fails. If I remove the NAME, it works. I'm seeing this in Firefox 3.5(latest) but haven't checked other browsers yet. Is this a bug or intentional? ...

Javascript to redirect from #anchor to a separate page

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 ...

ASP.NET navigate to anchor in code behind

I have a simple Web Form with code like this: //... //tons of text //... <a name="message" /> //... //tons of text //... <asp:Button ID="ButtonSend" runat="server" text="Send" onclick="ButtonSend_Click" /> After POST I want to navigate user to my anchor "message". I have following code...

request.referer with anchor

is there a way to get the referer with the anchor from the referer page.. the situation is - i have a search page which loads results (users) below the search box using ajax. i am changing the hash/anchor on the fly when the search keyword is typed in. so it becomes http://localhost/users/search#foo the user gets link in the ajax res...

Jquery XML Paging and Onload Hashcheck

Hi Folk can you help me? i will create a XML Parser with anchor/hash url. My problem is I get the hash / anchor from the URL does not load. Here js in HTML Template <script language="javascript" type="text/javascript"> $(document).ready(function() { BROADCAST.init({ xmlPath : "broadcast.xml", swfPath : "swf", ...

HTML anchor link - href and onclick both?

I want to author an anchor tag that executes some javascript and then proceeds to go wherever the href was taking it. Invoking a function that executes my JS and then sets window.location or top.location to the href location doesn't work for me. So, imagine I have an element with id "Foo" on the page. I want to author an anchor similar ...

Delphi 7 forms, anchors not working in Vista

The software is built on Delphi 7. On my XP machine, the form resizes as I expect. However, on two Vista machines, I have components with anchors set to [akLeft, akTop, akRight, akBottom], but when I resize the form, the components don't stretch with the form, leaving blank spaces on the right and bottom edge. On the XP machine, the com...

Javascript Selected Anchor

I'm not sure if I have seen this right but using the jQuery UI Themeroller the current theme settings seem to be stored in the URL like http://www.site.com/page.html#theme-details... Is there a way to extract the data from this using javascript? So I would return something like theme-details... From the URL I just mentioned Or have ...

Activate URL anchor but don't scroll to it?

I have a page with two tabs that I want to be able to switch with Javascript, but also set the anchor (e.g. page.html#tab1) in the URL for bookmarking/linking. By default the tab contents are in two divs, one below the other, and the anchor tag will scroll to the correct one, with JS disabled. With JS enabled, CSS classes are applied t...