Search Results

Search found 5382 results on 216 pages for 'href'.

Page 1/216 | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Changing the href attribute on hover with jQuery

    - by AverageJoe
    Ok, I have an html page that is loaded into another html page via PHP (ok so its a PHP page, whatever). The page that is loaded is a list of hyperlinks. I need to change the href attribute to make the hyperlinks relative to the location of the stored images they refer too. When i load the page containing the hyperlinks the links are relative to the web host server, not the server that the page is actually hosted from. Somthing like this: <div #screenshots) <p><a href="image1.htm">Image1</a></p> <p><a href="image2.htm">Image2</a></p> <p><a href="image3.htm">Image3</a></p> <p><a href="image4.htm">Image4</a></p> <p><a href="image5.htm">Image5</a></p> </div> When I mouse over the links, the status bar shows the reference as "http://webHostServer.com/image1.htm". If I click it I get a 404 error. I need the href to change to something like this when I mouse over it: "http://www.actualImageHostServerIPaddress/image1.htm" I looked at this for assitance and came out with the following jQuery code, but for some reason none of it works: $(document).ready(function(){ $("button").click(function() { $("#screenshots a").addClass('ss'); }); $(".ss").each(function() { $(this).data("oldHref", $(this).attr("href")); orig = $(this).attr("href"); over = "http://208.167.244.33/208.167.244.33/"; $(this).hover(function() { $(this).attr("href", $(this).attr("href").replace(orig, over+orig)); }, function() { $(this).attr("href", $(this).data("oldHref")); }); }); When I click the button it dosen't add the class to the anchor tags, so when I hover over them nothing changes. Any help here would be great.

    Read the article

  • attaching the link of the article in href

    - by Aruna
    hi , i am having the link like <a href="http://twitter.com/home/?status='.$markme_ddesc.'" onclick="OpenPopup(this.href); return false">Click Here to See Popup</a> for bookmarking the article clicked to twitter .. The above one just add the articles message to twitter.. But i am trying to add my article link also to twitter,.. so i am using the location.href but its not working tat is its not showing me the articles site name.. THe below is the one i tried.. <a href="http://twitter.com/home/?status=\'+encodeURIComponent(location.href)+\'-'.$markme_ddesc.'" onclick="OpenPopup(this.href); return false">Click Here to See Popup</a> Thanks i advance.. Help me to get out of this...

    Read the article

  • Simple HTML problem with href

    - by pallab
    I am trying to create images hyperlinked to some URL's and hyperlinks donot seem to work. I am using the code as given below at http://windchimes.co.in/index_w%20-%20Copy.html Can you tell me why the hyperlinks to the icons are not workking? <td width="29" style="padding-bottom: 42px;><a href="http://windchimes.co.in/blog" target="_blank"><img align="middle" title="blog" alt="blog" src="http://dl.dropbox.com/u/529534/windchimes/icon-blog.gif"></a></td><td width="29" style="padding-bottom: 42px;> <a href="http://www.linkedin.com/groups?gid=120310" target="_blank"><img align="middle" title="linkedin" alt="linkedin" src="http://dl.dropbox.com/u/529534/windchimes/icon-linkedin.gif"></a></td><td width="29" style="padding-bottom: 42px;> <a href="http://www.facebook.com/group.php?gid=72425590275" target="_blank"><img align="middle" title="facebook" alt="facebook" src="http://dl.dropbox.com/u/529534/windchimes/icon-facebook.gif"></a></td><td width="29" style="padding-bottom: 42px;> <a href="http://twitter.com/windchimesindia" target="_blank"><img align="middle" title="twitter" alt="twitter" src="http://dl.dropbox.com/u/529534/windchimes/icon-twitter.gif"></a></td><td width="29" style="padding-bottom: 42px;> <a href="http://www.youtube.com/user/Windchimesindia" target="_blank"><img align="middle" title="Youtube" alt="Youtube" src="http://dl.dropbox.com/u/529534/windchimes/icon-youtube.gif"></a><td>

    Read the article

  • Help needed in Javascript + Image + HREF

    - by Bragaadeesh
    Hi, <a href="#"><img src="http://www.google.com/intl/en_ALL/images/logo.gif" onClick="alert('hi')"/></a> In the above code, i am appending a javascript onclick method to the image tag. When I click the image once and I press back, it should go back to the page it came from. Instead its staying on the same page. Is there any way I can avoid that? (probably set something else instead of href="#"). The reason I set href="#" is to make my cursor turn into hand, other than that it has no use. This is occuring in FIREFOX, IE it works fine Please help. Thanks.

    Read the article

  • jQuery hyperlinks - href value?

    - by Tom
    Hi, On my website I use jQuery to hook the events of elements, namely hyperlinks. As these hyperlinks only perform actions on the current page, and do not lead anywhere, I have been putting a href attribute of "#" in: <a href="#">My Link</a> However in some browsers this causes the page to scroll right to top which is obviously undesirable behaviour. I've tried using a blank href value, or not including one, but then the mouse does not change to the hand cursor upon hovering. What should I put in there?

    Read the article

  • Href link with php value

    - by Aruna
    hi i am having a link like below <a href="#" onclick="window.open('http://www.twitter.com/home?status=Reading+Facebook share, Yahoo Buzz and Tweet this buttons for Blogger blogs+http://www.didiknow.com');">Tweet this</a> i want to insert a php variable value inside for the status thing like <a href="#" onclick="window.open('http://www.twitter.com/home?status=$markme_ddesc">Tweet this</a> how to do so?? please help me..

    Read the article

  • Riddle with "href".

    - by kalininew
    Mysticism. I use XSLT for reception of the address for the reference. <a href="{element/url}"/> In XML i have: <element> <url>www.mysite.ru</url> </element> As a result on page I receive: <a href="www.currentsite.ru/cursection/cursubsection/www.mysite.ru"/> That is: in the beginning there is an address of a current site (the address of current section where we now are), and then there is a reference to an external site. There can be it any problem with metatag BASE? In what a trouble?

    Read the article

  • href image link download on click

    - by Piero
    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 popping out when I click on the link, is that possible just with html or javascript? How? If not I guess I would have to write a download.php scrit and call it into the href with the file name as parameter...? Greetings! :)

    Read the article

  • Javascript Redirect to another page

    - by FearUs
    is there any way to do a redirect other than: document.location = url document.location.href = url document.location.replace = url window.location = url window.location.href = url window.location.replace = url ????? I really want to redirect a user to another page just like if he clicked on a hyperlink !!

    Read the article

  • HTML href with css ie Problem

    - by Jordan Pagaduan
    <style type="text/css"> .web_westloh { background-image: url(images/web_westloh.png); background-repeat: no-repeat; height: 100px; width: 350px; } .web_westloh:hover { border-bottom-width: 2px; border-bottom-style: dashed; border-bottom-color: #999999; padding-bottom: 5px; } .web_money { background-image: url(images/web_money.png); background-repeat: no-repeat; height: 100px; width: 350px; } .web_money:hover { border-bottom-width: 2px; border-bottom-style: dashed; border-bottom-color: #999999; padding-bottom: 5px; } </style> <a href="http://www.westloh.com" title="Click to Visit http://www.westloh.com" target="_blank" class="web_westloh"> <div class="web_westloh"></div> </a> <a href="http://www.money-mind-set.com" title="Click to Visit http://www.money-mind-set.com" target="_blank"> <div class="web_money"></div> </a> The Problem is: In mozilla linking is ok. No problem. But in IE the link is a problem, it will not link in the target. See this page to see Problem: http://replytowest.com -- at the bottom. Thank You

    Read the article

  • How to replace element's attr href with each ? // strip url

    - by Barlas Apaydin
    im trying to change href with each method, here is demo, inspect a, you'll see there is no change html: <a href="#/news">News</a> <a href="#/news/detail">Detail</a> <a href="#/sport">Sport</a> <a href="#/sport/football">Football</a>???????????? jQuery: $('a').each(function() { $(this).attr('href').replace('#/',''); //tried to erase #/ from all hrefs });

    Read the article

  • Hiding elements based on last closed element jquery script

    - by Jared
    Hi my question is, how can I make this jquery script close all previously opened children when entering a new parent? At the moment it traverses thru all the tree structure fine, but switching from one parent to another does not close the previous children, but rather only the each individual parents elements as a user browses. Here is the jquery I'm using: <script type="text/javascript"> $(document).ready($(function(){ $('#nav>li>ul').hide(); $('.children').hide(); $('#nav>li').mousedown(function(){ // check that the menu is not currently animated if ($('#nav ul:animated').size() == 0) { // create a reference to the active element (this) // so we don't have to keep creating a jQuery object $heading = $(this); // create a reference to visible sibling elements // so we don't have to keep creating a jQuery object $expandedSiblings = $heading.siblings().find('ul:visible'); if ($expandedSiblings.size() > 0) { $expandedSiblings.slideUp(0, function(){ $heading.find('ul').slideDown(0); }); } else { $heading.find('ul').slideDown(0); } } }); $('#nav>li>ul>li').mousedown(function(){ // check that the menu is not currently animated if ($('#nav ul:animated').size() == 0) { // create a reference to the active element (this) // so we don't have to keep creating a jQuery object $heading2 = $(this); // create a reference to visible sibling elements // so we don't have to keep creating a jQuery object $expandedSiblings2 = $heading2.siblings().find('.children:visible'); if ($expandedSiblings2.size() > 0) { $expandedSiblings2.slideUp(0, function(){ $heading2.find('.children').slideDown(0); }); } else { $heading2.find('.children').slideDown(0); } } }); })); </script> and here is my html output <ul id="nav"> <li><a href="#">folder 4</a> <ul><li><a href="#">2001</a> <ul><li class="children"><a href="./directory//folder 4/2001/doc1.txt">doc1.txt</a></li> <li class="children"><a href="./directory//folder 4/2001/doc2.txt">doc2.txt</a></li> <li class="children"><a href="./directory//folder 4/2001/doc3.txt">doc3.txt</a></li> </ul> </li> <li><a href="#">2002</a> <ul><li class="children"><a href="./directory//folder 4/2002/doc1.txt">doc1.txt</a></li> <li class="children"><a href="./directory//folder 4/2002/doc2.txt">doc2.txt</a></li> <li class="children"><a href="./directory//folder 4/2002/doc3.txt">doc3.txt</a></li> <li class="children"><a href="./directory//folder 4/2002/doc4.txt">doc4.txt</a></li> </ul> </li> <li><a href="#">2003</a> <ul><li class="children"><a href="./directory//folder 4/2003/Copy of doc1.txt">Copy of doc1.txt</a></li> <li class="children"><a href="./directory//folder 4/2003/doc1.txt">doc1.txt</a></li> <li class="children"><a href="./directory//folder 4/2003/doc2.txt">doc2.txt</a></li> </ul> </li> <li><a href="#">2004</a> <ul><li class="children"><a href="./directory//folder 4/2004/doc1.txt">doc1.txt</a></li> <li class="children"><a href="./directory//folder 4/2004/doc2.txt">doc2.txt</a></li> <li class="children"><a href="./directory//folder 4/2004/doc3.txt">doc3.txt</a></li> <li class="children"><a href="./directory//folder 4/2004/doc4.txt">doc4.txt</a></li> </ul> </li> </ul> </li> <li><a href="#">folder1</a> <ul><li><a href="#">2001</a> <ul><li class="children"><a href="./directory//folder1/2001/doc1.txt">doc1.txt</a></li> <li class="children"><a href="./directory//folder1/2001/doc2.txt">doc2.txt</a></li> <li class="children"><a href="./directory//folder1/2001/doc3.txt">doc3.txt</a></li> </ul> </li> <li><a href="#">2002</a> <ul><li class="children"><a href="./directory//folder1/2002/doc1.txt">doc1.txt</a></li> <li class="children"><a href="./directory//folder1/2002/doc2.txt">doc2.txt</a></li> <li class="children"><a href="./directory//folder1/2002/doc3.txt">doc3.txt</a></li> <li class="children"><a href="./directory//folder1/2002/doc4.txt">doc4.txt</a></li> </ul> </li> <li><a href="#">2003</a> <ul><li class="children"><a href="./directory//folder1/2003/Copy of doc1.txt">Copy of doc1.txt</a></li> <li class="children"><a href="./directory//folder1/2003/doc1.txt">doc1.txt</a></li> <li class="children"><a href="./directory//folder1/2003/doc2.txt">doc2.txt</a></li> </ul> </li> <li><a href="#">2004</a> <ul><li class="children"><a href="./directory//folder1/2004/doc1.txt">doc1.txt</a></li> <li class="children"><a href="./directory//folder1/2004/doc2.txt">doc2.txt</a></li> <li class="children"><a href="./directory//folder1/2004/doc3.txt">doc3.txt</a></li> <li class="children"><a href="./directory//folder1/2004/doc4.txt">doc4.txt</a></li> </ul> </li> </ul> </li> <li><a href="#">folder2</a> <ul><li><a href="#">2001</a> <ul><li class="children"><a href="./directory//folder2/2001/doc1.txt">doc1.txt</a></li> <li class="children"><a href="./directory//folder2/2001/doc2.txt">doc2.txt</a></li> <li class="children"><a href="./directory//folder2/2001/doc3.txt">doc3.txt</a></li> </ul> </li> <li><a href="#">2002</a> <ul><li class="children"><a href="./directory//folder2/2002/doc1.txt">doc1.txt</a></li> <li class="children"><a href="./directory//folder2/2002/doc2.txt">doc2.txt</a></li> <li class="children"><a href="./directory//folder2/2002/doc3.txt">doc3.txt</a></li> <li class="children"><a href="./directory//folder2/2002/doc4.txt">doc4.txt</a></li> </ul> </li> <li><a href="#">2003</a> <ul><li class="children"><a href="./directory//folder2/2003/Copy of doc1.txt">Copy of doc1.txt</a></li> <li class="children"><a href="./directory//folder2/2003/doc1.txt">doc1.txt</a></li> <li class="children"><a href="./directory//folder2/2003/doc2.txt">doc2.txt</a></li> </ul> </li> <li><a href="#">2004</a> <ul><li class="children"><a href="./directory//folder2/2004/doc1.txt">doc1.txt</a></li> <li class="children"><a href="./directory//folder2/2004/doc2.txt">doc2.txt</a></li> <li class="children"><a href="./directory//folder2/2004/doc3.txt">doc3.txt</a></li> <li class="children"><a href="./directory//folder2/2004/doc4.txt">doc4.txt</a></li> </ul> </li> </ul> </li> <li><a href="#">folder3</a> <ul><li><a href="#">2001</a> <ul><li class="children"><a href="./directory//folder3/2001/doc1.txt">doc1.txt</a></li> <li class="children"><a href="./directory//folder3/2001/doc2.txt">doc2.txt</a></li> <li class="children"><a href="./directory//folder3/2001/doc3.txt">doc3.txt</a></li> </ul> </li> <li><a href="#">2002</a> <ul><li class="children"><a href="./directory//folder3/2002/doc1.txt">doc1.txt</a></li> <li class="children"><a href="./directory//folder3/2002/doc2.txt">doc2.txt</a></li> <li class="children"><a href="./directory//folder3/2002/doc3.txt">doc3.txt</a></li> <li class="children"><a href="./directory//folder3/2002/doc4.txt">doc4.txt</a></li> </ul> </li> <li><a href="#">2003</a> <ul><li class="children"><a href="./directory//folder3/2003/Copy of doc1.txt">Copy of doc1.txt</a></li> <li class="children"><a href="./directory//folder3/2003/doc1.txt">doc1.txt</a></li> <li class="children"><a href="./directory//folder3/2003/doc2.txt">doc2.txt</a></li> </ul> </li> <li><a href="#">2004</a> <ul><li class="children"><a href="./directory//folder3/2004/doc1.txt">doc1.txt</a></li> <li class="children"><a href="./directory//folder3/2004/doc2.txt">doc2.txt</a></li> <li class="children"><a href="./directory//folder3/2004/doc3.txt">doc3.txt</a></li> <li class="children"><a href="./directory//folder3/2004/doc4.txt">doc4.txt</a></li> </ul> </li> </ul> </li> </ul> I assume my problem is, jquery isn't closing the children between each new parent so I need to make a call, but I'm a bit lost on how to do that. I know the code is pretty messy, this project was done in a huge rush and a very tight timeframe. Appreciate your answers and any other constructive comments, cheers :)

    Read the article

  • Javascript problem with location.href.

    - by Patrick
    Hello! I have a textbox and whenever the user presses a key it's checked to see if the user pressed enter. If the enter key is pressed, i want to add all the info in the textbox and transfer the user to a different url. <script language="javascript" type="text/javascript"> function checkEnter(e){ //e is event object passed from function invocation var characterCode; if(e && e.which){ //if which property of event object is supported (NN4) e = e; characterCode = e.which; //character code is contained in NN4's which property } else{ e = event; characterCode = e.keyCode; //character code is contained in IE's keyCode property } if (characterCode == 13) { //if generated character code is equal to ascii 13 (if enter key) var searchLink = '/Search/?Keywords=' + document.getElementById('<%= searchBox.ClientID %>').value; transferUser(searchLink); return false; } else{ return true; } } function transferUser(url) { window.location.href = url; window.location.replace(url); } </script> Search: <input name="ctl00$searchBox" type="text" id="ctl00_searchBox" class="header_line_search_box_textbox" onKeyPress="checkEnter(event);" /> I have tried every possible combination, but nothing happens. The site just refreshes itself. I also need somehow to convert the text from the user to html safe, must like the HttpUtility.EncodeUrl in aspx.

    Read the article

  • using a href (html)tag along with PHP

    - by dexter
    i have tried: <?php include("delete.php") ?> <?php .... .... .... if($result=mysql_query($sql)) { echo "<table><th>Id</th><th>Name</th><th>Description</th><th>Unit Price</th>"; while($row = mysql_fetch_array($result)) { echo "<tr><td>".$row['Id']."</td><td>".$row['Name']."</td><td>".$row['Description']."</td><td>".$row['UnitPrice']."</td> <td><a href='delproduct($row[Id])' onclick = 'return MsgOkCancel()'>Delete</a></td></tr>"; echo "<br/>"; } } ?> following javascript is in the same page: <script type="text/javascript" language="javascript"> function MsgOkCancel() { if (confirm("Are You Sure You Want to Delete?")) { return true } else {return false} } </script> where delproduct is a javascript function in delete.php written like: <script type="javascript"> function delproduct(Id) { alert('Id '+ Id); } <script> ** after ** clicking Delete a okcancel message-box appear asking conformation ** but ** after clicking 'ok' it should execute statements inside delproduct function but it doesn't it gives error like: Object Not Found :The requested URL was not found on this server. what would be the problem? pls help, thanks

    Read the article

  • HTML: order of divs and a tags for href

    - by user2962389
    I'm busy with HTML and CSS and got stuck with this. I have created a button with :hover and :active options, which is centered on the page. Clicking on this button needs to lead to a website. My HTML is: <div> <a href="website"><div id="button">Text</div></a> </div> The CSS is: body, html { height: 100%; } a { text-decoration: none; } #button { text-transform: uppercase; font-size: 18px; text-align: center; padding: 1em 0.5em 0.8em; background-color: white; font-family: Myriad Pro, Source Sans Pro, Helvetica, Arial, sans-serif; color: #ff4700; cursor: pointer; width: 150px; -webkit-border-radius: 5px; -moz-border-radius: 5px; border-radius: 5px; border: 1px solid #ff4700; margin-left: auto; margin-right: auto; margin-bottom: 50px; -webkit-transition: all .1s ease; -moz-transition: all .1s ease; -ms-transition: all .1s ease; -o-transition: all .1s ease; transition: all .1s ease; } #button:hover { background-color: #ff4700; color: white; border: 1px solid white; } #button:active { background-color: #cc3900; } The problem lies in the fact that the whole width of the page is clickable at the height of the button and not only the button itself that is 150px wide and is centered on the page. I think I have my divs mixed up and it needs other formatting and precedence, but I'm not sure. Thanks for your help! P.S. First time on StackOverflow, sorry if I formatted something wrong.

    Read the article

  • Href link with OnClick event

    - by Aruna
    Hi, i am having a link like below where on click of that twitter , i need to open the twitter page with the message given in $markme_ddesc but instead when i click on the link , it simply moves to twitter.com without opening in a new window and with the message.. Why so? how to resolve this?? Please help me..

    Read the article

  • a href nested in DIV element in ASP.NET C#

    - by Gal V
    Hello all, My question is quite simple, I created a DIV, with a HyperLink control in it. As following: I created an 'onclick' event in jQuery for the DIV as well: $('#divOne').click(function() { alert('You clicked on the DIV element'); }); My goal is to trigger this event when the DIV area is clicked (working fine), BUT- When the HyperLink is clicked, I need the page to redirect WITHOUT triggering the DIV 'onclick' event (can use JavaScript or jQuery as needed). Thanks all!

    Read the article

  • CSS style submit like href tag

    - by seth.vargo
    Hi all, I have a button class that I wrote in CSS. It essentially displays block, adds some styles, etc. Whenever I add the class to a tags, it works fine - the a tag spans the entire width of its container like display:block should do... However, when I add the button class to an input button, Chrome, Safari, and Firefox all add a margin-right: 3px... I've used the DOM inspector in both Chrome and Safari and NO WHERE should it be adding a extra 3px padding. I tried adding margin: 0 !important; and/or margin-right: 0 !important to my button class in my CSS, but the browser STILL renders a 3px right margin! Is this a known issue, and is there a CSS-based solution (i.e. not jQuery/javascript) CODE FOLLOWS: .button { position: relative; display: block; margin: 0; border: 1px solid #369; color: #fff; font-weight: bold; padding: 11px 20px; line-height: 18px; text-align: center; text-transform: uppercase; cursor: hand; cursor: pointer; }

    Read the article

  • PHP Regex. How to remove all element anchor tags but keep anchor tags with certain href attribute contain JPG|PNG|GIF

    - by namaku doni
    input <a href="http://mysite.com">My Site</a> <a href="http://mysite.com/image.jpg"><img src="http://mysite.com/image.jpg"/></a> <a href="http://mysite.com/image.gif"><img src="http://mysite.com/image.gif"/></a> <a href="http://yoursite.com">Your Site</a> output <a href="http://mysite.com/image.jpg"><img src="http://mysite.com/image.jpg"/></a> <a href="http://mysite.com/image.gif"><img src="http://mysite.com/image.gif"/></a> Thank's for help

    Read the article

1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >