href

Add mime type to HTML link

I know how to change the MIME type in a webserver. I used this to make sure the browser downloads my .scrpt file instead of opening the plain text version. So far so good but is it possible to do the same with a link? I would like to link to a file on GitHub but this will open as a plain text file. Can I add a "MIME type attribute" to th...

how to loop on hrefs ?

so , what i need is to get some links from the following code. I managed to reach the href of the first one by using var link=doc.querySelector('#courses_menu > ul > li:nth-child(2) a'); Now I need all these href's ! by a loop maybe ? here is the source i need to work on. <ul class="tools-menu-ul"> <li class="tools-menu-back"...

how to add a var to href

well what is needed is something like var link = " http://www.google.com"; < a href= 'link' /> or something like it . so i need to use a var as a href ? anyway to do such thing ? forgot to mention iam using it under mozilla jetpack - html : "" tag it worked with "< a href= ' " + link + " ' /> anyone has a better way ? ...

C# question - how do I convert a PageURI & Href to an absolute URL/URI?

Hi, How do I convert a PageURI & Href to an absolute URL/URI in C#? i.e. I am scanning a web page at a given PageURI and in the HTML have link/node with a HREF, and want to translate this HREF into a valid absolute URI. Background - note the trouble I was having here ...

In Firefox, when printing a page with anchor tags, the link location is printing after the text.

For example, <a href="../somepage/page.aspx?qs=asdf">Text Here</a> will print out as... Text Here(../somepage/page.aspx?qs=asdf) In IE, it looks normal (doesn't print the url). Any ideas why this is acting in this fashion? ...

Change the name of HREF link

Hi there, i have the following link <a href="example.com" id="example1"> Go to example....</a> Is it possible that when a body moves the cursor over "Go to example..." it changes to "Go to example One" , i am using php and jquery. Any help will be appreciated. ...

Detect anchor is leading to an active window.location

Having such an html: <a class="someclass" href="some/url/absolute/or/relative">Blah</a> ... along with such javascript: $("a.someclass").onclick(function() { var link = $(this).attr("href"); if (link == window.location) // <<<<<<<<<<<< doSomethingSpecial(); else doOtherThing(); return false; }); this...

using href links to go to specific section within website

I am trying to link some text with the href tag to a specific section in my website. On the homepage I have a quote and then the person's name of who said it. I want to link his name to the "Upcoming Events" tab on my "About" section. The website is http://www.verticalministries.net. The name "Aaron Ivey" needs to be linked to the "Up...

href="#" redirects to the index page but not to the current page's top

Hi all. Having an odd problem at the site. Link tag having href="#anything" doesn't move you to the top of the page or to the specified anchor, it moves you to the home page. Thats it - when I hover over the link I see at my FF's status bar "domain.com/#" instead of "domain.com/testpage.php#" Site is full of crap code and it's impossib...

Is it possible to open an html document with word, and have anchor links work within the document?

Hi there, Is it possible to open an html document with word, and have anchor links work within the document? Basically, It'd be nice to do this: <html lang='en' xml:lang='en' xmlns='http://www.w3.org/1999/xhtml'&gt; <head></head> <body> <h1>Florida Emergency Supplier Network for 2009-2011</h1> <table id='table_of_contents'>...

jQuery: Adding text to an existing dynamic HREF

I am trying to amend a link using jQuery. The links are dynamically generated and I have no control over the existing HREF as they are called from a 3rd party site. Using jQuery, how can I change a link from this: example.com/?one=1&two=1 to this: example.com/?one=1&two=1&thisisadded=true so essentially adding &thisisadded=true to...

I want to build Href using onclick Event. Add parameters from hidden fields on the page to Href

I am looking for the best solution for my problem. I am currently using a asp.net gridview with a link in the first column and the id to the item it relates too. Details href=.../page.aspx?ID=25 I have 3 hidden fields that I would like to bring with me to the next page. I want the url to look something like this. Details href=.../page...

How to make div clickable using internal href but not overide other internal hrefs

I have a div with 3 internal hrefs. I need to make the div clickable and have it inherit one of the internal hrefs. Not a problem... however this then causes the JS to overide the other links inside the div, the ones I'm not inheriting for the parent div. Here's my code: <script> $(document).ready(function(){ $("#Products div.product...

Is there any reason NOT to use src="//domain.com/file.js", which is protocol dynamic?

In some of my E-Commerce applications I've started using src="//domain.com/file.js" in cases where I needed to reference externally hosted scripts that I wanted to include. In my E-Commerce applications not all pages actually use https as not every page has a form. I'm wondering if there's really any disadvantage to always using this, a...

Disable Anchor tag and remove underline also in javscript

I have a anchor tag which I would like to disable or enable depending upon some condition. I am able to achive this using the following function function disableEnableAnchor(obj, disable) { if(disable) { var href = obj.getAttribute("href"); if(href && href != "" && href != null) obj.setAttribute('...

PHP Xpath : get all href values that contain needle

Working with PHP Xpath trying to quickly pull certain links within a html page. The following will find all href links on mypage.html: $nodes = $x->query("//a[@href]"); Whereas the following will find all href links where the description matches my needle: $nodes = $x->query("//a[contains(@href,'click me')]"); What I am trying to achi...

HREF to a .doc file works... an HREF to a .docx does not

Strange... When i create an HREF to a .doc, the browser behaves correctly and onclick allows the user to download the file. If I have an HREF to a .docx, it doesn't prompt to the user to download the file but shows a "The page cannot be found" error page at the url of the file. Any ideas? ...

Apply a href-like attribute to non-<a> elements

Hello guys, I've been working on a page where there are several entries contained in different <div>s. Each is only a title linked to a page, an image and a short description. However, the description may contain arbitrary tags, including <a> tags. Since these are pretty straightforward and the actual link isn't that big, I've made it ...

Add link to image dynamically

If i have "img" element id = "myimg". Is posible to add link to "img" without edit html page using jQuery <img id="myimg" src="image.png"> I like to make "myimg" have link like this. <a href="test.html"><img id="myimg" src="image.png"></a> Thank you for reploy. ...

href image link download on click

Hey all, I generate normal links like: <a href="/path/to/image"><img src="/path/to/image" /></a> in a web app. When I click on the link, it displays the picture in a new page. If you want to save the picture, then you need to right click on it and select "save as" I don't want this behaviour, I would like to have a download box poppin...