href

is it possible to programatically simulate the click on an <a href> tag using jquery?

can we programatically click on an a href tag using jquery? i have tried $('a#someid').click(); but this does not trigger anything.. although i am using $("a#someid").attr("href", "someurl") to set the href dynamically which works fine.. Also i tried giving window.location = "someurl", but when this is done.. the IE browsers security co...

Is there a better (more efficient) way to run an href?

Hi all, I was wondering if there's a better way to execute a link's href attribute other than evaling it? For example: eval($("a[href^=javascript:]").attr("href").replace(/^javascript:/,"")); // better (more eficient) way to do this? Thanks!! ...

how to disable link in jquery

my page have a link <a href="/hyperlink">Hyper link</a> i want to open a dialog when user click on link. i want to disable link without remove href event or attribute from him means no changes in html then when user click on link then open a dialog if jquery not load or have a error cause open a link directly. how i can do th...

Previous/Next Web Page Links Heuristics?

I'm looking for a list of heuristics, given an HTML document and/or a set of URLs on a web page, that will give a set of URLs that are previous/next links from that page. Also, assume that you are given the base URL. I do not require to know if a link is specifically a next or previous URL, just that it is one of those two. I've got a...

How do I set the correct path in the jQuery script?

Dear all... I've been creating my website on another PC. Now I want to copy all PHP and jQuery files to my notebook... but all jQuery widgets does not show. How do I put the correct address in my script?? <link href="js/jquery.ui.all.css" rel=.....> The files are at: local disc(c:)/xampp/htdocs/js/jquery.ui.all ...

How to add a little to URL instead of copying and pasting it all?

Ok, so I have let's say this page http://mypage.com/index.php?id=something. I want to have in this page the link which would go to the http://mypage.com/index.php?id=something&amp;sub=1. And to do that I have to add a href to my index.php file like this echo '<a href="index.php?id=something&sub=1">go here</a>';. Is it possible to do thi...

pass javascript variables to form/input fields as onsubmit href link

id like to have an input box that a user can enter a search term into that gets passed to maybe a javascript function that then combines some url segments with the search term creating a full url. up until now its been working fine without a form around it, but i would like to add a form to it so users can just hit enter rather than clic...

jqTouch css and a href link

I am trying to call a link from a page which points to another part of the page. This is the code I am using to do this: <a href="#product"><img src="Dress1.jpg" alt="Pic1"></img></a> The problem is that when I remove the css stylesheet links from the page, in other words: <link type="text/css" rel="stylesheet" media="screen" href="...

Difference between title and name in html href element

Hey, in an href in html, whats the difference between using <a href="http://www.somesite.com/" name="The Name"> and <a href="http://www.somesite.com/" title="The Name"> Is there any advantage to using one over the other? Thanks ...

Problem using href="#" and id="" on a same page

I have a code like this in my HTML <a href='#1ge1' id="1ge-1">1<a> I use href="#" to scroll to a text on a page; and I use id="" to play audio on the same page. Both code work separately. But I want to use href="#" and id="" on the same page to scroll a text, and play audio on the same page. Please help. ...

How to customize the will_paginate link base?

<%= will_paginate(@posts) %> # will generate the links like this '<a href="/posts?page=n">a link</a>' # What should I do if I want to change the herf base on '/contents', etc. '<a href="/contents?page=n">a link</a> ? # It seems that there is no options for this , help! ...

Base URL that works for html in files and on website?

Like many developers I put my images in /images, css in /css, and js in /js. This way, no matter what the URL/directory structure, the site can simply reference /css/style.css or /js/jquery. Problem is when I try opening the html from a directory, the paths are screwed up. It assumes / is C:/ I'd like to be able to preview html files...

jQuery: Finding a particular HREF Link

Basically the idea is to find out what the current location is of the document and change the class of the link (navigation accordion) to be changed. So far I have this below it works if the pageURL (variable) is the actual link but I do not want to create a whole list of possible links hence the $(location).att('href'); $(document).re...

Firefox link to javascript function opens a new window when not intended

Hey All, I have this problem where when I have this html in firefox it opens a new window <a style="float:right;" href='javascript:window.location.href="#";'onClick="javascript:addNewRecord();">New Record</a> I have tried self.location, window.location, #body, and #h1 as the href. Originally I had the code as, but in firefox that di...

How do I set a page's base href in Javascript?

I want to set a page's base href attribute in Javascript based off of the current hostname. I have generated HTML pages that can be viewed on different hostnames, which means generating a base href tag will work in one hostname but will be incorrect in the other. ...

php - map table row with a href link dynamically

I have an array which i use to dynamically create a table. I have a name=value pair (Server=server.alias) which values are being extracted and would like to make it hyperlinked to another webpage. What I need help is figuring out the code to map the alias name with a specific href link which I think I will have to hard code. The href li...

href to return nothing?

Hi, I have a user control in the modules folder of my project. and I have a link like Test in this control. When ever I mouseover this "Test" on the page, I can see the whole url like this "www.example.com\projectName\Modules". But I want to make it such a way that it should display the url as "www.example.com\projectName". I want to g...

how to set all links(href) in the page to "#" with javascript

how to set all links(href) in the page to "#" with javascript ...

jQuery Hover on <li>

Hi, I have a list of elements like <ol> <li class="blah">some text <a href=#">test</a></li> <li class="blah">some text <a href=#">test</a></li> <li class="blah">some text <a href=#">test</a></li> <li class="blah">some text <a href=#">test</a></li> <li class="blah">some text <a href=#">test</a></li> <li class="blah">some text <a href=#"...

Use jquery to pull in the 'next' content

I'm trying to add a 'next' button to my content rotation. The content for each slide are on subpages. It works to click on each slides actual nav link, but the 'next' link won't pull in the content I need. HTML <ul class="navtop"> <li class="selected"><a href="slide-01.html">1</a></li> <li><a href="slide-02.html">2</a></li> ...