Search Results

Search found 1321 results on 53 pages for 'htm'.

Page 14/53 | < Previous Page | 10 11 12 13 14 15 16 17 18 19 20 21  | Next Page >

  • Rich faces3.3.2 is not working in WebSphear 7

    - by palakolanusrinu
    Hi, I'm new to this rich faces and JSF i have developed one sample app and its working fine in tomcat6 now same app i have moved to WebSphear7 here i'm facing the problem. Exception on console: Unable to locate the tag library for uri //richfaces.org/rich" List of jars in build path: Commons-beanutils-1.8.3.jar commons-codec-1.4.jar commons-collections-3.2.1.jar commons-digester-2.0.jar commons-discovery-0.4.jar conmmons-logging.jar jsf-api.jar jsf-impl.jar jstl-1.2.jar jstl-api-1.2.jar jst-impl-1.2.jar richfaces-api-3.3.2.SR1.jar richfaces-impl-3.3.2.SR1.jar richfaces-ui-3.3.2.SR1.jar Web.xml is http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5" bbh index.html index.htm index.jsp default.html default.htm default.jsp Faces Servlet javax.faces.webapp.FacesServlet 1 Faces Servlet *.jsf State saving method: 'client' or 'server' (=default). See JSF Specification 2.5.2 javax.faces.STATE_SAVING_METHOD client javax.servlet.jsp.jstl.fmt.localizationContext resources.application com.sun.faces.config.ConfigureListener Faces Servlet *.faces <context-param> <param-name>org.richfaces.SKIN</param-name> <param-value>blueSky</param-value> </context-param> <filter> <display-name>RichFaces Filter</display-name> <filter-name>richfaces</filter-name> <filter-class>org.ajax4jsf.Filter</filter-class> <init-param> <param-name>createTempFiles</param-name> true maxRequestSize 2000000 richfaces Faces Servlet REQUEST FORWARD INCLUDE My JSP including the tag libs are like <%@taglib uri="http://java.sun.com/jsf/core" prefix="f"% <%@taglib uri="http://java.sun.com/jsf/html" prefix="h"% <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"% <%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"% <%@ taglib uri="http://richfaces.org/rich" prefix="rich"% Please Help me and thx in advance

    Read the article

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

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

    Read the article

  • Closing the gap between 2 inline elements

    - by insanepaul
    I have a simple div element that contains 2 inline tags. I've associated a onmouseout event to the div element. The problem is that the onmouseout event is fired when the user hovers their mouse between the two tags in the div and also after the end of the second tag. What I want to do is allow the user to hover their mouse across the whole of the div tag and only fire the onmouseout event when the mouse pointer is outside the div element (which is what I assumed from what I've done). I increased padding to close the gap between the 2 tags. This works but where they meet in IE7 at least the event is fired!!! I must be doing something wrong can someone please help. <div id="Div1" onmouseover="hideDiv()"> <a id="A1" href="HTMLNew.htm">ARTICLES</a> <a id="A2" href="HTMLNew.htm">COURSES & CASES</a> </div>

    Read the article

  • XMLHttpRequest() and Google Analytics Tracking

    - by sjw
    I have implemented an XMLHttpRequest() call to a standalone html page which simply has an html, title & body tag which Google Analytics Tracking code. I want to track when someone makes a request to display information (i.e. phone number) to try and understand what portion of people look at my directory versus obtaining a phone number to make a call. It is very simple code: var xhReq = new XMLHttpRequest(); xhReq.open("GET", "/registerPhoneClick.htm?id=" + id, false); xhReq.send(null); var serverResponse = xhReq.responseText Yet I cannot see the "hit" in Analytics... Has anyone had this issue? All the analytics tracking code does is call: <script type="text/javascript"> var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); </script> <script type="text/javascript"> try { var pageTracker = _gat._getTracker("UA-XXXXXXX"); pageTracker._trackPageview(); } catch(err) {}</script> So realistically, my XmlHTTPRequest() calls an htm file within which a script is execute to make an outbound call to Google Analytics. Is there any reason why an XmlHTTPRequest() would not execute this? Does an XmlHTTPRequest() still bring the code to the client before execution? Help Please

    Read the article

  • Prevent default on a click within a JQuery tabs in Google Chrome.

    - by Sydney
    I would like to prevent the default behaviour of a click on a link. I tried the return false; also javascript:void(0); in the href attribute but it doesn’t seem to work. It works fine in Firefox, but not in Chrome and IE. I have a single tab that loads via AJAX the content which is a simple link. <script type="text/javascript"> $(function() { $("#tabs").tabs({ ajaxOptions: { error: function(xhr, status, index, anchor) { $(anchor.hash).html("Couldn't load this tab. We'll try to fix this as soon as possible. If this wouldn't be a demo."); }, success: function() { alert('hello'); $('#lk').click(function() { alert('Click Me'); return false; }); } }, load: function(event, ui) { $('a', ui.panel).click(function() { $(ui.panel).load(this.href); return false; }); } }); }); </script> <body> <div id="tabs"> <ul> <li><a href="linkChild.htm">Link</a></li> </ul> </div> </body> The content of linkChild.htm is <a href="javascript:void(0)" id="lk">Click Me</a> So basically when the tab content is loaded with success, a click event is attached to the link “lk”. When I click on the link, the alert is displayed but then link disappears. I check the HTML and the element is actually removed from the DOM.

    Read the article

  • Can Content script set value of a text box within HTML frame? using Google Chrome extensions..

    - by devdreamers
    Hi all, I was working on a very simple extension, where on clicking extension icon, a webpage is opened in a new tab, the webpage has HTML frames, within which lies a textbox. I want to set a value for the same. The webpage which opens has: <HTML> <FRAMESET rows="15%, *" border="0"> <FRAME src="./files/abc.htm" id="abc_frame" name="abc_frame" onload="abcLoad()" scrolling="NO"> </FRAMESET> </HTML> and abc.htm has: <div align="center" valign="bottom" style="font-size: 1em;"> <form onSubmit="javascript:navigate(this);return false;"> <label for="loc">Loc</label>: <input type="text" size="50" id="loc" value="http://google.com"/> <input name="go" type="submit" value="Go" id="loc_go" onclick='navigate(this); return false;'/> </form> </div> how can I replace current textbox value with, say http://yahoo.com ? I guess, Content Script in Chrome extensions is required, but not sure, how/what should be it's code/content. Please guide/help. Thanks a lot. Appreciate it.

    Read the article

  • Forcing user to new page in php. (PHP newbie)

    - by JohnC
    Hello I'm a newbie web programmer. My background is writing Windows applications with sql. I'm putting together my 1st data entry screens in Php. I have a search form that links to a form that displays records in a grid. On each row of the grid I have a delete url to allow the user to remove a record. This links to a form delete.php (which calls the sql to remove the record). Ideally I would like to automatically take the user back to the search form rather than forcing the user to click on a link to do so. I have used ob_start with the header to do this elsewhere but cannot get it to work on this page. Is there another way to do it? (Using php 5 as part of LAMP) file delete.php <?php $id = $_GET['recordID']; //ob_start(); require_once('connections/local.php'); mysql_select_db($database_local, $local); mysql_query("DELETE FROM user_access WHERE id = {$id}") or die(mysql_error()); echo("Record ".$id." deleted"); echo("<br>"); //header("location:http://localhost/search7.htm); //ob_flush(); echo("<a href=\"http://localhost/search7.htm\">Search for Members</a>"); ?>

    Read the article

  • Facebook Connect Login redirecting in Chrome and Safari

    - by Lobe
    I am having a problem with Facebook Connect that I can't seem to get my head around. A user clicks on the fb-login button, the pop up appears and they authenticate, the pop up closes and the on-login function is called. This happens in IE and Firefox as is expected. However in Chrome and Safari, the pop up redirects to the canvas url and doesn't close. Also the on-login function isn't called. I have googled and it seems to be something to do with the xd-receiver.htm file, however it seems weird that it is working in IE and Firefox but not Chrome or Safari. Thanks The facebook javascript <script src="http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php/en_US" type="text/javascript"></script> <script type="text/javascript">FB.init("xxxxxxxxxxxxxxxxxx","xd_receiver.htm");</script> And the button <fb:login-button v="2" size="large" onlogin='window.location = "http://www.xxxxxxxxxx.com/development/redirect.php?size=large";'>Connect</fb:login-button> Obviously with Appid and domain hidden. Any ideas? EDIT: After a bit more playing around it turned out that I didn't have my base domain set in Facebook settings. Why it works in some browsers and not others beats me, however it works now. Thanks NSD for your suggestion.

    Read the article

  • open current page in new window including query string

    - by Hatch
    First of all, I am a total dud at all things related to web developement, so please bear with me here. I suspect this question is laughable for the web guys, but unfortunately I can't figure this out. Here goes: I have an application, that does some processing, writes some result files and then displays the results in an embedded IE browser control. This is done by navigating the browser control to a local html file together with a query string containing the generated result files to display it all. The link target would look something like: c:\SomeFolder\results.htm?results=file%201.xml;file%202.xml;file%203.xml So far, everything's fine. However, in the html page is a href that is suppossed to open up the exact same just in a normal browser window. What I thought would work is: <a href="#" target="_blank">Show in browser</a> Since it is a link in an html page displayed in an IE control, the link will open up in IE no matter what the default browser might be. This works for IE7 and 8, but not for IE6. With IE6 the query string gets cut off and the browser opens file://c:/results/results.htm# without the query string. I am sure there must be a much better way to do this without the # and which would work in all IEs. How would the pros solve this?

    Read the article

  • Creating transparent gridlines

    - by Rob Penridge
    I'm trying to get the chart's gridlines to be transparent but it doesn't seem to be supported: http://support.sas.com/documentation/cdl/en/grstatug/63302/HTML/default/viewer.htm#n1f71f6e9v037an1jy274v66z4r1.htm I'm doing to try and blend the gridlines with the chart background color (which in my code can change between colors) which would make the gridlines subtle rather than jarring when background colors change. Here is my code: ** ** TAKE THE DEFAULT STYLE BEING USED. MODIFY IT SO THAT ** GRAPH GRIDLINES WILL BE GREEN AND MOSTLY TRANSPARENT *; proc template; define style my_style; parent = styles.default; style GraphGridLines from GraphGridLines / contrastcolor=green transparency=.05; end; run; ** ** LAYOUT TEMPLATE FOR A SIMPLE SERIES CHART *; proc template; define statgraph mychart; begingraph; layout overlay / wallcolor=black xaxisopts=(display=(line) griddisplay=on) yaxisopts=(display=(line)) ; seriesplot x=name y=height / lineattrs=(color=white); endlayout; endgraph; end; run; ** ** PLOT SAMPLE DATA USING CUSTOM STYLE AND CHART LAYOUT WE JUST DEFINED *; ods graphics / width=640 height=640 ; ods html style=my_style; proc sgrender data=sashelp.class template=mychart; run; ods html close; Is there another way to achieve this effect by blending the green color with the background color?

    Read the article

  • $this->url() to another subdomain

    - by Supertino7
    Hello, I created subdomain for my application. host_www.type = "Zend_Controller_Router_Route_Hostname" host_www.route = "www.mywebsite.com" host_www.defaults.module = "produits" host_www.defaults.controller = "produits" host_www.defaults.action = "index" fiche_boutique.route = "ficheboutique/:boutique" fiche_boutique.defaults.controller = "boutique" fiche_boutique.defaults.action = "fiche-boutique" fiche_boutique.defaults.module = "default" fiche_boutique.chain = "host_www" host_produits.type = "Zend_Controller_Router_Route_Hostname" host_produits.route = "produits.mywebsite.com" host_produits.defaults.module = "produits" host_produits.defaults.controller = "produits" host_produits.defaults.action = "index" fiche_produit.type = "Zend_Controller_Router_Route_Regex" fiche_produit.route = "([-\w]+).htm" fiche_produit.reverse = "%s.htm" fiche_produit.map.1 = "q" fiche_produit.defaults.module = "produits" fiche_produit.defaults.controller = "produits" fiche_produit.defaults.action = "voir-produit" fiche_produit.chain = "host" I don't know if the syntax in this zend config ini file is correct, in particular for routes chaining. Once I'm on this subdomain, urls constructed with $this-url() like this : <a href="<?= $this->url(array('boutique' => 1234), 'fiche_boutique', true) ?>"> Visit this store </a> still point to the subdomain produits.mywebsite.com, where I want it to point to www.mywebsite.com For the moment, I do this : <a href="http://www.mywebsite.com<?= $this->url(array('boutique' => 1234), 'fiche_boutique', true) ?>"> Visit this store </a> But it's not flexible at all. Is there a solution, a parameter to add, or my config file is wrong ? thanks in advance for your help.

    Read the article

  • Loop through a set of HTML files and append text at top and bottom of each file

    - by NJTechGuy
    For instance, I have an HTML file like this : a.htm <body> Hello world! </body> I want : a.htm <html> <LINK href='style.css' rel=stylesheet type='text/css'> <body> Hello world! </body> </html> The code I have so far is : #!/bin/sh for i in `ls *.htm` do @echo off echo ***New top line*** > temp.txt type i >> temp.txt echo ***New bottom line*** >> temp.txt move /y temp.txt i done Errors : abc@bunny:~/fileAppendText$ ./loopAllFilesTest.sh ./loopAllFilesTest.sh: line 5: @echo: command not found ./loopAllFilesTest.sh: line 7: type: i: not found ./loopAllFilesTest.sh: line 9: move: command not found ./loopAllFilesTest.sh: line 5: @echo: command not found ./loopAllFilesTest.sh: line 7: type: i: not found ./loopAllFilesTest.sh: line 9: move: command not found ./loopAllFilesTest.sh: line 5: @echo: command not found ./loopAllFilesTest.sh: line 7: type: i: not found ./loopAllFilesTest.sh: line 9: move: command not found Please help. Thanks!

    Read the article

  • Jquery Works in FF but not IE at all

    - by Shawn
    I set up the SimpleModal plugin to work from our Ad server(Real 24/7). Essentially, attempting to make an interstitial ad. I serve a popupAd.js file from the Ad Server to our homepage(index.php), Here is the code for popupAd.js: $(document).ready(function() { $.modal('<iframe src="/welcomeAd.htm" height="525" width="562" style="border:0;" scrolling="no"/>', { closeHTML: "<a href='#' title='Close' align='right' style='color:#666>(X) Continue to website</a>", containerCss: { backgroundColor: '#fff', borderColor: "#0063dc", height: 525, padding: 0, width: 562, }, overlayCss:{ backgroundColor:"#fff", }, opacity:100, overlayClose: true }); }); This opens a modal window on the homepage which then loads welcomeAd.htm which contain nothing other than the ad call to the creative. Here is the code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd"> <html> <head> <title>Company Name</title> <!------ AD SERVER SETUP begin ------> <!------ OAS SERVER SETUP end ------> </head> <body style="margin: 0; padding: 0; width: 100%; height: 100%"> <script type="text/javascript" language="JavaScript"> <!-- AD SERVER CALL; //--> </script> </body> </html> This all works in FF but does nothing in IE, of which I am running IE7. Also, the closeHTML doesn't show up in Safari, though, the ad does.

    Read the article

  • XML in Authorware 7.01

    - by Mikael
    Let me explain the setup that is being used. Right now I have an authorware program which loads an ocx control. This control receives data in the form on an XML string. This part is working properly. However I need parse this XML string in authorware and have not been successful. I have been trying to use the XMLParser Xtra. The documentation listed here shows how to create a new XMLParser object and then shows how to call the object but never explains how to link the Parser to a XML file or XML string. The information I have been using can be found here https://www.adobe.com/livedocs/authorware/7/using_aw_en/wwhelp/wwhimpl/common/html/wwhelp.htm?context=Using_Authorware_7&file=09_va110.htm#224295 I need more information on how to Parse XML with this function or if there is another way to do this in Authorware. As a side note the documentation says it cannot create or append to XML, I will need to do this also inside of Authorware. Is this possible and if so, how?

    Read the article

  • jQuery: Problems cookies internet explorer

    - by user1140479
    I have made a login page. When the user logs in a request to an API is send. This API is PHP and checks the username and password. When both are correct an unique key is send back (this is placed in the database for further use: userid and other stuff needed in the website). After that key is sent back it is placed in a cookie: $.cookie("session", JSON.stringify(result)); After the cookie is set I send the user to a new page: location.href = 'dashboard.htm'; In this page jQuery checks if the cookie "session" is present. If not, the user is send back to the login page. sessionId = ($.cookie("session") ? JSON.parse($.cookie("session")).SessionId : 0); return sessionId; This works fine in Chrome, but IE (8/9) has some problems with this. I figured out that when you get to dashboard.htm the session is present. As soon as I hit F5 the session is gone. And sometimes the cookie isn't set at all! I can't seem to figure out why this is happening in IE. Has someone any idea? Other options/ideas to save that unique key are also welcome. Thanks in advance.

    Read the article

  • navigation li to create <span></span> around text via jquery

    - by MikesEpitaphSays
    I've been trying all day and reading a few things, but for some reason my code isn't working right What i'm trying to achieve is this: When i create an un ordered list in my index page - I want my jquery to automatically add around the text in the anchor. So i want it to look like this <li><a href="index.htm"><span>Home</span></a></li> while I am only adding: <li><a href="index.htm">Home</a></li> I want to do this because i have a LOT of list items and instead of writing when i'm adding pages it makes the most sense to save some time in the long run and create a loop that will handle that anytime i add one. This is What i have so far (sorry if it looks ugly): $('document').ready(function () { var begSpan = "<span>"; var endSpan = "</span>"; $('p').each(function () { $(this) prepend(begSpan); }).append(endSpan); }); How can i get that to auto create span tags for me

    Read the article

  • '??' Not a valid unicode character, but in the unicode character set?

    - by Steve Cotner
    Short story: I can't get an entity like '𠂉' to store in a MySQL database, either by using a text field in a Ruby on Rails app (with default UTF-8 encoding) or by inputting it directly with a MySQL GUI app. As far as I can tell, all Chinese characters and radicals can be entered into the database without problem, but not these rarely typed 'character components.' The character mentioned above is unicode U+20089 and html entity &#131209; I can get it to display on the page by entering <html>&#131209;</html> and removing html escaping, but I would like to store it simply as the unicode character and keep the html escaping in place. There are many other Chinese 'components' (parts of full characters, generally consisting of 2 or 3 strokes) that cause the same problem. According to this page, the character mentioned is in the UTF-8 charset: http://www.fileformat.info/info/unicode/char/20089/charset_support.htm But on the neighboring '...20089/index.htm' page, there's an alert saying it's not a valid unicode character. For reference, that entity can be found in Mac OS X by searching through the character palette (international menu, "Show Character Palette"), searching by radical, and looking under the '?' radical. Apologies if this is too open-ended... can a character like this be stored in a UTF-8-based database? How is this character both supported and unsupported, both present in the character set and not valid?

    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

  • IIS 301 Redirect from "/index.html" to "/" for SEO Canonicalization

    - by brainbolt
    I used the technique explained here for IIS (http://www.webconfs.com/how-to-redirect-a-webpage.php), but this appears to result in an infinite loop when applied to "/index.htm" and redirected to "/". Is there another way to do this in IIS so that it doesn't loop infinitely? This page is static HTML, so I can't implement an ASP or ASP.net solution. Any ideas?

    Read the article

  • Electronics Recycling

    - by Evan Carroll
    Is it common practice to not pay for recycling electronics? I find it kind of funny that scrap metal demands such a premium but electronics recycling gets nothing. My dad owns a stereostore and throws away hundreds of radio head-units a month is there anything useful or profitable that can be done with electronics on such a mass scale? http://stselectronicrecyclinginc.com/index.php/electronics-recycling http://www.basscomputerrecycling.com/?page_id=30 http://www.computerrecyclecenter.com/services.htm None of them seem to pay anything for the scrap.

    Read the article

  • Nginx Password Protect Directory Downloads Source Code

    - by Pamela
    I'm trying to password protect a WordPress login page on my Nginx server. When I navigate to http://www.example.com/wp-login.php, this brings up the "Authentication Required" prompt (not the WordPress login page) for a username and password. However, when I input the correct credentials, it downloads the PHP source code (wp-login.php) instead of showing the WordPress login page. Permission for my htpasswd file is set to 644. Here are the directives in question within the server block of my website's configuration file: location ^~ /wp-login.php { auth_basic "Restricted Area"; auth_basic_user_file htpasswd; } Alternately, here are the entire contents of my configuration file (including the above four lines): server { listen *:80; server_name domain.com www.domain.com; root /var/www/domain.com/web; index index.html index.htm index.php index.cgi index.pl index.xhtml; error_log /var/log/ispconfig/httpd/domain.com/error.log; access_log /var/log/ispconfig/httpd/domain.com/access.log combine$ location ~ /\. { deny all; access_log off; log_not_found off; } location = /favicon.ico { log_not_found off; access_log off; } location = /robots.txt { allow all; log_not_found off; access_log off; } location /stats/ { index index.html index.php; auth_basic "Members Only"; auth_basic_user_file /var/www/web/stats/.htp$ } location ^~ /awstats-icon { alias /usr/share/awstats/icon; } location ~ \.php$ { try_files /b371b8bbf0b595046a2ef9ac5309a1c0.htm @php; } location @php { try_files $uri =404; include /etc/nginx/fastcgi_params; fastcgi_pass unix:/var/lib/php5-fpm/web11.sock; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_intercept_errors on; } location / { try_files $uri $uri/ /index.php?$args; client_max_body_size 64M; } location ^~ /wp-login.php { auth_basic "Restricted Area"; auth_basic_user_file htpasswd; } } If it makes any difference, I'm using Ubuntu 14.04.1 LTS with Nginx 1.4.6 and ISPConfig 3.0.5.4p3.

    Read the article

  • Cracking truecrypt files in minutes? Or just truecrypt harddrives in minutes?

    - by oshirowanen
    Apparently http://www.lostpassword.com/kit-forensic.htm can be used to crack truecrypt hard drive encryption. Has anyone tried it and is it possible to crack truecrypt files too with this software? Passware Kit Forensic, complete with Passware FireWire Memory Imager, is the first and only commercial software that decrypts BitLocker and TrueCrypt hard disks, and instantly recovers Mac and Windows login passwords of seized computers.

    Read the article

  • Why won't these permissions do what I wish?

    - by Chris B.
    I am trying to make my folder owned by "apache" and then chmod that folder so that only the owner and group can access it. I am trying to do this to keep visitors from executing user-uploaded files directly. Here are the commands I am using: chown -R apache uploads chmod -R 770 uploads Source: http://www.mysql-apache-php.com/fileupload-security.htm Instead it seems that although it is keeping visitors from seeing the files, it is not allowing apache to serve them. Do you have any ideas?

    Read the article

  • Nginx phpmyadmin redirecting to / instead of /phpmyadmin upon login

    - by Frederik Nielsen
    I am having issues with my phpmyadmin on my nginx install. When I enter <ServerIP>/phpmyadmin and logs in, I get redirected to <ServerIP>/index.php?<tokenstuff> instead of <ServerIP>/phpmyadmin/index.php?<tokenstuff> Nginx config file: user nginx; worker_processes 5; error_log /var/log/nginx/error.log warn; pid /var/run/nginx.pid; events { worker_connections 1024; } http { include /etc/nginx/mime.types; default_type application/octet-stream; log_format main '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for"'; access_log /var/log/nginx/access.log main; sendfile on; #tcp_nopush on; keepalive_timeout 2; #gzip on; include /etc/nginx/conf.d/*.conf; } Default.conf: server { listen 80; server_name _; #charset koi8-r; #access_log /var/log/nginx/log/host.access.log main; location / { root /usr/share/nginx/html; index index.php index.html index.htm; } #error_page 404 /404.html; # redirect server error pages to the static page /50x.html # error_page 500 502 503 504 /50x.html; location = /50x.html { root /usr/share/nginx/html; } # proxy the PHP scripts to Apache listening on 127.0.0.1:80 # #location ~ \.php$ { # proxy_pass http://127.0.0.1; #} # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 # location ~ \.php$ { root /usr/share/nginx/html; try_files $uri =404; fastcgi_pass unix:/tmp/php5-fpm.sock; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } # deny access to .htaccess files, if Apache's document root # concurs with nginx's one # location ~ /\.ht { deny all; } location /phpmyadmin { root /usr/share/; index index.php index.html index.htm; location ~ ^/phpmyadmin/(.+\.php)$ { try_files $uri =404; root /usr/share/; fastcgi_pass unix:/tmp/php5-fpm.sock; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $request_filename; include fastcgi_params; fastcgi_param PATH_INFO $fastcgi_script_name; } location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ { root /usr/share/; } } } (Any general tips on tidying op those config files are accepted too)

    Read the article

  • PCI-express - is there a typo in the Intel 5500 overview

    - by Martin
    The overview for the 5500 and 5520 chipsets state that there is a total bandwidth of up to 48GB/s on each PCI Express x8 interface. http://www.intel.com/products/server/chipsets/5500-5520/5500-5520-overview.htm My understanding (admittedly from wikipedia) is that PCI-e Gen 2 runs at 500MB/s per lane. The 5520 has 36 lanes, and so would be limited to a total of 18GB/s. Am I missing something here, or is Intel's claimed 48GB/s a typo that should say 18GB/s ?

    Read the article

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