This question is mainly out of curiosity (I have a different working solution to the issue).
Trying to do some basic progressive enhancement: a table should have each row clickable to go to another page using JavaScript. For people w/out JavaScript, there's a link in the first column of each row. If JavaScript is enabled, the links shoul...
I've been thinking/searching for an equivalent of the problem that I am having below, and nothing could be found.
Is there a way I can rewrite this to work with jQuery as an alternative?
First half of the code.
<a href="link.php?test=true" onclick="request(this)" target="_blank">
<a id="step2" href="javascript:alert('NOT FINISHED!');...
Is this the correct way to do it?
<a id="load" href="#" class="btn load" onclick="request(this); $('#load').fadeOut(2000)">add</a>
<a href="#" id="test" onClick="alert( 'TEST!' )">here</a>
<script language="javascript">
var requests = 2;
function request(self)
{if(self.href != "#")
requests -= 1;
if(requests === 0)
document.getEleme...
Hi everyone,
I have a livesearch script that i need to populate my html menu with information.
i have a menu how looks something like this:
<a href="?page=page&id=">Menu item</a>
what i'm looking for is a piece of code that would do this to the link:
<a href="?page=page&id=1">Menu item</a>
i have a Javascript that pulls out value ...
For those with javascript enabled,click on them should do OnClick()
For those with javascript disabled,click on them should just go to somewhere.html,
Suppose only $('#link') is accessible,how to do that?
...
I have same ancors/hyperlink in my html file. These point to a new website outside my site.
So I want that when the user clicks the link it should open a new tab or window. My website page should not be closed.
How can it be done?
...
hi all,
I want to count the Href in a page using Jquery .
Just for refrence: i have random number of hyperlinks in a page for each user and all hrefs are diffrentiated with thier id eg. user_1,user_2,.... so here im unable to call the function on onclick event using Jquery since each href is has different name and cannot also write s...
I have used AJAX to successfully change the content of a web page. I can include another web page from my domain but the problem I have is making the hyperlinks to work. If the hyperlinks use relative addressing then that will not work relative to the page I am including it in so I was investigating php to parse the html tag as I read i...
I am trying to write a GreaseMonkey script in which I want to find all of the links that are relative links. It seemed to me that the way to do that would be to match the contents of href against /^https?:///.
But I find that when I access the anchor's href attribute, it's always normalized or cooked into a form that contains "http". ...
i am trying to remove href attr from all the anchor tags using Reg Ex,for print page.
Although i need the text value in anchors.
...
Can it really be true that the attr("href") command for a link is handled very different in IE7 in comparison to all other browsers?
Let's say I have a page at http://example.com/page.html and I have this HTML:
<a href="#someAnchor" class="lnkTest">Link text</a>
and this jQuery:
var strHref = $(".lnkTest").attr("href");
Then in IE...
I have an image over a table that has been style with CSS. When I have my image on the table without a href it is fine, once I apply an href the transparency is no longer working. Any way around this?
Table css
table.list_data {
background-color:#F3F3F3;
border:1px outset #A1A1A1;
border-collapse:collapse;
border-spacing:2px;
font-fami...
I'm using the bit.ly url shortening service to shorten certain url's being sent to a "share on twitter" function. I'd like to load the bit.ly url only when a user actually presses the share button (due to bit.ly's max 5 parallel reqs limitation). Bit.ly's REST API returns a JSON callback with the shortened url, which makes the whole scen...
I'm trying to run a regular expression on some href tags using javascript.
Unfortunatly reverse possitive lookup doesn't work in javascript :-(
I want to prefix all the relative tags with their full path.
I am using this regex-replace patern ([hs]r[ce]f?)[\s]?=[\s\"\']?(?!http|\/)(.*?)[\s\"\']
<Sorry, as I'm unable to post my HTML sa...
This question may have been asked before, but I had trouble finding an answer, since I didn't quite know what search terms to use.
In HTML, how do you make a link go a place, but execute JavaScript instead when it is clicked? Right now, I have a link that's somewhat like this:
<a href="#" onclick="javascript:dostuff()">Stuff</a>
But,...
Hello,
Im working on a CMS website that creates form elements on the fly according to id and values.
I need to select certain information out of these forms using a link.
For radio options and checkbox options I use this code:
<a href="#" onclick="document.getElementById('RAL1').checked=true">1001</a>
Which works fine.
RAL1 is the id o...
I have a href tag <a href="#somepage" target="sometarget"> or more accurately loading a URL from Flash loadURL('#somepage', 'sometarget'). I have no option to remove the target so am limited to (I assume) the available targets: _top, _self, _blank, _parent.
What target or alternative do I have to avoid refreshing the page?
...
<a id="a$id" onclick="check($id,1)" href="javascript:void(0)" class="black">Qualify</a>
After "href" is removed, is "Qualify" still clickable?
...
Hi, I need to call a Javascript function from an a element.. something like this:
href='javascript:myjavascriptfunction();'. I need the Javascript function to get the values from a couple of datepicker controls, build and urlencode a querystring and return it so that it opens into a new window. So far I think I have everything, but I'm ...
I'm developing a script for Greasemonkey, but I'm stuck trying to activate links via JavaScript.
The script should check the web page for a certain href link and, after finding it, it must activate it (like clicking on the link).
If it helps, the href I'd like to activate is a "javascript:FUNCTION" kind of link.
...