w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
jQuery ScrollTo causing elements to disappear in IE
Alrighty, I've solved this issue. Elsewhere on the page (not within that #content section), I had a separate div which was fixed position. For whatever reason, keeping this fixed is what was causing IE issues with other elements scrolling in to view. Changing that div to absolute positioning (not an issue in this case, as all the scrolling was done within the #content section) made all the difference. I should add that jQuery ScrollTo had nothing to do with this (removing all scripts and using overflow auto on #content to get scrollbars, showed that the issue even happened without it). It's purely a rendering issue with scrolling elements over the top of fixed positioned elements.

Categories : Jquery

Not answered ItemContainerStyle Causing Telerik radTreeview to disappear. (WPF)
I think you have to extend the existing style with the BasedOn Property and not just override it: <Style TargetType="{x:Type telerik:RadTreeViewItem}" BasedOn="{StaticResource {x:Type telerik:RadTreeViewItem}}"> Oh and remove your ItemTemplate: You can't set both ItemTemplate and ItemContainerStyle.

Categories : Wpf

Hover links disappear before you can click them
Try adding height #header ul li a{ text-decoration:none; font-size:22px; color:white; font-weight:bold; height:30px; line-height:30px; margin-left:10px; }

Categories : CSS

Use facebook as (alternate user account) causing like button to disappear
As far as I am aware, fan pages can only like objects within Facebook. The like button on websites are meant for personal profiles only. Your only option to maintain the same layout would be to fix the div container of the like iFrame to a fixed height. The overflow hidden should also help (already set).

Categories : Javascript

Why is my Facebook like button causing comment box to flash and disappear on my Joomla website?
Apparently, this happens when a site is new and you click like too many times. There was also a problem with the comment box that was fixed by going to root/media/jui/css/bootstrap-extended.css and changing iframe, svg { max-width: 100%; } to iframe, svg { max-width: inherited; } Hope this helps someone.

Categories : Joomla

$(window).scrollTop in IE 8 Browser is causing issues with links, how to fix?
I believe I found the solution to my problem as strange as it may seem. Because the font-size is being set to: 0.8em (overall body font-size), and the type of font is GOTHIC. The answer to this is located here: IE8 font-size toggles on :hover - Japanese lang only UNBELIEVABLE!

Categories : Jquery

Using selenium webdriver, how to click on multiple random links in webpage one after another continuously to detect broken links?
When testing for a bad page, I usually test for the title/url. If you are testing a self-contained site, then you should find/create a link that is bad, and see what is unique in the title/URL, and then do something like: assert(!driver.getTitle().contains("500 Error")); If you don't know what the title/url will look like, you can check if the title contains "500"/"404"/"Error"/"Page not found" or if the page source contains those as well. This will probably lead to a bunch of bad pages that aren't really bad (especially if you check for the page source), and will require you to go through each of them, and verify that they really are bad

Categories : Python

JavaScript slide, text disappear and center fix
To solve the first problem: Your slider needs a wrapper div 'window', that only lets one image show through at a time. You should center the wrapper div, and not center the slides. <div class="slider-wrapper"> <div id="slider"> Remove: <center>...</center> CSS for above: .slider-wrapper { position: relative; width:680px; margin: 0 auto; } Also, remove the padding from nav ul, as it pushes it off-center: #nav ul { padding: 0; } As you are sliding the #info off the page as well, you need to use a wrapper div for it: <div class="info-wrapper"> <div id="info"> CSS for above: .info-wrapper { position: absolute; top:350px; height:140px; width: 100%; } #info { position:absolute; top: 0px; le

Categories : Javascript

android browser (webkit) select-multiple's items disappear when selected
Here is a reference from the android issue tracker that addresses a similar issue when we select any option from a SELECT tag having the attribute MULTIPLE, the choosen option becomes invisible Seems like the select multiple doesn't support css.

Categories : HTML

Multiple table query with multiple ON links
I don't understand well the concept but is your question is if you can have multiple ON same join sentence answer is NOT you have to combine ON and And for the conditional clause. but is your question is : multiple on in multiples join in the same query answer is YES you can do that. I recommend you use outer join to create this query. and in your query to you get records the three category should be populated in the table if it is not required change the And by Or at least that you need all three category are populated. Select T.Date, T.VIN, T.Text, C.Description, Tr.Description From Trending T Inner Join Categories C on( T.FkCategorie = C.PkCategorie Or T.FkCategorie2 = C.PKCategorie

Categories : Mysql

A Comprehensive Regular Expression to find URL, links,page links, website links from HTML Page or String
Have a look here http://regexlib.com/Search.aspx?k=URL&AspxAutoDetectCookieSupport=1 You can find a lot of examples and patterns there and there are a lot of general Regex tutorials and articles. After a quick browse I found this : ([dw-.]+?.(a[cdefgilmnoqrstuwz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvxyz]|d[ejkmnoz]|e[ceghrst]|f[ijkmnor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eouw]|s[abcdeghijklmnortuvyz]|t[cdfghjkmnoprtvwz]|u[augkmsyz]|v[aceginu]|w[fs]|y[etu]|z[amw]|aero|arpa|biz|com|coop|edu|info|int|gov|mil|museum|name|net|org|pro)(|W(?<!&|=)(?!.s|.{3}).*?))(s|$) Should do the trick, but I'm sure there are more elegant examples on that list.

Categories : C#

add_endRequest(EndRequestHandler) causing my javascript to popup twice
This seems like an odd implementation of essentially trying to run a client side validation script before the form is submitted if I'm not mistaken? I suggest you try implementing James McCormack's answer found here: How to capture submit event using jQuery in an ASP.NET application?

Categories : Javascript

Javascript deleteRow causing indexSizeError, need closure
I think you're over thinking the whole function/anonymous function/closure stuff here. It's looking a little too complicated. Try this code: var table = document.getElementById("editTable"); var row = table.insertRow(-1); var remove = document.createElement("input"); //Append input first so you can get it's parent var td1 = row.insertCell(-1) .appendChild(remove); remove.type = "button"; remove.value = "Remove"; remove.onclick = function () { var parent = this.parentNode.parentNode; //get the row node table.deleteRow(parent.rowIndex - 1); //Delete the row index behind it. }; jsFiddle

Categories : Javascript

ios: multiple webview with multiple links
NSInteger i; int xCoord = 0; int yCoord = 0; int webWidth = 80; int webHieght = 80; int buffer = 10; NSMutableArray *links = [NSMutableArray arrayWithObjects:@"link 1",@"link 2",@"link 3",@"link 4",@"link 5",nil]; for (i = 1; i <=5; i++) { UIWebView *video =[[UIWebView alloc] initWithFrame:CGRectMake(xCoord , yCoord, webWidth, webHieght)]; NSString *link = [links objectAtIndex:i]; [video loadHTMLString:link baseURL:nil]; [video setBackgroundColor:[UIColor clearColor]]; [video setOpaque:NO]; [scrollview addSubview:video]; yCoord += webHieght + buffer; }

Categories : IOS

Why is my DataPager causing multiple MouseButtonUp events to be throw?
The event is being registered each time dataGrid_list_LoadingRow is called which must be happening whenever you click to another page. private void dataGrid_list_LoadingRow(object sender, DataGridRowEventArgs e) { e.Row.RemoveHandler(Control.MouseLeftButtonDownEvent, Row_MouseLeftButtonDown); e.Row.AddHandler(Control.MouseLeftButtonDownEvent, Row_MouseLeftButtonDown, true); } On the first time this is hit, RemoveHandler will not cause any problems as it will simply have no effect, according to the documentation. But on the second time this function is hit, it will remove the initially registered handler and simply add it again. This way, you won't just keep building up the list of registered handlers. Also, new MouseButtonEventHandler(Row_MouseLeftButtonDown) is not necessary,

Categories : C#

SIPp with multiple DTMF signals causing problems
To answer my question, I used this patch to send DTMF in-band. http://sourceforge.net/p/sipp/patches/50/ No need to convert from wav to pcap. Also the invite message body has these params: o=root 1821 1821 IN IP4 [remote_ip] s=session c=IN IP4 [remote_ip] t=0 0 m=audio [media_port] RTP/AVP 96 0 a=rtpmap:18 G711a/8000 a=silenceSupp:on - - - - a=ptime:20 a=sendrecv a=rtpmap:0 PCMU/8000 a=rtpmap:96 telephone-event/8000 a=fmtp:96 0-16

Categories : Misc

Android app using TabHost with Multiple Maps causing issue
This guy has a great solution http://www.ankitkedia.com/2013/07/07/android-google-map-v2-use-multiple-maps-in-application/

Categories : Android

Javascript setTimeOut causing Access Denied Error
You code has nothing to do with JQuery, That being said, Here you go: var timer1,timer2; window.onload = function () { timer1 = setTimeout(function(){ // Some Code here timer2 = setTimeout(arguments.callee, 100); }, 100); } // add this where needed (form close?) clearTimeout(timer1); clearTimeout(timer2); You could also add an if statement in your setTimeout function to check if the form is actualy there.

Categories : Javascript

Javascript error causing fancybox not to work on firefox
The problem is not obvious from the first look on the code. You have this: //************************************************************************** // ******************************** NO CONFLICT ******************************** jQuery.noConflict() // return `$` to it's previous "owner" (function($) { // in here you're assured that `$ == jQuery` // ... left out code that is not important for the problem .... })(jQuery); //CLOSE NO CONFLICT// The problem with this part is that after jQuery.noConflict() you miss a ;. For the JS interpreter it looks like: jQuery.noConflict()( function($) { } })(jQuery); And because jQuery.noConflict() is not returning a function you get this error. To to avoid such problems add ; even if it can be omitted in some situations.

Categories : Javascript

external iframe causing javascript Date() to malfunction
In certain contexts Chrome will cache Date() constructors. This is a recent bug in Chrome, as shown in the following bug report: https://code.google.com/p/chromium/issues/detail?id=280531 This bug report provides a code example detailing the same problem - cached Date() constructors when when switching between windows under the same domain. In your case, the <iframe> is creating a new window context and triggering the same bug. As a workaround you can use Date.parse() and setTime() to bypass Chrome's internal Date constructor caching. var date1 = new Date(); var timestamp = Date.parse('2013-08-30T14:06:56-04:00'); date1.setTime(timestamp); http://jsfiddle.net/bcg47/4/

Categories : Javascript

Data URIs causing syntax errors in Javascript
I do it like this: img.src = "1234 ... 56789" + // "01234567 ... 7890" + // ..... "67879878907890"; Some people I work with like to put the + on the front of the line, claiming its easier to read. Assume you have the image data, base64 encoded in a string. A sort of pseudo C/Java/Javascript like language would have code something like this (since I don't know Python): String image64 = ... String output = "img.src = "data:image/jpg;base64, "; for (int i = 0; i < image64.length ; i += 100) { if (i > 0) { output += "" + // ""; } if (i + 100 < image64.length) { output += image64.substring(i, i+100); } else { output += image64.substring(i); // this gets the rest } } output += ""; "; Then you write the value of output to

Categories : Javascript

Git Add Multiple HTTPS Links
First of all, git remotes are specific to a given local repository, they aren't stored on the server. So unless everyone's stuck using the same local checkout, each person should just be able to set up the remote for the checkout they're using with their own account: git remote add origin https://<username_here>@bitbucket.org/company/site.git (Obviously for that to work each user will need to have their own BitBucket account with access to the repository.) If, for some reason, you still want to have git prompt for both a username AND password, (Everyone is sharing the same local checkout for some reason?) then you can just get rid of the <user>@ part of the URL completely. Git will then prompt you for both a username AND password every time you try to fetch or push: git re

Categories : GIT

Opening Multiple Links In ASP.NET MVC?
As you already found out this is not possible from the server side, so pass the report URLs to the client and use something like the following JavaScript: @if (!String.IsNullOrWhiteSpace(Model.ReportUri)) { <a id="reportLink" href="@Model.ReportUri" target="_blank">REPORT</a> <script type="text/javascript"> var link = document.getElementById('reportLink'); link.click(); link.parentNode.removeChild(link); </script> } Please keep in mind, that popup-blockers will most likely block this, so you should tell this somehow to the user. Also maybe it is usefull to keep the links on the page in your case (so remove the last line of my script) to give the user the chance to manually open them when they get blocked...

Categories : C#

Handling links in JavaScript
Use the window.open method, and set the name argument to _blank to open links in a new tab. e.g. window.open("http://google.com", "_blank") See here If you just want to store the links in JavaScript and then open them all when a user clicks on a button, why not do something like this: function addListener(element, eventName, handler) { if (element.addEventListener) { element.addEventListener(eventName, handler, false); } else if (element.attachEvent) { element.attachEvent('on' + eventName, handler); } else { element['on' + eventName] = handler; } } var links = ["http://google.com", "http://yahoo.com"]; var open_trigger = document.getElementById('open-all'); addListener(open_trigger, "click", function() { for(var i = 0; i < links.length; i ++) { win

Categories : Javascript

Javascript search through links
Because of same-origin policy and other challenges, this is not presently possible to do solely on the browser. However, there are server-side JavaScript projects using node.js that make this relatively straight-forward to do on a server or on your desktop (but not on your browser). Because it's nodejs, you can use the same kind of JavaScript (even jquery selectors) as you would in the browser. One nice example is node.io, although it's primarily built for use on Linux or OSX: https://github.com/chriso/node.io For a more WIndows-friendly approach, you could use nodejs along with Request (https://github.com/mikeal/request) and Cheerio, or else jsdom. There are a number of tutorials out there that use this approach (the first tutorial even extracts a list of URLs from a page): http://

Categories : Javascript

Sort links with javascript?
You're sorting by whatever is between <li> and </li>, which includes the URLs, not just the names. So if the URLs don't sort similarly to the names, the results will be out of order. In your case, you're sorting by the ID numbers in the URLs. A simple way to solve this is to put the names in the anchor elements, e.g. <li><a data-name="Peter" href="tumblr.com/post/57781372261">Peter</a></li> <li><a data-name="Mary" href="tumblr.com/post/57783141055">Mary</a></li> <li><a data-name="Paul" href="tumblr.com/post/57781372261">Paul</a></li> Putting the data-name attribute before the href attribute should make it take precedence. Actually, I'm not totally sure this will work. The innerHTML property

Categories : Javascript

Firefox Specific CSS Causing Multiple Errors in Visual Studio
I found a few possible solutions - although I'm not extremely familiar with the @-moz-document selector, so I'm not sure if these will do the exact same thing. This link (http://perishablepress.com/css-hacks-for-different-versions-of-firefox/) or this (http://css-tricks.com/snippets/css/css-hacks-targeting-firefox/) may be some help. /* Target Firefox 1.5 and newer [!] */ .selector, x:-moz-any-link, x:only-child { color: red; } /* Target all Firefox */ #selector[id=selector] { color: red; } /* Target all Firefox */ @-moz-document url-prefix() { .selector { color: red; } } /* Target all Gecko (includes Firefox) */ *>.selector { color: red; } Good luck with your issue!

Categories : CSS

PHP - require_once seems to be including files multiple times and causing errors
Put the following at the top of your included class file: if( class_exists( "<yourclassname>")) { throw new Exception("Class already defined"); } You will now receive a clear error message where the class is re-called.

Categories : PHP

C++ multiple classes inheriting from a base class causing issues
You have the animal.h defined as #ifndef ANIMAL class Animal { should be #ifndef ANIMAL #define ANIMAL class Animal { so that animal.h is not included multiple times. Also for consistency, have all your headers have a include guard. So dog and chicken need it. Unless you really need it #ifndef ANIMAL_H #include "../animal.h" #endif should simply be #include "../animal.h" because the former construct requires the define exactly match which in your cause is already not matching. animal.h defines ANIMAL or at least tries to but where you include is you are checking for ANIMAL_H

Categories : C++

#! causing routing issues using Angular/Rails with multiple layouts
Alright, so after testing lots of tweaks on both the client and server side, I ended up using the following solution. Basically, I just stopped exposing Angular to multiple layouts and dealt with that in Rails. Of course, this does put a limitation on users. The app is divided into two main sections: dashboard and authentication. So in the backend, we restrict the users from accessing any authentication pages if they're logged in, and obviously dashboard pages can only be accessed if the user is authenticated. The root of the problem was that Rails had no way of knowing which layout to serve, if a layout should be served at all. We used the cookies to differentiate the authenticated and unauthenticated users. If the cookie is set, and it passes the authenticity testing, then the dashboa

Categories : Ruby On Rails

unwanted javascript being generated on my template causing HTML warning
That doesnt look like its a part of your code, looks like bitdefender injecting html into your browser. http://forum.bitdefender.com/index.php?showtopic=33381

Categories : Javascript

Upload Image causing issue with unobtrusive javascript validation
Solved it by adding a custom script for that error function readURL(input) { var fileExtension = ['jpeg', 'jpg', 'png']; if ($.inArray($(input).val().split('.').pop().toLowerCase(), fileExtension) == -1) { alert('@resourceFactory.GetLocalizedValue(PhraseConstants.InvalidFileType)'); location.reload(); return false; } if (input.files) { if (input.files[0] && input.files[0].size <= GetFileSize()) { var reader = new FileReader(); reader.onload = function (e) { $('#fileToUpload') .attr('src', e.target.result) .width(90) .height(90); };

Categories : Jquery

Why is facebook javascript login code causing endless loop?
If the user arrives to your app "connected" then he/she has already passed through your app authorization and supplied the necessary permissions. See this page https://developers.facebook.com/docs/reference/javascript/FB.getLoginStatus/ FB.getLoginStatus allows you to determine if a user is logged in to Facebook and has authenticated your app. There are three possible states for a user: the user is logged into Facebook and has authenticated your application (connected) the user is logged into Facebook but has not authenticated your application (not_authorized) the user is not logged into Facebook at this time and so we don't know if they've authenticated your application or not (unknown) CBroe is right, you want to monitor the response you get from each call, FB.Ev

Categories : Facebook

tag results in multiple links sent to browser
When I inspected using Firefox, it turns out that you are not closing the <a> tag, and may be thats the culprit there. And you CANNOT self-close an a tag So it should be <p>&copy; @DateTime.Now.Year - BizTalkers ltd <a href="~/home/terms">Terms & Conditions</a> <-- Here </p>

Categories : HTML

Adding multiple links to an SVG object
Your base <svg> tag needs to have the following namespace attributes. You presumably have the former but not the latter <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">

Categories : HTML

How do I add links to this javascript image rotator?
UPDATED ANSWER: Please use this code instead. I've re-written my original answer, because there were a few problems with it. Replace the entire Dreamweaver inserted code with this: function MM_preloadImages() { //v3.0 var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array(); var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++) if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i]; } } } function MM_swapImgRestore() { //v3.0 var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc; } function MM_findObj(n, d) { //v4.01 var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&

Categories : Javascript

Can javascript pick up inbound links
You can use document referrer for this. document.referrer https://developer.mozilla.org/en-US/docs/Web/API/document.referrer

Categories : Javascript

Get value of HREF for links within a certain Class in Javascript
Use Element.attributes instead of Element.innerHTML. With your HTML you also need to use an inner loop to get <a> children of .r elements: var domains = document.getElementsByClassName('r'); for(var i = 0; i < domains.length; i++){ var anchors = domains.getElementsByTagName('a'); for (var j = 0; j < anchors.length; j++) { alert(anchors[j].attributes.href); } } or you could switch to Element.querySelectorAll() for a nicer querying API: var anchors = document.querySelectorAll('.r > a'); for (var i = 0; i < anchors.length; i++) { alert(anchors[i].attributes.href); } Note that I reused the domains variable since there's no reason to keep re-querying the DOM at every loop iteration.

Categories : Javascript

Opening links in other windows with Javascript
I have no idea what the "ribbon screen" is but your code has a lot of problems. First, being if you are using document.write() in <header> the outcome is not going to be visible and it's overall bad practice. Second problem is this is completely wrong document.write("<p>",txt,"</p><br />"); the correct code would be document.write("<p>"+txt+"</p><br />"); Third, is you can write this whole thing as just one short line: <button type="button" onclick="window.open("test.html")">Run code</button> Hope this helps, Cheers

Categories : Javascript

JavaScript all links on a page with regex
Newer browsers: var links = document.querySelectorAll('a[href^="/item/"]'); Older browsers: var links = []; var elements = document.getElementsByTagName('a'); for (var i = 0; i < elements.length; i++) { var a = elements[i]; if (a.getAttribute('href').indexOf('/item/') === 0) { links.push(a); } }

Categories : Javascript



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