w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Active Link on javascript menu to work on parent link not just child link
Look at this JSFiddle. $('#nav li a').click( (...) // Here I removed the "active" class from all siblings "li" $(this).parent().siblings().removeClass("active"); (...) // Here I add the "active" class to this "li" $(this).parent().addClass("active"); (...) ) Note 1: The new JSFiddle

Categories : Javascript

Python, if 'word' is in link print link else if '2ndword' in link print that one
if 'impressum' in newurl: print newurl elif 'kontakt' in newurl: print 'Not impressum:' print newurl I didn't see any way you distinguish from which "if" case cough the link, so try this and you'll see if it's the if or elif block printing the link. And as @Joshua writes, you don't need to do "'impressum' not in newurl" Since it's already been checked in the if block.

Categories : Python

want to hide/modify my link in address bar while opening a link in web browser using java swing
You're not able to do that with the Desktop.browse() method. The URL will be visible to the user. You could perform a server side redirect afterwards, but the user would still see the original URL for a short time at least.

Categories : Java

Rspec target a specific link in xpath where link text is a piece of data
Please try your xpath this way,you missed the Ruby's string interpolation: find(:xpath, "//a[text()= "#{@task1.name}"][1]").click I tried to produce a similar example :- require 'nokogiri' doc = Nokogiri::HTML::Document.parse <<-eotl <div> <p>foo</p> <p>foo</p> <p>bar</p> </div> eotl doc.class # => Nokogiri::HTML::Document class Person attr_accessor :name end ram = Person.new ram.name="foo" ram.name # => "foo" doc.search("//div/p[text()= "#{ram.name}"]").to_a.size # => 2

Categories : Ruby On Rails

Magento onepage link adds hash(#) to current url when clicked on any edit link?
If you've copied the href from the base default theme - and have confirmed it's also a # on base default, you've probably missed some Javascript that is bound to the link. I would have another thorough look through the base default theme to figure out the exact actions triggered by the link.

Categories : Magento

Convert a local resource link (file:///) to an accesible link (http://) in portlet
Just put them outside /WEB-INF to make them publicly accessible. E.g. WebContent |-- META-INF |-- WEB-INF | |-- files | | `-- ... | `-- web.xml |-- images | |-- foo.png | |-- bar.png | `-- baz.png : This way you can access them like <p:graphicImage value="/images/foo.png" /> <p:graphicImage value="/images/bar.png" /> <p:graphicImage value="/images/baz.png" /> Just generate exactly those paths "/images/foo.png", "/images/bar.png", "/images/baz.png", etc instead of local disk file system paths. This makes indeed no sense as the endusers visiting your website doesn't necessarily have those files at exactly the same locations of their own disk file system. Unrelated to the concrete problem, using ExternalContext#getRealPath() for this

Categories : JSF

twitter link issue (the same link inserted by different ways give different tweet lenght)
It seems I found out the answer (I suppose that it's true base on my 2 hour investigation, but anyway it works) (I dublicated the answer because at first I chose community wiki): when you post link to twitter, twitter tries to shorten your link, but it does it in a clever way. twitter's shorten url is 15 characters in length. So if you url is larger it will be shorten. but if your url is smaller twitter text will be filled by your shorter url (but anyway when you try to get the link at twitter account, you will see that url is changed anyway, but in fact that changed url doesn't influence your tweet length, the length will be filled only with your shorter link url). I got shorter link at bit.ly (14 characters), but that wasn't enough for me, because I need 12, but then I found that I c

Categories : Iphone

How to deal with link text or link image with string from BeautifulSoup in python?
You can replace extra whitespace with single spaces using re.sub('s+', ' ', inputstring). The regex s+ matches one or more (+) whitespace characters (s). Example: >>> inputstring = u'hello world! this is a test' >>> re.sub('s+', ' ', inputstring) u'hello world! this is a test'

Categories : Python

Text of link will only show if my mouse hovers over link area, not anywhere in whole button
Just try something as below: CSS: .CSSButton { border: 1px solid #D1D1D1; background: -webkit-gradient( linear, left top, left bottom, color-stop(0.1, #FFFFFF), color-stop(0.9, #D1D1D1) ); background: -moz-linear-gradient( center top, #FFFFFF 10%, #D1D1D1 90% ); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFF', endColorstr='#D1D1D1'); background-color: #FFFFFF; -moz-box-shadow: inset 0px 1px 2px 0px #FFFFFF; -webkit-box-shadow: inset 0px 1px 2px 0px #FFFFFF; box-shadow: inset 0px 1px 2px 0px #FFFFFF; -moz-border-radius: 5px; -webkit-border-radius: 5px; border-radius: 5px; text-shadow: 1px 1px 2px #FFFFFF; font-weight: bold; margin: 5px 5px; padding: 6px 6px; color: #999999; letter-spacing: 1px; font-family: 'Arial', sans-serif; font-size: 16px; wi

Categories : CSS

Link to exact page in Wordpress mobile site by changing url in link
If you have no www. prefix, you can do it with JavaScript this way: href="javascript:window.location.href = window.location.href.replace('//', '//m.');void(0)"

Categories : PHP

Highlight anchor link when user tabbs to link from a text input box
Do it using focus and hover a:hover {background:yellow; color:navy;} a:focus {background:yellow; color:navy;} Here is a demo http://jsfiddle.net/kevinPHPkevin/s8Rdu/1/

Categories : CSS

Whole page scrolls down by clicking link directed to inside link in iframe
try the following: $("#pr1").click(function(e){ e.preventDefault(); $("#content").html('<iframe id="idIframe" src="research/index.html#pr1" frameborder="0" height="100%" width="98%"></iframe>');

Categories : Jquery

Clicking on a link doesn't work but copy-pasting the link into url works
This is system-dependent and made the difference for my servers, since the bundler versions were different on dev and prod. gem uninstall bundler If it asks, choose all. gem install bundler -v 1.2.2

Categories : Mongodb

Brew Install Python Fails Due to Link gdbm link issue
I had the same issue., Try to change the ownership of the directory (recursively) sudo chown -R username:admin /usr/local/include In the above command., replace the username with your username. This should resolve the issue

Categories : Python

jQuery fading "back to top" link. Page load link visibility
I tested the code below and it worked without problems <!doctype html> <html> <head> <script src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.2/jquery.min.js"></script> <script type="text/javascript"> $(document).ready(function () { // hide #back-top first $("#back-top").hide(); // fade in #back-top $(function () { $(window).scroll(function () { if ($(this).scrollTop() > 500) { $('#back-top').fadeIn(); } else { $('#back-top').fadeOut(); } }); // scroll body

Categories : Javascript

Create Link for visiting site as registered user. But this link will have expire date(example 3 days)
Very simple. When the user creates the link, capture the datetime and save it in a database. When ever the link is clicked, check if the age of the link is older than 3 days. If it is, deactivate the link and/or remove it. This is the easiest way. Another way is to have a process running which will check and automatically disable the link after 3 days. This is usually more difficult to achieve though.

Categories : Asp Net Mvc

special character in a a tags href link when making a link to an email is not parsed right to the mail client
Looks like some kind of UTF-8 issue. Either the mail is sent using UTF 8 (and interpreted as ANSI) or something similar happens when parsing DOM or evaluating the link. But in general, you shouldn't put non-ANSI-characters into URLs. Instead, escape them using %HEXCODE. Also space characters should be replaced using %20 or +. Most programs (like web browsers or in this case Outlook) accept space characters and other things, but you still shouldn't rely on that behavior as it might go wrong (as it did here).

Categories : Firefox

Facebook tab app using Dropbox Public Link (Link Error SOLVED)
To solve this, you have to input into the Page Tab Url your Dropbox public link of the html file from https://dl.dropboxusercontent.com/u/123456/foldername/index.html to https://dl-web.dropbox.com/u/123456/foldername/index.html This is accurate as of August 2013. Enjoy!

Categories : Facebook

Creating a link with implode only makes one array item a link?
First build an associative array from your ids to your names, then create an array of links and implode it, something like: <?php $funamearr = array( "Conner", "Rach667" ); $fidarr = array( 2, 3 ); $users = array_combine($fidarr, $funamearr); foreach($users as $id => $name) { $links[] = sprintf('<a href="../profile?id=%s">%s</a>', $id, $name); } echo implode('<br/>', $links);

Categories : PHP

Changing URL on AngularJS without transitioning state for a particular link, but keeping the URL in the link
You can try angular ui bootstrap modal for better integration with angularJS. Take a look at an example in http://angular-ui.github.io/bootstrap/ Or you may open a modal via data-target="#abc" instead of href="#abc"

Categories : Javascript

Need help editing JavaScript - Trying to make a link "active" when another link is clicked
Assuming you should only have one active element on the page, you could do something like this. $('.nav li a').on('click', function() { $('.active').removeClass('active'); $(this).parent().addClass('active'); }); If not then you can use closest like so $('.nav li a').on('click', function() { $(this).closest('.active').removeClass('active'); $(this).parent().addClass('active'); }); From your comment i think this could work $('.nav li a').on('click', function() { $('active').removeClass('active'); var link = $(this).attr('href'), // link1 number = parseInt(link.substr(-1)), // 1 newHref = link.slice(0, link.length - 1) + number++; $(newHref).addClass('active'); }); so if you click on link1 then link2 will get the active class

Categories : Javascript

Easy way to style link colour separate from a:link
apply different class attribute to that link. for ex: HTML <a href="#" class="red">link1</a> <a href="#" class="black">link2</a> CSS a:link { text-decoration: underline; } .red{ color: #FF0000; } .black{ color: #000000; } see this Fiddle

Categories : CSS

Link android and iOS application to a common link using Facebook
it definitely is possible but you will have to use the facebook sdk: https://developers.facebook.com/docs/howtos/androidsdk/3.0/link-to-your-native-app/ hope this helps

Categories : Android

Jquery to copy first link to second ul and then change class of first link
When you have a jQuery object and you access it by numeric index, you're left with an HTML element. So $('body')[0] == document.body. This means that when you access pageLinks[x], you're really getting a raw element. This means that you want pageLinks[x].appendChild(pageLinks[i]);, not pageLinks[x].childNodes.append(pageLinks[i]);

Categories : Javascript

how to create link in asp.net website in order to link me to mvc project?
If this projects are spearate websites (i assume this from your question) the only choice is to hard-code link into ASP.NET. Of course you can put in configuration to easy change it on production server.

Categories : Asp Net

Prestashop product link unwanted characters in the end of the link
These "unwanted characters" are used by JavaScript on your page to determine which combination of product attributes customer selects. I don't think this is an error, as the link fully describes the product. If you need need to get rid of the URL hash part (characters after #) you have to create another mechanism for product attribute selection.

Categories : PHP

onclick does not fire in a link that is created by clicking another link
document.write(htmlstr) replaces the entire DOM with the link / htmlstr you are about to insert. Use pure javascript to create the link(s) instead : function writelink(num){ var link = document.createElement('a'); link.innerHTML='link '+num; link.href='#'; link.onclick=hiya(num); document.body.appendChild(link); } Just replace writelink() with the code above. You would typically want to add the link to a certain element instead of just <body>, lets say a <div> with the id menu : var cnt = document.getElementById('menu'); cnt.appendChild(link); update <!doctype html> <html> <head> </head> <body> <a href="#" onclick="writelink(2);">link2</a> <script> function hiya(num) { alert("hiya " + num); } function writel

Categories : Javascript

HtmlUnit to click on specific link from link's reference with same name
I would suggest you to rather use the IMDB api then doing all that The IMDb currently has two public APIs that are, although undocumented, very quick and reliable (used on their own site through AJAX). A statically cached search suggestions API: http://sg.media-imdb.com/suggests/a/aa.json http://sg.media-imdb.com/suggests/h/hello.json Format: JSONP More advanced search Name search (json): http://www.imdb.com/xml/find?json=1&nr=1&nm=on&q=jeniffer+garner Title search (xml): http://www.imdb.com/xml/find?xml=1&nr=1&tt=on&q=lost Format: JSON, XML and more

Categories : Java

Link styled as a button, printed as link without styling
When you print a webpage, the default (print.css) is used instead of user-defined CSS to ensure proper display on the page. Hence your class "btn btn-primary" is not considered. You may include in your webpage a print.css where you can add your own styles NOTE: If you do not provide a print.css, you see that the alignment, layout, colour and font are all in their non-styled form.

Categories : HTML

Force a link to open a "Save link as" dialog
If I understood correctly and without any plugins, I think it is almost impossible. The only way you can do that would require you to verify the browser and for some browser like Chrome (due the spec http://dev.w3.org/2009/dap/file-system/file-dir-sys.html ) you can do that.

Categories : HTML

post link vs pre link in Angular js directives
The only time you'd want to use a pre link is when you need to perform some preparation on the scope before any child elements compile. My team has used it when writing a grid directive to define the grid object on the scope and setup some of its properties that are needed before any of the child row and cell objects are compiled. Hope that helps!

Categories : Angularjs

hover over div to reveal link, but can't click on link
You could try something like this: http://jsfiddle.net/XPLde/1/ HTML: <ul> <li> <img src="http://placehold.it/50x50" alt=""> <a href="#">test</a> </li> <li> <img src="http://placehold.it/50x50" alt=""> <a href="#">test</a> </li> <li> <img src="http://placehold.it/50x50" alt=""> <a href="#">test</a> </li> <li> <img src="http://placehold.it/50x50" alt=""> <a href="#">test</a> </li> <li> <img src="http://placehold.it/50x50" alt=""> <a href="#">test</a> </li> </ul> CSS ul {width:130px; margin:0; padding:0;

Categories : Jquery

Why is my external link rendered as internal link?
The slashes in the URL are always required. It could be that your browser does some correction to the invalid url. Try to put https:stackoverflow.com in the addressbar of your browser and it will try to correct it in most browsers.

Categories : Asp Net Mvc

HTML, CSS: Styling a link and making the whole div link
.categoryName a is saying style a elements inside of the .categoryName element This should work: HTML <a class="categoryName" href="#" onclick="toggle('category')"><div>Test</div></a> CSS .categoryName { color: black; text-decoration: none; font-weight: bold; } .categoryName div { border: 1px solid black; padding-left: 10px; padding-bottom: 10px; padding-top: 10px; border-radius: 5px; } http://jsfiddle.net/S9A7L/ So this is saying style the div element inside of the element with a class of categoryName. I moved the class from the a to the div and changed the css.

Categories : HTML

Inherit an :visited link with color of the link
Until a better answer comes up, there is a partial solution: according to this MDN page, Mozilla defines -moz-visitedhyperlinktext as the "visited" colour for hyperlinks. So, if you have this HTML: <a href="#">This is what an a normally looks like</a> <div class="test"> <a href="#">This is an a in a black container</a> </div> <div class="test"> <a href="#" style="color:-moz-visitedhyperlinktext">This is a visited a?</a> </div> with this CSS: .test, .test * {color:black} the a will come out looking "naturally", as you can see in this fiddle. Only in Mozilla. It won't work in other browsers, but you can write color:blue; color:-moz-visitedhyperlinktext; for the color, and other browsers will ignore the -moz- one.

Categories : CSS

How to link a hash link from the URL to Javascript content?
u could do it this way: creating an url with hash from current url: var url = window.location.href + '#Tab0'; reading a hash from current url: var hash; if (window.location.href.indexOf('#') > -1) { hash = url.split('#')[1]; }

Categories : Javascript

How to link to the kth link on another web page in simple html?
You cannot do this with pure HTML. You will need either Javascript or server-side code, in which you retrieve the source of Reddit's homepage, parse it to pick out the link you want, and use its href attribute's value as the href value for your own link.

Categories : HTML

Getting direct link form redirect link
You can use cURL to resolve a given URL: function resolveURL($url) { $ch = curl_init($url); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HEADER, true); curl_setopt($ch, CURLOPT_NOBODY, true); $response = curl_exec($ch); $resolved = curl_getinfo($ch); return $resolved['url']; } Usage: echo resolveURL('http://example.com/someurl.php?foo=42')

Categories : PHP

How to find the mp4 video link from an Instagram link
The Instagram video is simply a new object in the JSON feed called "video". There is actually a plugin already avaialble for download that pulls in the video. You could probably just sample the code here to see how its done. Or just use the plugin since its already doing the job. Jquery Instagram Video Plugin

Categories : Api

show/hide link cliking on another link AND outside of div
Change layer id to class like this <div id="layer"> to <div class="layer"> Note: ID's must be unique Then on click hide layer $('.link').click(function (e) { $('.layer').hide(); DEMO

Categories : Javascript



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.