w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Chrome send data from background page to browser action
One thing you need to remember is that popup pages don't live while the popup is closed (unlike background pages). That means that you can't just transfer the data to the popup page since it doesn't exist anywhere at all time. Instead, whenever the popup is opened, the first thing you need to do is request the info from the background page and display it however you want. In your background page, when you receive the data for the current domain, you should save it somewhere: that could be in localStorage, or sessionStorage, or chrome.storage (check the documentation to see which one would make more sense in your use-case). You would want to save it indexed on the domain most likely, so that you can have the info saved from all the open tabs if needed. Then whenever the popup is open, sen

Categories : Google Chrome

How to force to open a web page in external browser even if Popup Browser is enabled in Samsung Galaxy Note II
I don't understand your problem clearly but may this help you: Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse((String) i.getExtras().get("url"))); startActivity(browserIntent); where "url" is the URL to which you want to go in your browser. And i is an INTENT that holds the "url" from another activity. Can this help you?

Categories : Android

Canvas breaks through page loads + cookies until quitting browser on windows chrome only
The answer is a bug in the current windows chrome caused by hardware acceleration. https://code.google.com/p/chromium/issues/detail?id=281738#makechanges

Categories : Javascript

Get chrome browser title using c#
You must get a list of processes. Iterate through the list and only where name is "chrome". This will allow You to get all titles. Because if You have more then one chrome process , Your call will give You only one, because You call it only once. Which it returns is perhaps another question. In Your case it is the last.

Categories : C#

Livereload on android devices (chrome browser mainly)
If you use grunt-contrib-watch it should work out of the box. I've been doing it with my phone and some website development and it worked just fine most of the time.

Categories : Javascript

How to change and blink the title of the browser when the user goes to other tab or minimizes the browser?
For blinking the title: var title = document.title; var intv = window.setInterval(function () { document.title = document.title === '' ? title : ''; }, 500); // call this to stop the blinking function stopBlink() { window.clearInterval(intv); document.title = title; } As for doing it on tab switch or minimize, maybe running the code on window.onblur would work but I'm guessing it can't be done.

Categories : Javascript

Sorting DOM elements does not work propperly on mobile devices(android browser, chrome, safari)
I found a solution to the problem. $('div#mainFrame div.element-container').sort(function(a, b) { return parseInt($(b).data('price')) - parseInt($(a).data('price')); }) .appendTo('div#mainFrame'); The reason for this is that the sort expects a number, not a boolean return value.

Categories : Javascript

Technique to enable smooth page changing and prevent the browser redrawing for each page load
Well, although ASP.NET implements AJAX, and partial change of pages (through updatepanels for example) there's always a postback to the server with everything you do in .NET. Basically, there's always that "blank screen", but you probably don't see it in some cases, when the server answers quickly or you browser treats the HTML quicker for any reason. The only possibility I know to avoid full postbacks is to get out of the .NET logic and do AJAX request yourself by writing client code only. But this possibly comes with other problems (like the controls you may add this way not being "known" by your server code, for example).

Categories : HTML

Does the IE 10 browser have a shorter internal timeout than the Chrome browser?
Relying on these kinds of wait periods is unwise, because they can change with each new version. Why not have one call start the compression and have the browser poll the server after every 15s (or whate ever value) to see if compression is complete. When compression is complete then begin streaming. This pattern is quite easy to implement in JavaScript and on ASP.NET as well.

Categories : Asp Net

How to detect page title change in Google Chrome from an extension?
Create an event page. Create a content script that gets injected into a webpage when a webpage loads. Within the content script, use setInterval to poll the page to see if window.document.title changes. If the title has changed, use chrome.runtime.sendMessage to send a message to your event page. On your event page, listen for messages with chrome.runtime.onMessage and play a sound.

Categories : Javascript

Cannot view PHP page in browser
Once you get into the server through terminal, I modified this file httpd.conf by terminal command "sudo vi /etc/httpd/conf/httpd.conf" by uncommenting VirtualHost in the last few lines of the document (it is a really long document). Under VirtualHost I also uncommented the DocumentRoot and changed its field to /var/www/html/ Now I can access this php file from the web browser by this url "myPublicDNSFromElasticIP"+/myPHPfileName. (YOU have to transfer your php file to /var/www/html/HERE in order to display it in the web or gain access from your mobile applications. You can do this by scp command in terminal) You need to make a new PublicDNS by going into Elastic IP in the amazon Web EC2 console. so this myPublicDNSFromElasticIP is that new Public DNS from Elastic IP. Also after you mod

Categories : Amazon

how to redirect the page but not change browser's url?
Yes. X-Frame option is set if the website doesn't want u to run it in a frame on another domain. Its safe if you want to only run it on your sites. The sites must not have this header or the browser won't allow it to be loaded

Categories : HTML

Cannot get browser width when initialize page
// pure JavaScript var viewportWidth = document.documentElement.clientWidth // jQuery var viewportWidth = $(window).width() Check the following documentation for more information http://responsejs.com/labs/dimensions/

Categories : Javascript

JSP page not discovering assets when ran in browser
Try something like this: <link rel="stylesheet" type="text/css" href="<s:url value='/styles/style.css'/>" /> This will generate the correct url taking into account the deployment path.

Categories : Java

Page Redirection on Browser Refresh in Asp.Net
The following code snippet detects 'Refresh' in page_load function bool IsPageRefresh = false; protected void Page_Load(object sender, EventArgs e) { //this section of code checks if the page postback is due to genuine submit by user or by pressing "refresh" if (!IsPostBack) { ViewState["ViewStateId"] = System.Guid.NewGuid().ToString(); Session["SessionId"] = ViewState["ViewStateId"].ToString(); } else { if (ViewState["ViewStateId"].ToString() != Session["SessionId"].ToString()) { IsPageRefresh = true; } Session["SessionId"] = System.Guid.NewGuid().ToString(); ViewState["ViewStateId"] = Session["SessionId"].ToString(); }

Categories : C#

Set contents of page according to browser resolution
Is this what you need? <div class="container"> <div class="captcha"></div> <div class="qrcode"></div> </div> .captcha{ float:left; width:200px; height:100px; background:#123; } .qrcode{ float:left; width:200px; height:100px; background:#456; } DEMO: http://jsfiddle.net/fWAg5/ Capta and qrcode div display inline where there's enough space and stack vertically if space isnt sufficient. But if this something you'd like to do for different resolutions, I'd suggest looking into media queries!

Categories : C#

Page renders differently on refresh within same browser
I believe the issue is tied to floats and the slideshow javascript. Whenever I triggered the layout bug on the live site, it was accompanied by the first slide not rendering correctly. This would cause <div id="r1"> to have a height of 0 which in turn seems to aggravate the afore mentioned float bug. There seems to be some tension between the <ul> which is floated and the <a> which is not. This is the solution that worked for me: In index.html add a class (or ID if you prefer) to allow yourself to target the link within the CSS. In this example I have simply given it a class of logo: <a class="logo" href="index.html"> <img src="images/Calibrus_logo.png" alt="logo" border="0"> </a> Then, in your CSS: // target the link using your chosen selector

Categories : CSS

Changing Browser url when paritial page is loading with id? is this possible?
@Html.ActionLink((string)Item.Res_NA, "ResourceDetails", "Resources", new { id = Item.Id }, new { @class = "detail" }) Or <a href='ResourceDetails/@Item.Id'>@Item.Res_NA</a> this redirect to your resource and your browser url look like this Resources/ResorcesDetails/id

Categories : C#

C# .net WebBrowser does not display page (Browser is not up to date)
Your application needs to emulate a different version of IE. This is done via the registry. internal class Helper { public static void SetBrowserEmulation( string programName, IE browserVersion) { if (string.IsNullOrEmpty(programName)) { programName = AppDomain.CurrentDomain.FriendlyName; RegistryKey regKey = Registry.CurrentUser.OpenSubKey( "Software\Microsoft\Internet Explorer\Main" + "\FeatureControl\FEATURE_BROWSER_EMULATION", true); if (regKey != null) { try { regKey.SetValue(programName, browserVersion, RegistryValueKind.DWord); } catch (Exception ex)

Categories : C#

MVC page refresh on browser back button
just in case anyone is looking, for the button to be visible some other .cshtml page was handling it based on some event response, using a script that removed the "invisible" from its css. So, on hitting the browser back button the event would not be called and hence the button was still invisible. I needed to make the button visible. The only workaround I found was this -- a hidden check included in the target page after hitting the browser back button. <script type="text/javascript"> onload = function () { var e = document.getElementById("reloaded"); if (e.value == "no") e.value = "yes"; else { e.value = "no"; location.reload(); } } </script>

Categories : Asp Net Mvc

Enter in to a particular page through the browser after I login to the system
I know about basic jsp/servlet model. Write a Servlet filter which will intercept every request from the brwoser, there check is the user is logged in or not. If logged in your normal flow will continue but if not then redirect to the login page. When you are redirecting to the login page, make sure you send the url hit by browser in the response. Now in client side hold the url send in response and after eneter credentials in login page when user will submit the record send the url (Hold in the client side from response) in the request and after successful login use Servelet Request dispatcher to land in the url. I am not sure but spring-security has this feature and struts 2. But implementation process can be share by others who are familiar on this technologies. But in struts 1 it's

Categories : Spring

cURL returns 404 while the page is found in browser
I quickly checked the said page with LiveHeaders enabled and I noticed bunch of cookies set. I suspect that, since it's not "normal" url, you need to hand those cookies while being redirected otherwise you end being kicked out with 404. Use CURLOPT_COOKIEJAR with your cURL instance at start. See: http://php.net/manual/pl/function.curl-setopt.php

Categories : PHP

How to reload a php page automatically from server and not from browser
Run the PHP script from a command line with your CRON or Windows Task Scheduler. Create a new Task, and execute that task as often as you like without a user or a browser. C:phpphp.exe -f C:My_FolderMy_Script.php

Categories : PHP

how to minimize a web browser from on an buttton click from a jsp page?
This can be done using purely client side code, e.g. javascript. Take a look on the following post for details: http://www.htmlgoodies.com/beyond/javascript/article.php/3471151/MinimizeMaximize-a-Browser-Window.htm Or google "minimize browser window using javascript". Since this question is not about java but about javascript I am fixing the tagging of this question.

Categories : Java

reload page on mobile browser javascript
This is a pretty crazy idea to reload the page all the time in full, your users will hate you. If you are going to do it, just do partial updates to the page. Anyway, to answer the question, check the PageVisibility API(Chrome) or the specs. This event fires when the page is visible to the user either by bringing the app into focus or by changing tabs.

Categories : Javascript

How do I make website page adjust to the browser window?
You can use the standard resize DOM event. Then at window.onresize = function(event) { ... } you can adjust the elmenets positions and size accordingly. However In general, you could avoid fixed sizes and provide percentage values for your DOM elements, in order for them to resize automatically under all screen sizes and ratios. For example, if your page has a vertical orientation, change width to 100% and have your #main element always align the center of the screen: #main{ width:650px; /*or 70% */ height:200px; margin-left:auto; margin-right:auto; text-align:center; margin-top:200px; } Here is an example with the code :http://jsfiddle.net/TZGXf/4/ Here is a full screen: http://jsfiddle.net/TZGXf/4/embedded/result/

Categories : HTML

Set Browser Mode to IE 8 automatically when html page gets loaded
You need to add a meta tag to your document head specifying IE8 compatibility mode. <meta http-equiv="x-ua-compatible" content="IE=8" >

Categories : Internet Explorer

Keep cursor within the web page when tabbing, prevent it from going outside to browser address bar
You can use the OnBlur event, and then set focus back to your text box. See this question and answer: How to re-focus to a text field when focus is lost on a HTML form?

Categories : Jquery

How can I make my web page look good in browser windows of different sizes?
Ok here is what I usally do: Whenever I want to create a website that doesn't fill 100% of the page I create a wrapper around ALL the content, like you did. You can either do this with fixed values or with % values. In case you want to use % values it's often smart to use min-width or max-width for your wrapper. This way you only need to define fixed values once and all the inner content can be defined by using %. This helps especially if you want to resize the whole content later on, if your realize that it might look better with a little bit more width. Height values rarely use % values, only use % values for the height if you are using a fixed height for your container. If you want to create different layouts for different screen resolutions you can always have a look at the @media ta

Categories : HTML

Triggering a DB call on browser leaving current page?
Sending a "keep-alive signal" might be an option. Something along these lines on the frontend side, combined with session cookies. setInterval(function() { var img = new Image(); var src = "http://examle.com/keepalive.gif?cachebuster=" + Math.ceil(Math.random() * 10000 ); }, 1000);

Categories : Javascript

How can I include a JavaScript file on a web page only if the browser is IE 7 or earlier?
Use conditional comments http://www.quirksmode.org/css/condcom.html <!--[if lt IE 8]> <script src="yourscript.js"></script> <![endif]-->

Categories : Javascript

Ajax page load in div halts browser even if it is async?
No, asynchronous ajax requests like that don't hold up the browser. The problem is elsewhere, in code you haven't shown. The code you've shown will correctly do an async request. Speculating on possible issues with what we can't see: If the link has an href, you're not cancelling the default action, so it could be loading the page. You can prevent the default by calling evt.preventDefault() within your click handler, or by doing return false; at the end of it (which does that and also stops propagation). If you have other code elsewhere setting async: false as the default, perhaps your ajaxSetup changing it back isn't getting called.

Categories : Javascript

Express request routes twice on browser page load
This was confusing as all over the internet this issue is solved by rectifying the favicon thing. But this was stupid jquery $.get() call which was firing blank (it was calling the same url as the page url) when the variable was not present. I wrapped the ajax call and problem solved.

Categories : Javascript

How style div so that it scrolls down with page - stuck to the RIGHT side of browser
Have you tried floating it? #flyingDIV { float: right; } Whether this works or not depends on what else you have on your page surrounding the div you're trying to aligh to the right.

Categories : HTML

How can I prevent the browser from scrolling on top of the page when clicking the checkbox?
The problem is this rule: #ck-button label input { position:absolute; top:-20px; } When you click on a label the browser tries to focus the related input. In your case the checkbox element is lying at the top of the page, even on the outside of the viewport. So Firefox tries to scroll there. I think you can solve it like this by adding: #ck-button label { display: block; position: relative; overflow: hidden; } Demo Try before buy Edit As I came back to this answer today and in regard of Heisenberg's: He points out a problem that can occur by using extreme values and adds another solution which basically has the same quirk as mine. To avoid those possible quirks, here's another possible solution by simply hidding the input. The functionality is not affected, a

Categories : HTML

how to set html page as popup in browser action in crossrider
Usually, appAPI.browserAction.setPopup works well in IE and I am not aware of any issues. In general, you must make sure that the resources referenced (icon128.pnf, index.html, ...) are uploaded to the extension's resources folder and that the height and width mandatory properties are specified when calling the setPopup method. Also, I'm not quite clear as to the significance of your code in the extension.js file, but if the intention is for them to be applied to the popup content, then you must define them in a crossriderMain function within your index.html file, as follows: index.html: <!DOCTYPE html> <html> <head> <!-- This meta tag is relevant only for IE --> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <script type="text/javascript"> /

Categories : Jquery

How to link a page to back button in browser using javascript?
you can to this by this method onClick="history.go(-1);return true; <input type="button" value="Back" onClick="history.go(-1);return true;"> or <script> function goBack() { window.history.back() } </script> <input type="button" value="Back" onclick="goBack()">

Categories : Javascript

How to stop browser forward button to redirect to a page?
If you can support IE10+ you can use HTML5 History API. For example window.history.replaceState() method.

Categories : Javascript

Getting the browser to show IFrame or use HttpOnly cookie on different page
Can you make a wraps that iframe, then use the hastag trick ("http://game.com#divwrapper") to navigate to that div. This will scroll the page down

Categories : C#

Page that works in Android Browser doesn't work in WebView
I have realized you are using JQuery in your web page, and the link that "data-href" is tryin to open is a .json file. for example "MAKE" option : <input type="hidden" name="make" value="" data-href="http://m.bridgestonetire.com/bin/fst/api/vehicle/1/make.json" />

Categories : Javascript



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