Search Results

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

Page 21/216 | < Previous Page | 17 18 19 20 21 22 23 24 25 26 27 28  | Next Page >

  • Where to look for real url

    - by smallB
    I'm trying to write simple application for downloading videos from youtube. My code for getting file (http://www.youtube.com/watch?v=pViMzR_ylXg) looks like: bool FD_core::get_file() { QNetworkRequest request; request.setUrl(QUrl("http://www.youtube.com/watch?v=pViMzR_ylXg")); connect(network_access_manager_, SIGNAL(finished(QNetworkReply*)), this, SLOT(onRequestCompleted(QNetworkReply *))); network_access_manager_->get(request); return true; } void FD_core::onRequestCompleted(QNetworkReply * reply) { QByteArray data_ = reply->readAll(); cout << data_.constData(); qDebug() << "size: " << data_.size(); } In the above function data_.constData() produces lots of text, part (very small) of it: <!DOCTYPE html> <html lang="en" dir="ltr" > <head> <script> var yt = yt || {};yt.timing = yt.timing || {};yt.timing.tick = function(label, opt_time) {var timer = yt.timing['timer'] || {};if(opt_time) {timer[label] = opt_time;}else {timer[label] = new Date().getTime();}yt.timing['timer'] = timer;};yt.timing.info = function(label, value) {var info_args = yt.timing['info_args'] || {};info_args[label] = value;yt.timing['info_args'] = info_args;};yt.timing.info('e', "907050,906359,927900,919320,914021,916611,922401,920704,912806,927201,925706,928001,922403,913546,913556,920201,911116,901451");yt.timing.wff = true;yt.timing.info('pr', "1");yt.timing.info('an', "dclk,aftv,afv");if (document.webkitVisibilityState == 'prerender') {document.addEventListener('webkitvisibilitychange', function() {yt.timing.tick('start');}, false);}yt.timing.tick('start');yt.timing.info('li','0');try {yt.timing['srt'] = window.gtbExternal && window.gtbExternal.pageT() ||window.external && window.external.pageT;} catch(e) {}if (window.chrome && window.chrome.csi) {yt.timing['srt'] = Math.floor(window.chrome.csi().pageT);}if (window.msPerformance && window.msPerformance.timing) {yt.timing['srt'] = window.msPerformance.timing.responseStart - window.msPerformance.timing.navigationStart;} </script> <script>var yt = yt || {};yt.preload = {};yt.preload.counter_ = 0;yt.preload.start = function(src) {var img = new Image();var counter = ++yt.preload.counter_;yt.preload[counter] = img;img.onload = img.onerror = function () {delete yt.preload[counter];};img.src = src;img = null;};yt.preload.start("http:\/\/o-o---preferred---sn-xn5ucu-q0ce---v3---lscache7.c.youtube.com\/crossdomain.xml");yt.preload.start("http:\/\/o-o---preferred---sn-xn5ucu-q0ce---v3---lscache7.c.youtube.com\/generate_204?ip=95.83.224.63\u0026upn=A3aUhLYV55M\u0026sparams=algorithm%2Cburst%2Ccp%2Cfactor%2Cgcr%2Cid%2Cip%2Cipbits%2Citag%2Csource%2Cupn%2Cexpire\u0026fexp=907050%2C906359%2C927900%2C919320%2C914021%2C916611%2C922401%2C920704%2C912806%2C927201%2C925706%2C928001%2C922403%2C913546%2C913556%2C920201%2C911116%2C901451\u0026mt=1354207274\u0026key=yt1\u0026algorithm=throttle-factor\u0026burst=40\u0026ipbits=8\u0026itag=34\u0026sver=3\u0026signature=692E605215EB4D2CA407291CA26E14B844768A89.7A2930CE25FDDFC7C4FF5AA56DD02538B0020267\u0026mv=m\u0026source=youtube\u0026ms=au\u0026gcr=ie\u0026expire=1354228237\u0026factor=1.25\u0026cp=U0hUSVJNVl9IUUNONF9KR1pDOi0tSFhhRzVFRkd6\u0026id=a5588ccd1ff29578");</script><title>Die Antwoord - Fok Julle Naaiers (Mike Tyson&#39;s Words NOT DJ Hi-Teks) - YouTube</title><link rel="search" type="application/opensearchdescription+xml" href="http://www.youtube.com/opensearch?locale=en_US" title="YouTube Video Search"><link rel="icon" href="http://s.ytimg.com/yts/img/favicon-vfldLzJxy.ico" type="image/x-icon"><link rel="shortcut icon" href="http://s.ytimg.com/yts/img/favicon-vfldLzJxy.ico" type="image/x-icon"> <link rel="icon" href="//s.ytimg.com/yts/img/favicon_32-vflWoMFGx.png" sizes="32x32"><link rel="canonical" href="/watch?v=pViMzR_ylXg"><link rel="alternate" media="handheld" href="http://m.youtube.com/watch?v=pViMzR_ylXg"><link rel="alternate" media="only screen and (max-width: 640px)" href="http://m.youtube.com/watch?v=pViMzR_ylXg"><link rel="shortlink" href="http://youtu.be/pViMzR_ylXg"> <meta name="title" content="Die Antwoord - Fok Julle Naaiers (Mike Tyson&#39;s Words NOT DJ Hi-Teks)"> <meta name="description" content="Some of the lyrics of &quot;Die Antwoord&quot; new single &quot;Fok Julle Naaiers&quot; have caused such controversy that Die Antwoord have split with their record label Intersc..."> <meta name="keywords" content="Die Antwoord, Fok Julle Naaiers, Mike Tyson, DJ Hi-Tek, Faggot"> <link rel="alternate" type="application/json+oembed" href="http://www.youtube.com/oembed?url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DpViMzR_ylXg&amp;format=json" title="Die Antwoord - Fok Julle Naaiers (Mike Tyson&#39;s Words NOT DJ Hi-Teks)"> <link rel="alternate" type="text/xml+oembed" href="http://www.youtube.com/oembed?url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DpViMzR_ylXg&amp;format=xml" title="Die Antwoord - Fok Julle Naaiers (Mike Tyson&#39;s Words NOT DJ Hi-Teks)"> <meta property="og:url" content="http://www.youtube.com/watch?v=pViMzR_ylXg"> <meta property="og:title" content="Die Antwoord - Fok Julle Naaiers (Mike Tyson&#39;s Words NOT DJ Hi-Teks)"> <meta property="og:description" content="Some of the lyrics of &quot;Die Antwoord&quot; new single &quot;Fok Julle Naaiers&quot; have caused such controversy that Die Antwoord have split with their record label Intersc..."> <meta property="og:type" content="video"> <meta property="og:image" content="http://i1.ytimg.com/vi/pViMzR_ylXg/mqdefault.jpg"> <meta property="og:video" content="http://www.youtube.com/v/pViMzR_ylXg?version=3&amp;autohide=1"> <meta property="og:video:type" content="application/x-shockwave-flash"> <meta property="og:video:width" content="853"> <meta property="og:video:height" content="480"> <meta property="og:site_name" content="YouTube"> <meta property="fb:app_id" content="87741124305"> <meta name="twitter:card" value="player"> <meta name="twitter:site" value="@youtube"> <meta name="twitter:player" value="https://www.youtube.com/embed/pViMzR_ylXg"> <meta property="twitter:player:width" content="853"> <meta property="twitter:player:height" content="480"> So my question is, where in this file is the url hidden which will allow me to download the wanted file?

    Read the article

  • How do i fix this JS scope in GM_xmlhttpRequest

    - by acidzombie24
    When i run this code alert 2 shows 6 different href links. alert 3 shows the last href 6 times. How do i make it use the same object (linkdom aka thelink) as alert 2. NOTE: This is in a greasemonkey script { var linkdom = thelink; alert('2' + linkdom.getAttribute("href")); GM_xmlhttpRequest({ method: 'GET', url: href, onload: function(resp){ //... alert('3' + linkdom.getAttribute("href")); } }); //... }

    Read the article

  • in pure css way with IE 6 supprt how to remove margin from last li?

    - by metal-gear-solid
    in this condition is it possible to not to apply margin-right to last li I need pure css way and support in IE6 and 7 also. is there any way to achieve this. ul li {display:inline;margin-right:10px} <ul id="nav"> <li><a href="#nowhere" >Lorem</a></li> <li><a href="#nowhere" >Aliquam</a></li> <li><a href="#nowhere" >Morbi</a></li> <li><a href="#nowhere" >Praesent</a></li> <li><a href="#nowhere" >Pellentesque</a></li> </ul>

    Read the article

  • How can I replace jQuery Tools Scrollable bullets with numbers?

    - by Steven
    I'm using jQuery Tools for creating an article carousel. You can see in action with images here: http://flowplayer.org/tools/demos/scrollable/plugins/index.html The navigation code looks like this: <!-- wrapper for navigator elements --> <div class="navi"></div> And the plugin ads links like so: <!-- wrapper --> <div class="navi"> <a href="0" class="active"/> <a href="1" class=""/> <a href="2" class=""/> </div> The code to get it all started goes like this: $(".scrollable").scrollable({ circular: true, size: 1}).navigator(); My question is: How can I replace <a href="1" class=""/> with <a href="1" class=""> [1] </a> ?

    Read the article

  • Change the value of an existing onclick function

    - by Mark Peach
    I have a page that is pulling in via an iframe a page of html content from a pre-existing content management system, whose content I can not directly change. I want to use jquery to alter some of the links and button locations dynamically. For links within the page I was able to change the href attr values of <a href="/content.asp">more</a> from content.asp to content2.asp using $("a[href^='/content.asp']") .each(function() { this.href = this.href.replace("content.asp", "content2.asp"); }); But the page pulled in also has form buttons that contains javascript onclick functions e.g. <INPUT type="button" value="Add to basket" onClick="document.location='/shopping-basket.asp?mode=add&id_Product=1076';"> I basically want to use jquery to select any such buttons and change the shopping-basket.asp to shopping-basket2.asp How can I select these buttons/onclick functions and change the location string?

    Read the article

  • does webapp has 'elseif' or 'elif' in template tags..

    - by zjm1126
    my code is : Hello!~~~ {% if user %} <p>Logged in as {{ user.first_name }} {{ user.last_name }}.</p> {% elif openid_user%} <p>Hello, {{openid_user.nickname}}! Do you want to <a href="{{openid_logout_url}}">Log out?</p> {% else %} <p><a href="/login?redirect={{ current_url }}">google Log in</a>.</p> <p><a href="/twitter">twitter Log in</a>.</p> <p><a href="/facebook">facebook Log in</a>.</p> <p><a href="{{openid_login_url}}">openid Log in</a>.</p> <iframe src="/_openid/login?continue=/"></iframe> {% endif %} the error is : TemplateSyntaxError: Invalid block tag: 'elif' does not webapp has a 'else if ' ? thanks

    Read the article

  • If the "with" statement in Javascript creates a new scope, why does the following code not work as e

    - by Jian Lin
    If the "with" statement in Javascript creates a new scope, shouldn't clicking on the links show a different x which are in different scopes? It doesn't. <a href="#" id="link1">ha link 1</a> <a href="#" id="link2">ha link 2</a> <a href="#" id="link3">ha link 3</a> <a href="#" id="link4">ha link 4</a> <a href="#" id="link5">ha link 5</a> <script type="text/javascript"> for (i = 1; i <= 5; i++) { with({foo:"bar"}) { var x = i; document.getElementById('link' + i).onclick = function() { alert(x); return false; } } } </script>

    Read the article

  • Adding a ID to a <li> based on part of an <a> tag

    - by mmsa
    I have the following code: <li class="zoneName"><a href="/Default.aspx?PageID=4869007">CYKF</a></li> <li class="zoneName"><a href="/Default.aspx?PageID=4868459">YKA</a></li> I need to add and ID to each of the < li tags in this list. I need that ID to be the number at the end of the href string. Below is what I'd like it to be <li class="zoneName" id="4869007"><a href="/Default.aspx?PageID=4869007">CYKF</a></li> <li class="zoneName" id="4868459"><a href="/Default.aspx?PageID=4868459">YKA</a></li> Any help is appreciated.

    Read the article

  • How come $(this) is undefined after ajax call

    - by JohnnyQ
    I am doing an ajax request when an anchor tag is clicked with an ID set to href. Btw, this anchor tag is dynamically created. <a href="983" class="commentDeleteLink">delete</a> When the anchor tag is clicked the following code is executed: $('.commentDeleteLink').live('click', function(event) { event.preventDefault(); var result = confirm('Proceed?'); if ( result ) { $.ajax({ url: window.config.AJAX_REQUEST, type: "POST", data: { action : 'DELCOMMENT', comment : $('#commentText').val(), comment_id : $(this).attr('href') }, success: function(result) { alert($(this).attr('href')); //$(this).fadeOut(slow); } }); } }); When I tried to display $(this).attr('href') it says it's "undefined". What I really want to do is fadeOut the anchor tag but when I investigated the value of $(this) it is "undefined". What could be wrong with the snippet above?

    Read the article

  • jQuery update link

    - by Happy
    Here is html: <a href="http://site.com/any/different/folders/picture_name.jpg">Go and win</a> <a href="http://site.com/not/similar/links/some_other_name.png">Go and win</a> How to add some text after last "/" in href attribute (before picture_name.jpg) of each link? The script should give something like: <a href="http://site.com/any/different/folders/user_picture_name.jpg">Go and win</a> <a href="http://site.com/not/similar/links/user_some_other_name.png">Go and win</a> Here user_ is added. There can be any length of the link.

    Read the article

  • SSI: Failed String Comparison with CGI Environment Variable [migrated]

    - by Calyo Delphi
    I am currently working on developing a personal website. It's not my first time doing this, but this is my first major foray into implementing SSI. I've run myself into a wall, however, with an if-else directive that uses one of the CGI environment variables as part of its comparison. Even after some limited attempts at debugging, all of the output and documentation that I have means that the comparisons being made should fail outright. This is not the case, and the wrong evaluation is being made by the if-else directive. Here's the code in the file index.shtml: <head> <!--#set var="page" value="Home" --> <!--#include file="headlinks.shtml" --> <style> img#ref { float: right; margin-left: 8px; border-width: 0px; } </style> </head> Here's the code in the file headlinks.shtml: <title><!--#echo var="page" --> &ndash; <!--#echo var="HTTP_HOST" --></title> <!--#set var="docroot" value="${DOCUMENT_ROOT}" --> <!--#echo var="docroot" --> <!--#if expr="( $docroot != '/Applications/MAMP/htdocs' ) || ( $docroot != '/home/dragarch/public_html' )" --> <link rel="stylesheet" type="text/css" href="../style.css"> <link rel="shortcut icon" type="image/svg+xml" href="../favicon.svg" /> <!--#else --> <link rel="stylesheet" type="text/css" href="style.css"> <link rel="shortcut icon" type="image/svg+xml" href="favicon.svg" /> <!--#endif --> And here's the output for the file index.shtml: <title>Home &ndash; dragarch</title> /Applications/MAMP/htdocs <link rel="stylesheet" type="text/css" href="../style.css"> <link rel="shortcut icon" type="image/svg+xml" href="../favicon.svg" /> Both style.css and favicon.svg are in the document root with index.shtml, so the if directive should fail and default to the output of the else directive. As you can see, while the document root (which is currently the MAMP htdocs folder on my own notebook) is correct according to the output of the echo directive, the comparison in the if-else directive fails to compare the strings properly. I'm using this page for my documentation: http://httpd.apache.org/docs/2.2/mod/mod_include.html I'm at a complete loss as to why this is the case, and need a bit of help here. EDIT: I should note that dragarch is a hostname that I configured in /etc/hosts to point to 127.0.0.1 so I could test the site without having to use localhost. It has no real effect on the functionality of anything, other than to just act as a prettier hostname to use.

    Read the article

  • MediaElement.js setSrc() Loading The File But Not Changing pluginType

    - by doubleJ
    I'm working on a page that uses mediaelement.js to play mp3/mp4/wmv (yes, we have a lot of wmv). I have a list of links and those links should change the player. My effort is to make the changes to the player through javascript so that the page doesn't refresh. This code is working, but it refreshes every time. See a live demo of the non-ajax version. <?php $file = null; $file = $_GET["file"]; $format = null; if (preg_match("/mp4/i", $file)) $format = "mp4"; if (preg_match("/webm/i", $file)) $format = "webm"; if (preg_match("/wmv/i", $file)) $format = "wmv"; if (preg_match("/mp3/i", $file)) $format = "mp3"; if (preg_match("/ogg/i", $file)) $format = "ogg"; $mime = null; if ($format == "mp4") $mime = "video/mp4"; if ($format == "webm") $mime = "video/webm"; if ($format == "wmv") $mime = "video/wmv"; if ($format == "mp3") $mime = "audio/mp3"; if ($format == "ogg") $mime = "audio/ogg"; $element = "video"; if ($format == "mp3" || $format == "ogg") $element = "audio"; // you have to escape (\) the escape (\) character (hehehe...) $poster = "media\\120701Video.jpg"; $height = "360"; if ($format == "mp3") $height = "30"; ?> <!doctype html> <html> <head> <meta charset="utf-8"> <title>Embed</title> <link rel="stylesheet" href="include/johndyer-mediaelement-b090320/build/mediaelementplayer.min.css"> <style> audio {width:640px; height:30px;} video {width:640px; height:360px;} </style> <script src="include/johndyer-mediaelement-b090320/build/jquery.js"></script> <script src="include/johndyer-mediaelement-b090320/build/mediaelement-and-player.js"></script> </head> <body> <ul> <li><a href="embed.php">Reset</a></li> <li><a href="?file=media/120701Video-AnyVideoConverter.mp4">Alternative (mp4)</a></li> <li><a href="?file=media/120701Video-Ffmpeg-Defaults.webm">Alternative (webm)</a></li> <li><a href="?file=media/AreYouHurting-Death.wmv">Alternative (wmv)</a><li> <li><a href="?file=media/AreYouHurting-Death.mp3">Alternative (mp3)</a></li> </ul> <?php if ($file) { ?> <video src="<?php echo $file; ?>" controls poster="<?php echo $poster; ?>" width="640" height="360"></video> <div id="type"></div> <script> var video = document.getElementsByTagName("video")[0]; var player = new MediaElementPlayer(video, { success: function(player) { $('#type').html(player.pluginType); } }); <?php } ?> </script> </body> </html> This code requires <video> to be loaded, initially and with a file, so that the player mode (pluginType) is set. It will, then, only play formats that the pre-established mode supports (firefox in native mode won't play mp4). See a live demo of the ajax version. <!doctype html> <html> <head> <meta charset="utf-8"> <title>Embed</title> <link rel="stylesheet" href="http://www.mediaelementjs.com/js/mejs-2.9.2/mediaelementplayer.min.css"> <script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script> <script src="http://www.mediaelementjs.com/js/mejs-2.9.2/mediaelement-and-player.js"></script> </head> <body> <ul> <li><a href="javascript:player.pause(); player.setSrc('media/120701Video-AnyVideoConverter.mp4'); player.load(); player.play();">Alternative (mp4)</a></li> <li><a href="javascript:player.pause(); player.setSrc('media/120701Video-Ffmpeg-Defaults.webm'); player.load(); player.play();">Alternative (webm)</a></li> <li><a href="javascript:player.pause(); player.setSrc('media/AreYouHurting-Death.wmv'); player.load(); player.play();">Alternative (wmv)</a></li> <li><a href="javascript:player.pause(); player.setSrc('media/AreYouHurting-Death.mp3'); player.load(); player.play();">Alternative (mp3)</a></li> </ul> <video controls src="media/WordProductionCenter.mp4"></video> <div id="type"></div> <script> var video = document.getElementsByTagName("video")[0]; var player = new MediaElementPlayer(video, { success: function(player) { $('#type').html(player.pluginType); } }); </script> </body> </html> It seems like I need something like setType(), but I see no such option. I've read a couple pages that referenced refreshing the DOM after the javascript runs, but I haven't been able to successfully do it (I know enough about javascript to hack things around and get stuff working, but not enough to create whole new things). It is worth noting that Silverlight doesn't work with Internet Explorer 8 or Safari (not sure if it's my code, mejs, or the browsers). Also, neither Silverlight nor Flash play mp3 or webm (again, not sure where the problem lies). Is there a way to dynamically load different types of files into mediaelement?

    Read the article

  • Is it possible to lightbox many images but only show one image to activate them?

    - by Obay
    Hi, I'm using Lightbox to display photos. So If I have two categories of photos, "work" and "vacation", I would do... <a href="images/image-1.jpg" rel="lightbox[work]">image #1</a> <a href="images/image-2.jpg" rel="lightbox[work]">image #2</a> <a href="images/image-3.jpg" rel="lightbox[work]">image #3</a> <a href="images/image-4.jpg" rel="lightbox[vacation]">image #4</a> <a href="images/image-5.jpg" rel="lightbox[vacation]">image #5</a> <a href="images/image-6.jpg" rel="lightbox[vacation]">image #6</a> This displays 6 images, and when I click one of them, it starts the Lightbox. However, I'd like to be able to display only two images initially (one for 'work', one for 'vacation'), but when one of them is clicked, it behaves like the first example, e.g. display all photos in that category through Lightbox. Is this possible? If so, how? Any help is very much appreciated! :) Thanks

    Read the article

  • CSS Attribute selector - Match attribute values that begin with

    - by LuckyShot
    I am trying to identify all the <UL> that contain a menu list by defining the ID like this: <ul id="menutop"> <li><a href="#">item1</a></li> <li><a href="#">item2</a></li> <li><a href="#">item3</a></li> </ul> <ul id="menumain"> <li><a href="#">item1</a></li> <li><a href="#">item2</a></li> <li><a href="#">item3</a></li> </ul> As per what I understand, I could use: ul[id|='menu']>li>a {color:#f00;} (<a> direct child of a <li> direct child of an <ul> that has its id starting with menu) But it doesn't work. Searching a bit brought me this [question][1] which suggests that ID is an attribute and not a property so I don't get why it isn't working. What am I doing wrong? Here's a link to the CSS2 Matching attributes and attribute values as per the W3 standards ( http://www.w3.org/TR/CSS2/selector.html#matching-attrs ).

    Read the article

  • Convert a (nested)HTML unordered list of links to PHP array of links

    - by Klark
    Hi, I have a regular, nested HTML unordered list of links, and I'd like to scrape it with PHP and convert it to an array. The original list looks something like this: <ul> <li><a href="http://someurl.com">First item</a> <ul> <li><a href="http://someotherurl.com/">Child of First Item</a></li> <li><a href="http://someotherurl.com/">Second Child of First Item</a></li> </ul> </li> <li><a href="http://bogusurl.com">Second item</a></li> <li><a href="http://bogusurl.com">Third item</a></li> <li><a href="http://bogusurl.com">Fourth item</a></li> </ul> Any of the items can have children. (The actual screen scraping is not a problem, I can do that.) I'd like to turn this into a PHP array, of just the links, while keeping the hierarchical nature of the list. Any ideas? I've looked at using htmlsimpledom and phpQuery, which both use jQuery like syntax. But, I can't seem to get the syntax right. Thanks.

    Read the article

  • Trying to grab just absolute links from a webpage using BeautifulSoup

    - by Kevin
    I am reading the contents of a webpage using BeautifulSoup. What I want is to just grab the <a href> that start with http://. I know in beautifulsoup you can search by the attributes. I guess I am just having a syntax issue. I would imagine it would go something like. page = urllib2.urlopen("http://www.linkpages.com") soup = BeautifulSoup(page) for link in soup.findAll('a'): if link['href'].startswith('http://'): print links But that returns: Traceback (most recent call last): File "<stdin>", line 2, in <module> File "C:\Python26\lib\BeautifulSoup.py", line 598, in __getitem__ return self._getAttrMap()[key] KeyError: 'href' Any ideas? Thanks in advance. EDIT This isn't for any site in particular. The script gets the url from the user. So internal link targets would be an issue, that's also why I only want the <'a'> from the pages. If I turn it towards www.reddit.com, it parses the beginning links and it gets to this: <a href="http://www.reddit.com/top/">top</a> <a href="http://www.reddit.com/saved/">saved</a> Traceback (most recent call last): File "<stdin>", line 2, in <module> File "C:\Python26\lib\BeautifulSoup.py", line 598, in __getitem__ return self._getAttrMap()[key] KeyError: 'href'

    Read the article

  • C# Regex replace url

    - by Martijn
    I have a bunch of links in a document which has to be replaced by a javascript call. All the links looks the same: <a href="http://domain/ViewDocument.aspx?id=3D1&doc=form" target="_blank">Document naam 1</a> <a href="http://domain/ViewDocument.aspx?id=3D2&doc=form" target="_blank">Document naam 2</a> <a href="http://domain/ViewDocument.aspx?id=3D3&doc=form" target="_blank">Document naam 3</a> Now I want all this links to be replaced to: <a href="javascript:loadDocument('1','form')">Document naam 1</a> <a href="javascript:loadDocument('2','form')">Document naam 2</a> <a href="javascript:loadDocument('3','form')">Document naam 3</a> So the Id=3D in the url is the first parameter in the function and the doc parameter is the second parameter in the function call. I want to do this using Regex because I think this is the quickest way. But the problem is my regex knowledge is too limited

    Read the article

  • How to add favicon.ico in ASP.NET site

    - by Tapas Bose
    The solution structure of my application is: Now I am in Login.aspx and I am willing to add favicon.ico, placed in the root, in that page. What I am doing is: <link id="Link1" runat="server" rel="shortcut icon" href="../favicon.ico" type="image/x-icon" /> <link id="Link2" runat="server" rel="icon" href="../favicon.ico" type="image/ico" /> Also I have tried: <link id="Link1" runat="server" rel="shortcut icon" href="favicon.ico" type="image/x-icon" /> <link id="Link2" runat="server" rel="icon" href="favicon.ico" type="image/ico" /> But these aren't working. I have cleared the browser cache but no luck. What will be the path to the favicon.ico from: Login.aspx Site.master Thank you. The login page's URL: http://localhost:2873/Pages/Login.aspx and the favicon.ico's URL: http://localhost:2873/favicon.ico. I am unable to see the favicon.ico after changing my code as: <link id="Link1" rel="shortcut icon" href="/favicon.ico" type="image/x-icon" /> <link id="Link2" rel="icon" href="/favicon.ico" type="image/ico" />

    Read the article

  • JQUERY: Setting Active state on animated menu tabs

    - by Tony
    I have image sprites that use JQuery to set the BG position on mouseover and mouseout events. When I set the active state BG position using JQUERY it works fine until I move my cursor away from the active 'tab' which then fires the mouseout event animation. What I want is the mouseClick event to stop the animation on the active tab but still allow the animation effect to work on the other tabs, and when another tab is clicked for the active state to be removed from the current tab to the new 'active' tab. JQuery $(function(){ /* This script changes main nav links hover state*/ $('.navigation a') .css( {backgroundPosition: "-1px -120px"} ) .mouseover(function(){ $(this).stop().animate({backgroundPosition:"(-1px -240px)"}, {duration:400}) }) .mouseout(function(){ $(this).stop().animate({backgroundPosition:"(-1px -120px)"}, {duration:400, complete:function (){ $(this).css({backgroundPosition: "-1px -120px"}) }}) }) }); $(document).ready(function(){ $("a").click(function(){ $(this).css({backgroundPosition: "-1px -235px"}); }); }); HTML <ul class="navigation"> <li><a href="#index" tabindex="10" title="Home" id="homeButton"></a></li> <li><a href="#about" tabindex="20" title="About us" id="aboutButton"></a></li> <li><a href="#facilities" tabindex="30" title="Our facilities and opening Times" id="facilitiesButton"></a></li> <li><a href="#advice" tabindex="40" title="Advice and useful links" c id="adviceButton"></a></li> <li><a href="#find" tabindex="50" title="How to find Us" id="findButton"></a></li> <li><a href="#contact" tabindex="60" title="Get in touch with us" id="contactButton"></a></li> </ul> You can see what I've got so far here Thanks in advance for any help

    Read the article

  • How to get the child of an element being dragged with jQuery UI

    - by Walden
    I have the following html: <div id="gallery"> <ul> <li> <a href="url I want to get">link</a> </li> </ul> </div> and some jQuery that allows it to be dropped on another div: $trash.droppable({ accept: '#gallery > li', activeClass: 'ui-state-highlight', drop: function(ev, ui) { deleteImage(ui.draggable); var $flickrparenturl = $("a").attr("href"); //only gets href of <li> #1, not <li> being dragged $.post("updateDB.php", { 'flickrparenturl': $flickrparenturl } ); } }); What is the correct way to get the href attribute of the child of the element being dragged? $("a").attr("href"); is only getting the href of the 1st li on the page, not the one being dragged.

    Read the article

  • show/hide a link if certain jquery ui tab is selected.

    - by Mark
    When #my-text-link is clicked, i need to select tab 5 and when tab 5 is selected i need to hide #my-text-link. hope this makes sense, heres the code, and also what I have done so far, please feel free to show me a better way. Thanks in advance var $tabs = $('.tabbed').tabs(); // first tab selected $('#my-text-link').click(function() { // bind click event to link $tabs.tabs('select', 4); // switch to third tab $('#my-text-link').hide(); return false; }); <a href="#" id="my-text-link"></a> <ul> <li class="one"><a href="#tabs-1" title="Summary"></a></li> <li class="two"><a href="#tabs-2" title="Detailed Info"></a></li> <li class="three"><a href="#tabs-3" title="Images"></a></li> <li class="four"><a href="#tabs-4" title="Reviews"></a></li> <li class="five"><a href="#tabs-5" title="Dates &amp; Prices"></a></li> </ul> <div id="tabs-1"></div> <div id="tabs-2"></div> <div id="tabs-3"></div> <div id="tabs-4"></div> <div id="tabs-5"></div>

    Read the article

  • dynamically add listener to ajax created content in jQuery

    - by davidP
    I am trying to get the html value of a linked clicked. The links are created dynamically with Ajax so I don't think .bind will work and I don't have latest version with .live $('div#message').click(function() { var valueSelected = $(this).html(); // picks up the whole id. I juust want single href! alert(valueSelected); return false; }); <div id="message"> <br/> <a class="doYouMean" href="#">location A</a> <br/> <a class="doYouMean" href="#">location B</a> <br/> <a class="doYouMean" href="#">location C</a> <br/> <a class="doYouMean" href="#">location D</a> <br/> <a class="doYouMean" href="#">location E</a> <br/> </div>

    Read the article

  • Suckerfish Menu Not Working. Nested UL not displaying block

    - by Brett
    I'm going out of my mind with this one. I'm trying to build a suckerfish css drop down menu. I have the first level working ok but I can't get the nested ul (under the Glossary tab) to display in block format and show my a background color. I've been at this for three days and I'm about to go crazy. If anyone can help I'd really appreciate it. You can see it here: www.brettlockhart.com/blast/ body { min-width:640px; margin:0px; padding:0px 40px 0px 40px; background-color:#eee; } /*Nav One styles*/ nav#navOne ul { width:100%; min-width:640px; height:25px; margin:0px auto; padding:0px; background-image:url(/blast/images/navOneBg.png); border-radius:0px 0px 8px 8px; text-align:right; float:right; } nav#navOne ul li { position:relative; display:inline; margin: 0px 0px 0px 10px auto; padding:3px 0px; border-left:1px #0b4c8f solid; line-height:23px; } nav#navOne ul li:last-child { margin-right:10px; } .arrowDown { margin: auto; font-family:Tahoma, Geneva, sans-serif; font-size:.7em; color:#FFF; padding: 0px 5px 0px 0px; } nav#navOne ul li a { margin: 0px auto; padding: 4px 10px 4px 15px; font-family:Tahoma, Geneva, sans-serif; font-size:.7em; color:#FFF; border-left:1px #5d9ee0 solid; text-decoration:none; line-height:23px; } /*Nav One rollover*/ nav#navOne ul li ul { display:none; background-image:none; } nav#navOne ul li:hover ul { display:block !important; } nav#navOne ul li:hover nav#navOne ul li ul li { background-color:#69C !important; left:0px; top:26px; z-index:10; } h1 { float:left; width:158px; text-indent:-9999px; background-image:url(/blast/images/logo.png); background-repeat:no-repeat; } #search { float:right; width:280px; margin:0px; padding:0px; } /*Nav Two styles*/ nav#navTwo h3 { display:inline; } nav#navTwo ul { width:100%; height:50px; margin:0 auto; padding:0px; border:1px solid red; clear:both; } nav#navTwo ul li { display:inline; border: 1px solid green; margin-top:20px; } <header> <nav id="navOne"> <ul> <li><a href="#">Sign In</a></li> <li><a href="#">Register</a></li> <li><a href="#">Print Page</a></li> <li id="glossary"><a href="#">Glossary</a> <ul> <li><a href="#">Item Placeholder</a></li> <li><a href="#">Item Placeholder</a></li> <li><a href="#">Item Placeholder</a></li> <li><a href="#">Item Placeholder</a></li> <li><a href="#">Item Placeholder</a></li> <li><a href="#">Item Placeholder</a></li> </ul> </li> <li><a href="#">Text Size: A A A</a></li> <li><a href="#">Select Your Location</a> <span class="arrowDown">&#x2C5;</span></li> </ul> </nav><!--/navOne--> <h1>Logo</h1> <div id="search"> <form action="?" method="get"> <fieldset> <input type="text" id="searchField"> <input type="submit" id="searchSubmit" value="Submit"> Search:<label for="radioHere">here</label> <input type="radio" id="radioHere" name="here" value="here"> <label for="radioWeb">the web</label> <input type="radio" id="radioWeb" name="the web" value="the web"> </fieldset> </form> </div><!--/search--> <nav id="navTwo"> <ul> <li><h3>Residential:</h3></li> <li>TV</li> <li>Internet</li> <li>Phone</li> <li>Pricing</li> <li class="navTwoSelected">Music</li> <li>Order</li> <li>Billing</li> <li>Support</li> <li>|</li> <li>Business</li> <li>About Us</li> </ul> </nav><!--/navTwo--> <nav id="navThree"> <ul> <li>Today</li> <li>Watch</li> <li>Surf</li> <li>Play</li> <li class="navThreeSelected">Listen</li> <li>Learn</li> <li>Local</li> </ul> <h3>Tools:</h3> <ul> <li>Webmail</li> <li>Account</li> <li>Billing</li> <li>Order Services</li> </ul> </nav><!--/navThree--> <nav id="navFour"> <h3>Your are here:</h3> <ul id="breadcrumbs"> <li>Residential ></li> <li>My Place ></li> <li>Listen ></li> <li class="currentPage">Music</li> </ul> </nav><!--/navFour--> </header>

    Read the article

  • Problem adding and removing a jquery tab to the existing tabs dynamically.

    - by kranthi
    hi everyone, I have a href tag, upon clicking it a new jquery tab is added to the existing tabs,using the following js. $(function() { //DECLARE FUNCTION: removetab var removetab = function(tabselector, index) { $(".removetab").click(function(){ $(tabselector).tabs('remove',index); }); }; //create tabs $("#tabs").tabs({ add: function(event, ui) { //select newely opened tab $(this).tabs('select',ui.index); //load function to close tab removetab($(this), ui.index); }, show: function(event, ui) { //load function to close selected tabs removetab($(this), ui.index); } }); //load new tab $(".addtab").click(function(){ var href=$(this).attr("href"); var title=$(this).attr("title"); $("#tabs").tabs( 'add' , href , title+' <span class="removetab ui-icon ui-icon-circle-close" style="float:right; margin: -2px -10px 0px 3px; cursor:pointer;"></span>'); return false; }); }); and <a class="addtab" title="Tab Label" href="HTMLPage.htm">Add Tab</a> If the href attribute for 'a' tag corresponds to a '.htm' page I am able to add & remove the tab successfully.Where as if it corresponds to a '.aspx' page I am able to add a new tab ,but unable to remove the tab upon clicking on the 'close' sign next to the tab title. Please help. Thanks in advance

    Read the article

  • Bullets WILL NOT dissapear in firefox

    - by DunlopBurns
    Hoping you can help me with a problem. I cannot get rid of Bullets in Firefox, i don't want any anywhere, hence my list-style-type: none!important being everywhere. It only appears in Firefox as far as i can tell. the HTML.... <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> <head> <title>littleprints.nl</title> <meta name="description" content="----" /> <meta name="keywords" content="----" /> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script> <script type="text/javascript" src="js/slimbox2.js"></script> <link rel="stylesheet" href="css/slimbox2.css" type="text/css" media="screen" /> <link rel="stylesheet" href="layout.css"/> <link rel="stylesheet" href="style.css"/> </head> <body> <div id="container"> <div id="inline1"> <div id="mainpic"> <img src="myimages/circle.jpg" width="100%" alt="Circle bracelet"/> </div> <div id="intro"> <p>Hi and welcome to little prints NL. we make this and that all by hand with 100% silver. my name is Donna Burns and i work by commision, ive been studying for 4 years and am currently learning to become a goldsmith.</p> </div> </div> <div id="inline2"> <p>Click for more...</p> <div id="images"> <a href="myimages/photos/dogtag.jpg" rel="lightbox-gal" title="Beautiful, isn't it?" ><img src="myimages/work/chunky.gif" alt="chunky"/></a> <a href="myimages/photos/hearts.jpg" rel="lightbox-gal" title="Beautiful, isn't it?" ><img src="myimages/work/hearts.gif" alt="hearts"/></a> <a href="myimages/photos/close.jpg" rel="lightbox-gal" title="Beautiful, isn't it?" ><img src="myimages/work/close.gif" alt="close"/></a> <a href="myimages/photos/pearl.jpg" rel="lightbox-gal" title="Beautiful, isn't it?" >&nbsp;</a> <a href="myimages/photos/flower.jpg" rel="lightbox-gal" title="Beautiful, isn't it?" >&nbsp;</a> <a href="myimages/photos/frontcircle.jpg" rel="lightbox-gal" title="Beautiful, isn't it?" >&nbsp;</a> <a href="myimages/photos/dogtag.jpg" rel="lightbox-gal" title="Beautiful, isn't it?" >&nbsp;</a> </div> </div> </div><!--end container--> <div id="footer"> <div id="footalign"> <div id="social"> <ul> <li> <a href="http://www.facebook.com/littleprints" title="Little Prints"> <img src="myimages/facebook.png" width="50px" height="50px" alt="FB"/> </a> </li> <li> <a href="contact.html" title="contact"> <img src="myimages/at.gif" alt="@"/> </a> </li> </ul> </div> <div id="contact"> <p><br/>To enquire about a charm either phone:<br/> 0787463289<br/> or use one of the methods to the side.</p> </div> </div> </div> </body> </html> the CSS... * {margin: 0; padding: 0; border: 0;} html, body { background-color: #000000;image; text-align: center; font: 16px/1.8 Verdana, Arial, Helvetica, sans-serif; list-style-type: none!important; text-decoration: none;} #container { position: relative; width: 900px; top: 0; min-height: 100%; margin-left: auto; margin-right: auto; padding-top: 20px; background-image: URL(myimages/back2.gif); margin-bottom: 180px; } #footer { background-color: #555555; position: relative; clear: both; bottom: 0; width: 900px; height: auto; margin-left: auto; margin-right: auto; margin-bottom: 20px; padding-bottom: 22px; margin-top: -180px; } #inline1{ display: inline-block; margin-top: 250px; margin-bottom: 20px; } #inline2 { display: inline-block; margin-top: 30px; margin-bottom: 50px; } #mainpic { float: left; width: 68%; margin-left: 20px; } #intro { float: right; width: 20%; margin-left: auto; margin-right: 50px; margin-top: 20px; } #images { margin-bottom: 20px; margin-left: auto; margin-right: auto; } #footalign { display: inline; width:900px; list-style-type: none; } #contact { text-align: center; background-color:#555555; float: middle; list-style-type: none; } #social{ background-color:#555555; float: right; list-style: none; padding:0; padding-right: 5px; text-align:center; list-style-type: none!important; } #social img{ border: none; list-style-type: none!important; margin: 3px; } #social ul{ border: none; list-style-type: none!important; } #social a{ display:inline-block; -webkit-transition:all .5s ease-out; -moz-transition:all .5s ease-out; -ms-transition:all .5s ease-out; -o-transition:all .5s ease-out; transition:all .5s ease-out; list-style-type: none!important; } #social a:hover{ display:inline-block; -webkit-transform:translate(-10px,0px); -moz-transform:translate(0px,-10px); -ms-transform:translate(-10px,0px); -o-transform:translate(-10px,0px); transform:translate(-10px,0px); list-style-type: none!important; } #form { margin-top: 250px; margin-bottom: 50px; } .nav1 {font-family: sans-serif;font-size: 22px;text-shadow: 2px 2px 5px #000000;} a:link {text-decoration:none; color:#000000; padding:3px;} a:visited {text-decoration:none; color:#000000;} a:active {text-decoration:none; color:#555555;} a:hover {text-decoration:none; color:#555555;} .nav2 {font-family: sans-serif;font-size: 22px;text-shadow: 2px 2px 5px #ffffff;} a:link {text-decoration:none; color:#ffffff; padding:3px;} a:visited {text-decoration:none; color:#ffffff;} a:active {text-decoration:none; color:#555555;} a:hover {text-decoration:none; color:#555555;} .p1 { color: #ffffff; } div#images img { max-width: 500px; height: auto; }

    Read the article

< Previous Page | 17 18 19 20 21 22 23 24 25 26 27 28  | Next Page >