Search Results

Search found 15196 results on 608 pages for 'browser detection'.

Page 12/608 | < Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >

  • Collision Detection probelm (intersection with plane)

    - by Demi
    I'm doing a scene using openGL (a house). I want to do some collision detection, mainly with the walls in the house. I have tried the following code: // a plane is represented with a normal and a position in space Vector planeNor(0,0,1); Vector position(0,0,-10); Plane p(planeNor,position); Vector vel(0,0,-1); double lamda; // this is the intersection point Vector pNormal; // the normal of the intersection // this method is from Nehe's Lesson 30 coll= p.TestIntersionPlane(vel,Z,lamda,pNormal); glPushMatrix(); glBegin(GL_QUADS); if(coll) glColor3f(1,0,0); else glColor3f(1,1,1); glVertex3d(0,0,-10); glVertex3d(3,0,-10); glVertex3d(3,3,-10); glVertex3d(0,3,-10); glEnd(); glPopMatrix(); Nehe's method: #define EPSILON 1.0e-8 #define ZERO EPSILON bool Plane::TestIntersionPlane(const Vector3 & position,const Vector3 & direction, double& lamda, Vector3 & pNormal) { double DotProduct=direction.scalarProduct(normal); // Dot Product Between Plane Normal And Ray Direction double l2; // Determine If Ray Parallel To Plane if ((DotProduct<ZERO)&&(DotProduct>-ZERO)) return false; l2=(normal.scalarProduct(position))/DotProduct; // Find Distance To Collision Point if (l2<-ZERO) // Test If Collision Behind Start return false; pNormal= normal; lamda=l2; return true; } Z is initially (0,0,0) and every time I move the camera towards the plane, I reduce its z component by 0.1 (i.e. Z.z-=0.1 ). I know that the problem is with the vel vector, but I can't figure out what the right value should be. Can anyone please help me?

    Read the article

  • Block all third party domains from web pages

    - by wizlb
    When I'm browsing the web, I'd like to not be tracked by any third party services like Facebook or Google. For instance, if I visit somepage.com I don't want my browser requesting things from facebook.com unless I allow it. However, if I visit facebook.com, Facebook still works. Does anyone know of a Chrome or Firefox extension that will allow me to do this? AdBlock in Chrome doesn't seem to work because it just hides the web page elements, it doesn't stop the browser from downloading them. I imagine that some kind of proxy/browser extension hybrid would be the best. Any suggestions? Thank you.

    Read the article

  • Make browser to go back by reloading page 1st and then scrolling it back again too

    - by Marco Demaio
    EXPLAINING WHAT I'M TRYING TO SOLVE: I have a webpage (file_list.php) showing a list of files, and next to each file there is a button to delete it. When user press the DELETE button close to a certain file name, the browser goes to a script called delete_file.php that deletes the file and then it tells browser to go back to the file_list.php delete_file.php uses a simple header("Location: file_list.php”); to go back to file_list.php When browser goes back to file_list.php it reloads the page, but it DOES NOT scroll it back again to where the user was before. So let's say the user scrolled the files list and deleted the last file, when the browser shows again the page file_list.php it won't be scrolled to the bottom of the page again. THE WORKAROUND I CAME OUT WITH: I found a strange way to work around this, basically instead of using header("Location: file_list.php”); in delete_file.php I simply use a javascript call window.history.go(-1). This workaround works perfectly when user is in session (simply using PHP session_start function): the browser RELOADS the file_list.php page and then scrolls it also bask to where it was before. But if the user is NOT in session the browser scrolls the page but IT DOES NOT RELOAD IT before, so the user would still see the file he deleted in the file list. THE QUESTIONS Do you know how to reproduce the behavior of the browser when goes back being in session even if we are not in session? Do you know a way out of this, even another way of solving this matter? Thanks! *I know I could use AJAX to delete the file so I would not have to go every time to delete_file.php, but this is not the answer*.

    Read the article

  • Fraud and Anomaly Detection using Oracle Data Mining YouTube-like Video

    - by chberger
    I've created and recorded another YouTube-like presentation and "live" demos of Oracle Advanced Analytics Option, this time focusing on Fraud and Anomaly Detection using Oracle Data Mining.  [Note:  It is a large MP4 file that will open and play in place.  The sound quality is weak so you may need to turn up the volume.] Data is your most valuable asset. It represents the entire history of your organization and its interactions with your customers.  Predictive analytics leverages data to discover patterns, relationships and to help you even make informed predictions.   Oracle Data Mining (ODM) automatically discovers relationships hidden in data.  Predictive models and insights discovered with ODM address business problems such as:  predicting customer behavior, detecting fraud, analyzing market baskets, profiling and loyalty.  Oracle Data Mining, part of the Oracle Advanced Analytics (OAA) Option to the Oracle Database EE, embeds 12 high performance data mining algorithms in the SQL kernel of the Oracle Database. This eliminates data movement, delivers scalability and maintains security.  But, how do you find these very important needles or possibly fraudulent transactions and huge haystacks of data? Oracle Data Mining’s 1 Class Support Vector Machine algorithm is specifically designed to identify rare or anomalous records.  Oracle Data Mining's 1-Class SVM anomaly detection algorithm trains on what it believes to be considered “normal” records, build a descriptive and predictive model which can then be used to flags records that, on a multi-dimensional basis, appear to not fit in--or be different.  Combined with clustering techniques to sort transactions into more homogeneous sub-populations for more focused anomaly detection analysis and Oracle Business Intelligence, Enterprise Applications and/or real-time environments to "deploy" fraud detection, Oracle Data Mining delivers a powerful advanced analytical platform for solving important problems.  With OAA/ODM you can find suspicious expense report submissions, flag non-compliant tax submissions, fight fraud in healthcare claims and save huge amounts of money in fraudulent claims  and abuse.   This presentation and several brief demos will show Oracle Data Mining's fraud and anomaly detection capabilities.  

    Read the article

  • Technique to Display Multiple Browser Windows Tiled at Same time?

    - by Kendor
    I have a separate monitor that I use for Toodledo (a web-based task managment app), in which I like to display various views (Next Action Status, Waiting Status, Planning Status, and Overdue Due-Date items). I've been playing around with some add-ons on Firefox that allow you to split the browser, but they are cumbersome. I'm now trying Chrome, and opening 4 different browser windows that I've tiled on the screen in quadrants (I use the Compiz grid applet for this). This is not ideal as each browser replicates the URL bar and the tab, and I don't have opening ths windows automated upon restart. Chrome is great in managing screen real estate, but this is not ideal. In Firefox I tried various extension to hide interface elements, but it was very clunky... Am wondering whether anyyone has tried to do similar with TD, and how they achieved what I'm going after? Am wondering whether someone has a good technique for accomplishing what I'm looking for?

    Read the article

  • Could JQuery and similar tools be built into the browser install?

    - by Ozz
    After reading another question about JQuery and CDN's, is it feasible for tools like JQuery to "come with" the browser, thus reducing/eliminating the need for the first download from a CDN, or from your own host server. JQuery files specifically are pretty small, so you could easily have a number (all?) of the different versions as part of a browser install. Now fair enough, this would increase install footprint, download time for the browser itself. Then sites could check "local" first, before CDN (which then caches), before finally defaulting to downloading from the website server itself. If this is feasible, has it been done, and if not, why hasn't it be done?

    Read the article

  • Asp.Net: Open a second browser window with new session id

    - by Daniel Brink
    Right google isn't helping me on this one. I need to open a second browser window or tab, but it must have a different session id. Opening the new browser window from my asp.net page is easy, but then it shares the same cookie and thus session ID with the original. So how can I do this? I need the original browser window to keep its cookies and session and the new browser window to have a new session.

    Read the article

  • How to track url redirects in browser?

    - by Prashant
    I have typed http://example.com/load/ in my browser window and pressed "ENTER" key. Now on press of enter this website redirects me to http://example.com/load/1/ and then http://example.com/load/2/ and then I finally landed on this url http://example.com/load/3/. These redirection happens at website end, I am not aware where I am going. But I finally landed on this url: http://example.com/load/3/ I want to track where all my browser gone all urls, I am not seeing it in my history as its redirect at website end. Is there any firefox addon or some toll which can track this for me? I am not sure where to ask this question, so asking it here, moderators please check!

    Read the article

  • Use Web Browser (Google Chrome or Firefox) to Open Web Sites from a List in File

    - by MMA
    I have a (text) file containing a list of web site addresses. I know that I can open the file in an editor and then copy-paste the addresses to the browser address bar. That means, if I have ten addresses in that file, I will need ten copy-paste operations, which must be tedious. But is there a way to ask the browser (preferably Google Chrome or Firefox) to open all of them in one go in different tabs? I am using Ubuntu, if that is related in any way to the solution you provide.

    Read the article

  • Browser with its own hosts file?

    - by Mystere Man
    I have a number of staging and test servers that I need to constantly modify my hosts file to access (they depend on the domain name, so i have to change the hosts file to get them to work). I find this annoying. I'd like to setup a portable browser of some kind for each kind of site i want to work with. Is there any version of any graphical web browser (including browsers based on the rendering engines of other browsers) that will do this? This way i can simply launch the instance that's already configured to work with staging if i want to test staging. Any ideas?

    Read the article

  • Could not open IPV6 addr on web browser

    - by vito
    I have ipv6 address fe80::21f:a4ff:fe91:2e44%4. This is the address of modem/router. I am unable to open this address in browser to view the web configuration. I am able to telnet to fe80::21f:a4ff:fe91:2e44%4, view the console UI & can do settings. I can also open 192.168.1.1(IPv4 address of modem/router) in browser. I tried [fe80::21f:a4ff:fe91:2e44] in all browsers like IE, Firefox & Chrome. It was not possible.

    Read the article

  • Which web browser support running multiple sessions simultaneously?

    - by leonbnu
    basically, I want to group my tabs by categories and then split them to different sessios(winows). For example, I can have one windows which contains all the tabs that are work related, and some other windows that are for news, everyday use, hobbies, entertainment, etc. So I can load these sessions/windows independently whenever I want. More importanly, I need the browser to be able to manage these sessions separately, for example, when I close one window(session), it should be able to autosave it without affecting any other sessions. I think this requirement is quite simple. But somehow, neither firefox(with session manager addon) nor opera support this. so which browser actually supports this?

    Read the article

  • How to remove the dlinksearch browser search hijack

    - by Bish
    Hi Gang, For the last few weeks all the machines on my home network are having the same problem whilst browsing the internet. When the user enters an invalid URL in the browser address bar, instead of the default browser behaviour, the request is sent to http://www1.dlinksearch.com/. As far as I can tell this is all machines and all browsers. It is so consistent I am wondering whether it has anything to do with our router. We use a DLink DIR-655 router so maybe the clue is in the name :) Anyhow, I cannot figure out how to disable/remove the offending behaviour. I've checked hosts files, spyware, AV etc. etc. Anybody have any ideas? Paul P.S. Apologies if this is not the right place to ask this type of question. I'm a bit stuck

    Read the article

  • Best memory-efficient web browser for Ubuntu?

    - by Steve K
    I've installed Ubuntu 10.10 on an old laptop with only 756 MB of RAM, Pentium M 1.6 processor. I'm using Google Chrome 11.0 (dev channel) for web browsing, and it appears to be using up most of my memory and processor time. Does anyone know of a better browser than Chrome on Ubuntu, for an older computer like mine? I'm new to Ubuntu, so there may also be tweaks I can make to my existing system to have it perform better. But right now it's pretty slow when I've got ~5-10 tabs open. Related question: memory-efficient web-browser

    Read the article

  • Logging full network connection like in browser

    - by pokemarine
    Can I set my browser or download a special application to log/download everything that is going through network while browsing a site? When I open a website in Firefox, it downloads the files to temporary folders, but I need everything, and by everything I mean full Ajax request logging, image downloading...etc Every file that is downloaded while browsing sites (and not temporary, I need them later, so It should log and categorize it somehow). Otherwise: I want to automatically save everything you can see in the browser's network tab (after pressing F12) and not just the response, also need the information about what it sent and what it got back.

    Read the article

  • Importing Bookmarks from a Text File (to any browser/website)

    - by Gary Oldfaber
    I have dozens of text files containing around 60 url's each, accumulated over years of browsing on multiple computers. I wish to import these into any browser, to allow me to then use cross-browser importing. My ultimate goal is to then import the bookmarks to somewhere like delicious, which will automatically tag the links, allowing me to sort each page by subject. The closest I've managed to find is: Import bookmarks to firefox from txt file However while this plugin imports from a text file, it has no correlation with Firefox's bookmarks, and only allows you to export back to csv/txt files. I understand that the problem of importing from text files is that bookmarks need a Title, and so I wish to use a given pages existing title. I've been unable to find any such tool on the net.

    Read the article

  • How to Sync Any Browser’s Bookmarks With Your iPad or iPhone

    - by Chris Hoffman
    Apple makes it easy to synchronize bookmarks between the Safari browser on a Mac and the Safari browser on iOS, but you don’t have to use Safari — or a Mac — to sync your bookmarks back and forth. You can do this with any browser. Whether you’re using Chrome, Firefox, or even Internet Explorer, there’s a way to sync your browser bookmarks so you can access your same bookmarks on your iPad. Safari on a Mac Apple’s iCloud service is the officially supported way to sync data with your iPad or iPhone. It’s included on Macs, but Apple also offers similar iCloud bookmark syncing features for Windows. On a Mac, this should be enabled by default. To check whether it’s enabled, you can launch the System Preferences panel on your Mac, open the iCloud preferences panel, and ensure the Safari option is checked. If you’re using Safari on Windows — well, you shouldn’t be. Apple is no longer updating Safari for Windows. iCloud allows you to synchronize bookmarks between other browsers on your Windows system and Safari on your iOS device, so Safari isn’t necessary. Internet Explorer, Firefox, or Chrome via iCloud To get started, download Apple’s iCloud Control Panel application for Windows and install it. Launch the iCloud Control Panel and log in with the same iCloud account (Apple ID) you use on your iPad or iPhone. You’ll be able to enable Bookmark syncing with Internet Explorer, Firefox, or Chrome. Click the Options button to select the browser you want to synchronize bookmarks with. (Note that bookmarks are called “favorites” in Internet Explorer.) You’ll be able to access your synced bookmarks in the Safari browser on your iPad or iPhone, and they’ll sync back and forth automatically over the Internet. Google Chrome Sync Google Chrome also has its own built-in sync feature and Google provides an official Chrome app for iPad and iPhone. If you’re a Chrome user, you can set up Chrome Sync on your desktop version of Chrome — you should already have this enabled if you have logged into your Chrome browser. You can check if this Chrome Sync is enabled by opening Chrome’s settings screen and seeing whether you’re signed in. Click the Advanced sync settings button and ensure bookmark syncing is enabled. Once you have Chrome Sync set up, you can install the Chrome app from the App Store and sign in with the same Google account. Your bookmarks, as well as other data like your open browser tabs, will automatically sync. This can be a better solution because the Chrome browser is available for so many platforms and you gain the ability to synchronize other browser data, such as your open browser tabs, between your devices. Unfortunately, the Chrome browser is slower than Apple’s own Safari browser on iPad and iPhone because of the way Apple limits third-party browsers, so using it involves a trade-off. Manual Bookmark Sync in iTunes iTunes also allows you to sync bookmarks between your computer and your iPad or iPhone. It does this the old-fashioned way, by initiating a manual sync when your device is plugged in via USB. To access this option, connect your device to your computer, select the device in iTunes, and click the Info tab. This is the more outdated way of synchronizing your bookmarks. This feature may be useful if you want to create a one-time copy of your bookmarks from your PC, but it’s nowhere near ideal for regular syncing. You don’t have to use this feature, just as you really don’t have to use iTunes anymore. In fact, this option is unavailable if you’ve set up iCloud syncing in iTunes. After you set up bookmark syncing via iCloud or Chrome Sync, bookmarks will sync immediately after you save, remove, or edit them.     

    Read the article

  • How a "Collision System" should be implemented?

    - by nathan
    My game is written using a entity system approach using Artemis Framework. Right know my collision detection is called from the Movement System but i'm wondering if it's a proper way to do collision detection using such an approach. Right know i'm thinking of a new system dedicated to collision detection that would proceed all the solid entities to check if they are in collision with another one. I'm wondering if it's a correct way to handle collision detection with an entity system approach? Also, how should i implement this collision system? I though of an IntervalEntitySystem that would check every 200ms (this value is chosen regarding the Artemis documentation) if some entities are colliding. protected void processEntities(ImmutableBag<Entity> ib) { for (int i = 0; i < ib.size(); i++) { Entity e = ib.get(i); //check of collision with other entities here } }

    Read the article

  • Restrict the page to be browsed in the other browser with the same urls

    - by subash
    how to restrict the page to be browsed in the other browser with the same urls with out logging asp.net & c#.net. i followed the following steps for example: i am logging in to a page developed in asp.net & c#.net. i am viewing a page.Let it be admin page. i am copying the url of the admin page. i am opening another browser window and pasting the url. i was able to see the same admin page in the other browser. the question is how to restrict the opening of admin page in other browser,if they try to open admin page in another browser while user is currently viewing the admin page then it should be redirected to the login page? how could this be accomplished? is there any thing could be done with "login" control tool of the .net frame work?

    Read the article

  • Browser mode and document mode in IE9

    - by Ozzone
    I use the Developer Tools in IE9 to switch between IE7, 8 & 9 Browser Modes for testing markup & CSS. I use following combinations. IE7 Browser Mode + Document mode IE7 Standards IE8 Browser Mode + Document mode IE8 Standards IE9 Browser Mode + Document mode IE9 Standards But, if i use following combination, few design's position issues are occured. IE9 Browser Mode + IE7 Standards Is the above combination valid? or Does i need to change Document mode forcefully?

    Read the article

  • jQuery, ASP.NET, and Browser History

    - by Stephen Walther
    One objection that people always raise against Ajax applications concerns browser history. Because an Ajax application updates its content by performing sneaky Ajax postbacks, the browser backwards and forwards buttons don’t work as you would normally expect. In a normal, non-Ajax application, when you click the browser back button, you return to a previous state of the application. For example, if you are paging through a set of movie records, you might return to the previous page of records. In an Ajax application, on the other hand, the browser backwards and forwards buttons do not work as you would expect. If you navigate to the second page in a list of records and click the backwards button, you won’t return to the previous page. Most likely, you will end up navigating away from the application entirely (which is very unexpected and irritating). Bookmarking presents a similar problem. You cannot bookmark a particular page of records in an Ajax application because the address bar does not reflect the state of the application. The Ajax Solution There is a solution to both of these problems. To solve both of these problems, you must take matters into your own hands and take responsibility for saving and restoring your application state yourself. Furthermore, you must ensure that the address bar gets updated to reflect the state of your application. In this blog entry, I demonstrate how you can take advantage of a jQuery library named bbq that enables you to control browser history (and make your Ajax application bookmarkable) in a cross-browser compatible way. The JavaScript Libraries In this blog entry, I take advantage of the following four JavaScript files: jQuery-1.4.2.js – The jQuery library. Available from the Microsoft Ajax CDN at http://ajax.microsoft.com/ajax/jquery/jquery-1.4.2.js jquery.pager.js – Used to generate pager for navigating records. Available from http://plugins.jquery.com/project/Pager microtemplates.js – John Resig’s micro-templating library. Available from http://ejohn.org/blog/javascript-micro-templating/ jquery.ba-bbq.js – The Back Button and Query (BBQ) Library. Available from http://benalman.com/projects/jquery-bbq-plugin/ All of these libraries, with the exception of the Micro-templating library, are available under the MIT open-source license. The Ajax Application Let’s start by building a simple Ajax application that enables you to page through a set of movie database records, 3 records at a time. We’ll use my favorite database named MoviesDB. This database contains a Movies table that looks like this: We’ll create a data model for this database by taking advantage of the ADO.NET Entity Framework. The data model looks like this: Finally, we’ll expose the data to the universe with the help of a WCF Data Service named MovieService.svc. The code for the data service is contained in Listing 1. Listing 1 – MovieService.svc using System.Data.Services; using System.Data.Services.Common; namespace WebApplication1 { public class MovieService : DataService<MoviesDBEntities> { public static void InitializeService(DataServiceConfiguration config) { config.SetEntitySetAccessRule("Movies", EntitySetRights.AllRead); config.DataServiceBehavior.MaxProtocolVersion = DataServiceProtocolVersion.V2; } } } The WCF Data Service in Listing 1 exposes the movies so that you can query the movie database table with URLs that looks like this: http://localhost:2474/MovieService.svc/Movies -- Returns all movies http://localhost:2474/MovieService.svc/Movies?$top=5 – Returns 5 movies The HTML page in Listing 2 enables you to page through the set of movies retrieved from the WCF Data Service. Listing 2 – Original.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"> <head> <title>Movies with History</title> <link href="Design/Pager.css" rel="stylesheet" type="text/css" /> </head> <body> <h1>Page <span id="pageNumber"></span> of <span id="pageCount"></span></h1> <div id="pager"></div> <br style="clear:both" /><br /> <div id="moviesContainer"></div> <script src="http://ajax.microsoft.com/ajax/jquery/jquery-1.4.2.js" type="text/javascript"></script> <script src="App_Scripts/Microtemplates.js" type="text/javascript"></script> <script src="App_Scripts/jquery.pager.js" type="text/javascript"></script> <script type="text/javascript"> var pageSize = 3, pageIndex = 0; // Show initial page of movies showMovies(); function showMovies() { // Build OData query var query = "/MovieService.svc" // base URL + "/Movies" // top-level resource + "?$skip=" + pageIndex * pageSize // skip records + "&$top=" + pageSize // take records + " &$inlinecount=allpages"; // include total count of movies // Make call to WCF Data Service $.ajax({ dataType: "json", url: query, success: showMoviesComplete }); } function showMoviesComplete(result) { // unwrap results var movies = result["d"]["results"]; var movieCount = result["d"]["__count"] // Show movies using template var showMovie = tmpl("<li><%=Id%> - <%=Title %></li>"); var html = ""; for (var i = 0; i < movies.length; i++) { html += showMovie(movies[i]); } $("#moviesContainer").html(html); // show pager $("#pager").pager({ pagenumber: (pageIndex + 1), pagecount: Math.ceil(movieCount / pageSize), buttonClickCallback: selectPage }); // Update page number and page count $("#pageNumber").text(pageIndex + 1); $("#pageCount").text(movieCount); } function selectPage(pageNumber) { pageIndex = pageNumber - 1; showMovies(); } </script> </body> </html> The page in Listing 3 has the following three functions: showMovies() – Performs an Ajax call against the WCF Data Service to retrieve a page of movies. showMoviesComplete() – When the Ajax call completes successfully, this function displays the movies by using a template. This function also renders the pager user interface. selectPage() – When you select a particular page by clicking on a page number in the pager UI, this function updates the current page index and calls the showMovies() function. Figure 1 illustrates what the page looks like when it is opened in a browser. Figure 1 If you click the page numbers then the browser history is not updated. Clicking the browser forward and backwards buttons won’t move you back and forth in browser history. Furthermore, the address displayed in the address bar does not change when you navigate to different pages. You cannot bookmark any page except for the first page. Adding Browser History The Back Button and Query (bbq) library enables you to add support for browser history and bookmarking to a jQuery application. The bbq library supports two important methods: jQuery.bbq.pushState(object) – Adds state to browser history. jQuery.bbq.getState(key) – Gets state from browser history. The bbq library also supports one important event: hashchange – This event is raised when the part of an address after the hash # is changed. The page in Listing 3 demonstrates how to use the bbq library to add support for browser navigation and bookmarking to an Ajax page. Listing 3 – Default.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"> <head> <title>Movies with History</title> <link href="Design/Pager.css" rel="stylesheet" type="text/css" /> </head> <body> <h1>Page <span id="pageNumber"></span> of <span id="pageCount"></span></h1> <div id="pager"></div> <br style="clear:both" /><br /> <div id="moviesContainer"></div> <script src="http://ajax.microsoft.com/ajax/jquery/jquery-1.4.2.js" type="text/javascript"></script> <script src="App_Scripts/jquery.ba-bbq.js" type="text/javascript"></script> <script src="App_Scripts/Microtemplates.js" type="text/javascript"></script> <script src="App_Scripts/jquery.pager.js" type="text/javascript"></script> <script type="text/javascript"> var pageSize = 3, pageIndex = 0; $(window).bind('hashchange', function (e) { pageIndex = e.getState("pageIndex") || 0; pageIndex = parseInt(pageIndex); showMovies(); }); $(window).trigger('hashchange'); function showMovies() { // Build OData query var query = "/MovieService.svc" // base URL + "/Movies" // top-level resource + "?$skip=" + pageIndex * pageSize // skip records + "&$top=" + pageSize // take records +" &$inlinecount=allpages"; // include total count of movies // Make call to WCF Data Service $.ajax({ dataType: "json", url: query, success: showMoviesComplete }); } function showMoviesComplete(result) { // unwrap results var movies = result["d"]["results"]; var movieCount = result["d"]["__count"] // Show movies using template var showMovie = tmpl("<li><%=Id%> - <%=Title %></li>"); var html = ""; for (var i = 0; i < movies.length; i++) { html += showMovie(movies[i]); } $("#moviesContainer").html(html); // show pager $("#pager").pager({ pagenumber: (pageIndex + 1), pagecount: Math.ceil(movieCount / pageSize), buttonClickCallback: selectPage }); // Update page number and page count $("#pageNumber").text(pageIndex + 1); $("#pageCount").text(movieCount); } function selectPage(pageNumber) { pageIndex = pageNumber - 1; $.bbq.pushState({ pageIndex: pageIndex }); } </script> </body> </html> Notice the first chunk of JavaScript code in Listing 3: $(window).bind('hashchange', function (e) { pageIndex = e.getState("pageIndex") || 0; pageIndex = parseInt(pageIndex); showMovies(); }); $(window).trigger('hashchange'); When the hashchange event occurs, the current pageIndex is retrieved by calling the e.getState() method. The value is returned as a string and the value is cast to an integer by calling the JavaScript parseInt() function. Next, the showMovies() method is called to display the page of movies. The $(window).trigger() method is called to raise the hashchange event so that the initial page of records will be displayed. When you click a page number, the selectPage() method is invoked. This method adds the current page index to the address by calling the following method: $.bbq.pushState({ pageIndex: pageIndex }); For example, if you click on page number 2 then page index 1 is saved to the URL. The URL looks like this: Notice that when you click on page 2 then the browser address is updated to look like: /Default.htm#pageIndex=1 If you click on page 3 then the browser address is updated to look like: /Default.htm#pageIndex=2 Because the browser address is updated when you navigate to a new page number, the browser backwards and forwards button will work to navigate you backwards and forwards through the page numbers. When you click page 2, and click the backwards button, you will navigate back to page 1. Furthermore, you can bookmark a particular page of records. For example, if you bookmark the URL /Default.htm#pageIndex=1 then you will get the second page of records whenever you open the bookmark. Summary You should not avoid building Ajax applications because of worries concerning browser history or bookmarks. By taking advantage of a JavaScript library such as the bbq library, you can make your Ajax applications behave in exactly the same way as a normal web application.

    Read the article

  • Is there application which is fakes browser and allows to choose what real to use if url provided

    - by Dzmitry Lahoda
    Is there any Application for Windows to do next think: I click url in Skype or html file in Explorer. Application is default "fake" browser, i.e. registered as default browser. Application shows several buttons. Each button represents installed or running browser. I can choose real browser, click it and specific url opened in chosen real browser . Quick search not revealed such Application. Context: I work in environment where some sites work in specific browsers. I get clickable urls from different applications. Sometimes I want to launch specific browser to use specific addin of it against url provided. I have specific portable "secured" browser I want to launch only for trusted sites.

    Read the article

  • Preventing iframe caching in browser

    - by Zarjay
    How do you prevent Firefox and Safari from caching iframe content? I have a simple webpage with an iframe to a page on a different site. Both the outer page and the inner page have HTTP response headers to prevent caching. When I click the "back" button in the browser, the outer page works properly, but no matter what, the browser always retrieves a cache of the iframed page. IE works just fine, but Firefox and Safari are giving me trouble. My webpage looks something like this: <html> <head><!-- stuff --></head> <body> <!-- stuff --> <iframe src="webpage2.html?var=xxx" /> <!-- stuff --> </body> </html> The var variable always changes. Despite the fact that the URL of the iframe has changed (and thus, the browser should be making a new request to that page), the browser just fetches the cached content. I've examined the HTTP requests and responses going back and forth, and I noticed that even if the outer page contains <iframe src="webpage2.html?var=222" />, the browser will still fetch webpage2.html?var=111. Here's what I've tried so far: Changing iframe URL with random var value Adding Expires, Cache-Control, and Pragma headers to outer webpage Adding Expires, Cache-Control, and Pragma headers to inner webpage I'm unable to do any JavaScript tricks because I'm blocked by the same-origin policy. I'm running out of ideas. Does anyone know how to stop the browser from caching the iframed content?

    Read the article

  • Refresh page in browser without resubmitting form

    - by Michael
    I'm an ASP.NET developer, and I usually find myself leaving the webpage that I'm working on open in my browser (Chrome is my browser of choice, but this question is relevant for any browser). My workflow typically goes like this: I write code, I rebuild my project in Visual Studio, and then I flip back to my browser with Alt-Tab and hit F5 to refresh the page. This is fine and dandy if a form hasn't been submitted since the page was opened. But if I've been clicking around on ASP.NET form controls, the page has posted form data a number of times, so hitting F5 causes the browser to (sensibly) pop up a confirmation message, e.g., "Confirm Form Resubmission: The page that you're looking for used information that you entered...". Sometimes I do want to resubmit the form, but more often than not, I just want to start over with the page (rather than resubmit form data). The way I usually get around this is to simply add some query string data to the URL so that the browser sees it as a fresh page request, e.g.: page.aspx becomes page.aspx? (or vice-versa). My question is: Is there a better way to quickly request a fresh version of a webpage (and not submit form data) in any of the major browsers? It seems like a no-brainer to me for web development, but maybe I'm missing something. What I'd love to see is something like the last item in this list: F5: refresh page Ctrl-F5: refresh page (and force cache refresh) Alt-F5: request fresh copy of the page without resubmitting the form

    Read the article

< Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >