Search Results

Search found 6478 results on 260 pages for 'hippy head'.

Page 99/260 | < Previous Page | 95 96 97 98 99 100 101 102 103 104 105 106  | Next Page >

  • How to search through all commits in the repository?

    - by Josip
    I have a git repository with few branches and dangling commits. I would like to search all such commits in repository for a specific string. I know how to get a log of all commits in history, but these don't include branches or dangling blobs, just HEAD's history. I want to get them all, to find a specific commit that got misplaced. I would also like to know how to do this in mercurial, as I'm considering the switch.

    Read the article

  • Alternative to before </body> tag inline Javascript

    - by Mohammad
    I know inline Javascript is frowned upon and with the new on-the-fly Javascript compressors that check for idle/unused function usage and omit the unused code, it seems good practice to have all your Javascript in an external file. My question is, in situations like FOUC (flash of unstyled content) which usually require little snippets of code right before the closing </body> tag, is there a JQuery resolution that would serve the same purpose, but from a remote Javascript file linked in the <head> of the document?

    Read the article

  • How do I pass a variable number of parameters along with a callback function?

    - by Bungle
    I'm using a function to lazy-load the Sizzle selector engine (used by jQuery): var sizzle_loaded; // load the Sizzle script function load_sizzle(module_name) { var script; // load Sizzle script and set up 'onload' and 'onreadystatechange' event // handlers to ensure that external script is loaded before dependent // code is executed script = document.createElement('script'); script.src = 'sizzle.min.js'; script.onload = function() { sizzle_loaded = true; gather_content(module_name); }; script.onreadystatechange = function() { if ((script.readyState === 'loaded' || script.readyState === 'complete') && !sizzle_loaded) { sizzle_loaded = true; gather_content(module_name); } }; // append script to the document document.getElementsByTagName('head')[0].appendChild(script); } I set the onload and onreadystatechange event handlers, as well as the sizzle_loaded flag to call another function (gather_content()) as soon as Sizzle has loaded. All of this is needed to do this in a cross-browser way. Until now, my project only had to lazy-load Sizzle at one point in the script, so I was able to just hard-code the gather_content() function call into the load_sizzle() function. However, I now need to lazy-load Sizzle at two different points in the script, and call a different function either time once it's loaded. My first instinct was to modify the function to accept a callback function: var sizzle_loaded; // load the Sizzle script function load_sizzle(module_name, callback) { var script; // load Sizzle script and set up 'onload' and 'onreadystatechange' event // handlers to ensure that external script is loaded before dependent // code is executed script = document.createElement('script'); script.src = 'sizzle.min.js'; script.onload = function() { sizzle_loaded = true; callback(module_name); }; script.onreadystatechange = function() { if ((script.readyState === 'loaded' || script.readyState === 'complete') && !sizzle_loaded) { sizzle_loaded = true; callback(module_name); } }; // append script to the document document.getElementsByTagName('head')[0].appendChild(script); } Then, I could just call it like this: load_sizzle(module_name, gather_content); However, the other callback function that I need to use takes more parameters than gather_content() does. How can I modify my function so that I can specify a variable number of parameters, to be passed with the callback function? Or, am I going about this the wrong way? Ultimately, I just want to load Sizzle, then call any function that I need to (with any arguments that it needs) once it's done loading. Thanks for any help!

    Read the article

  • Unexpected space between DIV elements, no - not padding and not margins

    - by jon
    my code for the php page displaying the divs <?php session_start(); require_once("classlib/mainspace.php"); if (isset($_SESSION['username'])==FALSE) { header("location:login.php"); } $user = new User($_SESSION['username']); ?><!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> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="style/style.css" /> <title>SimpleTask - Home</title> </head> <body> <div id="main"> <div id="menu"> <div id="items"> <ul> <li><a href="home.php">home</a></li> <li>&bull;</li> <li><a href="projects.php">my projects</a></li> <li>&bull;</li> <li><a href="comments.php">my comments</a></li> </ul> </div> <div id="user"> <p>Welcome, <?php echo $user->GetRealName(); ?><br/><a href="editprofile.php">edit profile</a> &bull; <a href="logout.php">logout</a></p> </div> </div> <div id="content"> <h1>HOME</h1> </div> <div id="footer"> <p>footer text goes here here here here</p> </div> </div> </body> </html> and you can find my CSS here http://tasker.efficaxdevelopment.com/style/style.css and to view the live page go here http://tasker.efficaxdevelopment.com/login.php username:admin password:password

    Read the article

  • simple jquery callback works on .net3.5 but nothing fires on .net 2.0?

    - by CliffC
    hi i have the following jquery postback method on the client <%@ Page Language="C#" AutoEventWireup="true" CodeFile="CallServerWithParameters.aspx.cs" Inherits="CallServerWithParameters" %> <!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 runat="server"> <title></title> <script src="jquery-1.2.6.js" type="text/javascript"></script> <script language="javascript"> $(document).ready(function() { $("#txtNoOfMales").change(function() { var ticketRequired = this.value; var options = { type: "POST", url: "CallServerWithParameters.aspx/GetAvailableTicketsForMales", data: "{no:'" + ticketRequired + "'}", contentType: "application/json; charset=utf-8", dataType: "json", success: function(response) { if (response.d != "") { alert(response.d); $("#txtNoOfMales").focus(); } } }; //Call the PageMethods $.ajax(options); }); }); </script> </head> <body> <form id="form1" runat="server"> <div> No of Male Tickets:<asp:TextBox ID="txtNoOfMales" runat="server"></asp:TextBox> </div> </form> </body> </html> and the following web method on the server side using System; using System.Collections.Generic; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.Services; public partial class CallServerWithParameters : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { } [WebMethod] public static string GetAvailableTicketsForMales(int no) { string result = ""; int NoOfTicketsAvailable = 5; if (no > NoOfTicketsAvailable) { result = "Only " + NoOfTicketsAvailable.ToString() + " Male ticket(s) avaialable. Please eneter a lower number!"; } return result; } } problem is everything works fine on .net 3.5 but if i use the same code on .net 2.0 the webmethod event does not get call at all, anybody have any idea what i did wrong? thanks updated with full source code

    Read the article

  • Why aren't min-width and max-width working as I expect?

    - by Nathan Long
    I'm trying to adjust a CSS page layout using min-width and max-width. To simplify the problem, I made this test page. I'm trying it out in the latest versions of Firefox and Chrome with the same results. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Testing min-width and max-width</title> <style type="text/css"> div{float: left; max-width: 400px; min-width: 200px;} div.a{background: orange;} div.b{background: gray;} </style> </head> <body> <div class="a"> (Giant block of filler text here) </div> <div class="b"> (Giant block of filler text here) </div> </body> </html> Here's what I expect to happen: With the browser maximized, the divs sit side by side, each 400px wide: their maximum width Shrink the browser window, and they both shrink to 200px: their minimum width Further shrinking the browser has no effect on them Here's what actually happens, starting at step 2: Shrink the browser window, and as soon as they can't sit side-by-side at their max width, the second div drops below the first Further shrinking the browser makes them get narrower and narrower, as small as I can make the window So here's are my questions: What does max-width mean if the element will sooner hop down in the layout than go lower than its maximum width? What does min-width mean if the element will happily get narrower than that if the browser window keeps shrinking? Is there any way to achieve what I want: have these elements sit side-by-side, happily shrinking until they reach 200px each, and only then adjust the layout so that the second one drops down? And of course... What am I doing wrong?

    Read the article

  • Nasty redirect loop in WordPress (trailing slash, no trailing slash, and so on)

    - by Brett W. Thompson
    Hi, I read a ton of pages and tried lots of solutions but none have worked yet! My problem is that: test.asifa.net/asifa-wp Redirects to: test.asifa.net/asifa-wp/ Which redirects to the first page. What's a little bizarre is asifa-wp produces: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>301 Moved Permanently</title> </head><body> <h1>Moved Permanently</h1> <p>The document has moved <a href="http://test.asifa.net/asifa-wp/">here</a>.</p> </body></html> Whereas asifa-wp/ produces an empty page but the following headers (curl -v output): * About to connect() to test.asifa.net port 80 (#0) * Trying 69.163.203.138... connected * Connected to test.asifa.net (69.163.203.138) port 80 (#0) > GET /asifa-wp/ HTTP/1.1 > User-Agent: curl/7.18.2 (i386-redhat-linux-gnu) libcurl/7.18.2 NSS/3.12.0.3 zlib/1.2.3 libidn/0.6.14 libssh2/0.18 > Host: test.asifa.net > Accept: */* > < HTTP/1.1 301 Moved Permanently < Date: Sun, 13 Jun 2010 05:40:12 GMT < Server: Apache < X-Powered-By: PHP/5.2.13 < X-Pingback: http://test.asifa.net/asifa-wp/xmlrpc.php < Set-Cookie: _icl_current_language=en; expires=Mon, 14-Jun-2010 05:40:12 GMT; path=/asifa-wp/ < Location: http://test.asifa.net/asifa-wp < Vary: Accept-Encoding < Content-Length: 0 < Content-Type: text/html; charset=UTF-8 .htaccess looks like: # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase /asifa-wp/ RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /asifa-wp/index.php [L] </IfModule> # END WordPress Any help at all would be tremendously appreciated!!!

    Read the article

  • is it possible to extract certain strings based off a predefined white-space count?

    - by s2xi
    So after several Advil's I think I need help I am trying to make a script that lets the user upload a .txt file, the file will look like this as an example EXT. DUNKIN' DONUTS - DAY Police vehicles remain in the parking lot. The determined female reporter from the courthouse steps, MELINDA FUENTES (32), interviews Comandante Chitt, who holds a napkin to his jaw, like he cut himself shaving. MELINDA < Comandante Chitt, how does it feel to get shot in the face? > COMANDANTE CHITT < Not too different than getting shot in the arm or leg. > MELINDA < Tell us what happened. > COMANDANTE CHITT < I parked my car. (indicates assault vehicle in donut shop) He aimed his weapon at my head. I fired seven shots. He stopped aiming his weapon at my head. > Melinda waits for more, but Chitt turns and walks away into the roped-off crime scene. Melinda is confused for a second, then resumes smiling. MELINDA < And there you have it... A man of few words. > Ok, so based off of this what I want to do is this: The PHP script looks at the file and counts 35 white spaces, since all files will have the same layout and never differ in white spaces I chose this as the best way to go. for every 35 white spaces extract character 36 until the end of line. Then tally up $character++ so in the end the output would look like ----------------------------------- It looks like you have 2 characters in your script Melinda Commandante Chitt ----------------------------------- using PHP to select distinct names, and use the strtolower() to lower case the strings and ucfirst() to make the first letter upper-case thats my project, I'm at the stage where I'm going crazy trying to figure out how to count white-spaces and everything after that white space until the first white-space after the word IS a character name

    Read the article

  • how to make my code scalable on iphone ..thanks

    - by zjm1126
    this is my code: <!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta name="viewport" content="width=device-width,minimum-scale=0,maximum-scale=2.0><!--,user-scalable=no">--> </head> <body onorientationchange="updateOrientation();"> <div id="a"> <input id='ab' type="button" value="button" /> </div> <div id=b style="display: none"></div> <style type="text/css"> *{ margin:0; padding:0; } body{ /*height: 356px;* } /* Reposition on orientation change */ body.landscape{ height: 208px; } body.landscape div#a{ line-height:104px; } div#a{ height:50%; line-height:178px; text-align:center; } #b{ width:100%; height:50%; background:red; } </style> <script src="jquery-1.4.2.js" type="text/javascript"></script> <script type="text/javascript"> function updateOrientation() { var orientation = window.orientation; switch (orientation) { // If we're horizontal case 90: case -90: // Set orient to landscape $(document.body).addClass("landscape"); break; // If we're vertical default: // Set orient to portrait $(document.body).removeClass("landscape"); break; } } $('#ab').click(function(){ if($('#b').css('display')=='none')$('#b').css('display','block') else $('#b').css('display','none') }) </script> </body> </html> thanks

    Read the article

  • Issue while trying to give a floating effect to a footer bar in IE

    - by Shailesh
    Hi, I'm trying to put a footer bar at the bottom of the browser no matter what the length of the content is. The footer bar should always be visible to the user and should be on the top layer. Following is my code: <html> <head> <style type="text/css"> #wrapper { width: 910px; margin: 0 auto; padding: 0px 20px 50px 20px; text-align: left; } #footer-wrapper { -moz-background-clip:border; -moz-background-inline-policy:continuous; -moz-background-origin:padding; bottom:0; clear:both; font-size:11px !important; left:0; position:fixed; white-space:nowrap; width:100%; z-index:8000; } </style> <script> var counter = 0; function addContent(ctr) { document.getElementById(ctr).innerHTML=document.getElementById (ctr).innerHTML+" dynaContent"+counter; counter++; } </script> </head> <body> <div> <div><input type="button" onclick="addContent('wrapper')" value="Add dynaContent" /></div> <div id="wrapper" style="color:#FFFFFF; background-color: #111111;"> STATIC TEXT - HEADER-WRAPPER </div> <div style="color:#FFFFFF;background-color: #555555;">STATIC TEXT - FOOTER-WRAPPER</div> </div> </body> </html> It's working fine in Mozilla Firefox and giving the intended results, but, in IE, the footer bar always sticks just under the header. Please help. Thanks in advance, Shailesh.

    Read the article

  • Drawing text to <canvas> with @font-face does not work at the first time

    - by lemonedo
    Hi all, First try the test case please: http://lemon-factory.net/test/font-face-and-canvas.html I'm not good at English, so I made the test case to be self-explanatory. On the first click to the DRAW button, it will not draw text, or will draw with an incorrect typeface instead of the specified "PressStart", according to your browser. After then it works as expected. At the first time the text does not appear correctly in all browsers I've tested (Firefox, Google Chrome, Safari, Opera). Is it the standard behavior or something? Thank you. PS: Following is the code of the test case <!DOCTYPE html> <html> <head> <meta http-equiv=Content-Type content="text/html;charset=utf-8"> <title>@font-face and canvas</title> <style> @font-face { font-family: 'PressStart'; src: url('http://lemon-factory.net/css/fonts/prstart.ttf'); } canvas, pre { border: 1px solid #666; } pre { float: left; margin: .5em; padding: .5em; } </style> </head> <body> <div> <canvas id=canvas width=250 height=250> Your browser does not support the CANVAS element. Try the latest Firefox, Google Chrome, Safari or Opera. </canvas> <button>DRAW</button> </div> <pre id=style></pre> <pre id=script></pre> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> <script> var canvas = document.getElementById('canvas') var ctx = canvas.getContext('2d') var x = 30 var y = 10 function draw() { ctx.font = '12px PressStart' ctx.fillStyle = '#000' ctx.fillText('Hello, world!', x, y += 20) ctx.fillRect(x - 20, y - 10, 10, 10) } $('button').click(draw) $('pre#style').text($('style').text()) $('pre#script').text($('script').text()) </script> </body> </html>

    Read the article

  • javascript and css working on firefox but not working on IE

    - by Nirbhay saini
    Hi I have this code which working on fitrefox but not working on IE missing last charector on IE <!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> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>wrapped</title> <script type="text/javascript" language="javascript"> function set_padd(){ var tt = document.getElementById("span_padding").innerHTML; var txt = new Array(); txt = tt.split(" "); var atxt = ''; var f_txt = ''; var wrd_pr_linr = 4; var cnt = 1; for(var i = 0; i < txt.length; i++){ if(txt[i].length > 0){ txt[i] = txt[i].replace(' ',''); if(cnt < wrd_pr_linr){ if(txt[i].length > 0){ atxt += ' '+txt[i].replace(' ',''); cnt++; } }else{ f_txt += '<a class="padd_txt" >'+atxt+'</a><br />'; atxt = ''; cnt = 1; } } } document.getElementById("span_padding").innerHTML = f_txt; } </script> <style type="text/css"> .padd_txt{padding:7px;background:#009;color:#FFF;line-height:26px;font-size:14px;} body{font-family:'Trebuchet MS', Arial, Helvetica, sans-serif; font-size:24px; line-height:1.2em;} span{background-color: #009; width:200px; color: #FFF;" class="blocktext;} </style> </head> <body onload="set_padd();"> <div style="width: 350px;"> <p> <span id="span_padding"> This is what I want to happen where one long string is wrapped and the text has this highlight color behind it. </span> </div> </body> </html> out put on firefox is This is I want to happen where one string is wrapped and the text this highlight behind it. and output on IE This is what want to happen one long string wrapped and the has this highlight missing last two word

    Read the article

  • Database Logon Error in crystal report

    - by yasar arafat
    am really very dumb as this problem is being answered so many times but eally its above my head. i dont have any idea about working with crystal reports or asp.net but due to some reason i have to work on it. after trying very hard i m able to design on crystal report connecting it with mysql database. now when i see in the crystalreport preview i am able to see the report and the data ![enter image description here][1] but when i try to run it on server it says database logon failed![enter image description here][2] now i really dont know what to do i am pasting my aspx and aspx.vb code here and please repley in english not computer language believe me i m super dumb enter code here aspx codes <%@ Page Title="" Language="VB" MasterPageFile="~/Master/Site.master"AutoEventWireup="false" CodeFile="ManHourCostExpenditure.aspx.vb" Inherits="ManHourCostExpenditure" %> <%@ Register assembly="CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" namespace="CrystalDecisions.Web" tagprefix="CR" %> <asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server"> </asp:Content> <asp:Content ID="Content2" ContentPlaceHolderID="MainContent" Runat="Server"> <CR:CrystalReportViewer ID="CrystalReportViewer1" runat="server" AutoDataBind="True" EnableDatabaseLogonPrompt="False" EnableParameterPrompt="False" GroupTreeImagesFolderUrl="" Height="1202px" ReportSourceID="CrystalReportSource1" ToolbarImagesFolderUrl="" ToolPanelView="None" ToolPanelWidth="200px" Width="903px" BorderColor="#660033" BorderStyle="Solid" BorderWidth="1px" HasCrystalLogo="False" /> <CR:CrystalReportSource ID="CrystalReportSource1" runat="server"> <Report FileName="CrDiscProjManHoursActVsEst.rpt"> </Report> </CR:CrystalReportSource> </asp:Content> aspxdotvb codes Imports CrystalDecisions.CrystalReports.Engine Imports CrystalDecisions.Shared Imports CrystalDecisions.Enterprise Imports CrystalDecisions.ReportSource Imports CrystalDecisions.Web Imports CrystalDecisions.Windows.Forms Imports MySql Imports MySql.Data Imports MySql.Data.MySqlClient Imports System.Collections Imports System.Collections.Generic Imports System.Text Imports CrystalDecisions Imports CrystalDecisions.CrystalReports Imports CrystalReportsReportDefModelLib Partial Class ManHourCostExpenditure Inherits System.Web.UI.Page Dim CrRpt As New CrystalDecisions.CrystalReports.Engine.ReportDocument Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Dim StrConn As String = "SERVER=localhost;DATABASE=fluor;UID=root; PWD=root;" Dim Conn As New MySqlConnection(StrConn) Conn.Open() Dim CrRpt As New CrystalDecisions.CrystalReports.Engine.ReportDocument 'Session.Add("REPORT_KEY", CrRpt) CrRpt.Load(Server.MapPath("CrManHourCostExpenditure.rpt")) CrRpt.PrintOptions.PaperOrientation = PaperOrientation.Landscape 'If IsPostBack Then ' CrRpt = CType(Session.Item("REPORT_KEY"), Group) ' CrystalReportViewer1.ReportSource = CrRpt 'End If CrystalReportViewer1.ReportSource = CrRpt 'CrystalReportViewer1.DataBind() CrystalReportViewer1.RefreshReport() Conn.Close() 'CrRpt.Close() 'CrRpt.Dispose() End Sub Protected Sub Page_Unload(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Unload 'CrystalReportViewer1.ReportSource.Close() CrRpt.Close() CrRpt.Dispose() End Sub 'Protected Sub CrystalReportViewer1_Unload(ByVal sender As Object, ByVal e As System.EventArgs) Handles CrystalReportViewer1.Unload ' CrRpt.Close() ' CrRpt.Dispose() 'End Sub End Class please help me. thanks in advance.... yasir

    Read the article

  • Noob Question: Wordpress Looping

    - by dclowd9901
    Can someone give me an essential Wordpress Loop and explain to me what's happening with it? I'd like to put together some templates, but I don't do well with blackboxing. In other words, I'm fully capable of writing my own CMS, but when it comes to using someone else's and its arbitrary rules, I'm completely at a loss, and I just can't get my head around the standard loop Wordpress uses. Thanks for your patient guidance.

    Read the article

  • ASP.NET MVC - View with master page, how to set title?

    - by bh213
    What is prefered way of setting html title (in head) for view when using master pages? One way is by using Page.Title in .aspx file, but that requires in master page which can mess with HTML code. So, lets assume no server side controls, only pure html. Any better ideas? UPDATE: I would like to set title in view NOT in the controller or model.

    Read the article

  • Why might the Large Object Heap grow rather than throw an exception?

    - by Unsliced
    In a previous question I asked possible programatic ways of maximising the largest block allocatable on the LOH. I'm still seeing the problems, but now I'm trying to get my head around why the LOH seems to grow and shrink in size, yet I'm still seeing OutOfMemoryExceptions that tally with what others have reported as being due to LOH fragmentation. Why might one call to, for example, StringBuilder.EnsureCapacity throw an OutOfMemoryException for me, but another call from somewhere else result in the LOH expanding in size (according to the performance counters, it is growing and shrinking)?

    Read the article

  • Very simple jquery ui drag and drop does not work. Why not?

    - by Catfish
    WHy doesn't this work? <!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> <style type="text/css"> #content { background:#CCCCCC; width:500px; height:500px; } #drop { height:200px; width:200px; background:#00FFFF; float:right; } #drag { background:#009966; width:100px; height:100px; float:left; } .active { background:#FFCC33; } </style> <script type="text/ecmascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js"></script> <script type="text/javascript"> $(document).ready(function() { $('#drag').draggable({ containment: '#content', scrollSensitivity: 60, revert: true, cursor: 'move' }); $('#drop').droppable({ accept: '#drag', drop: function(event, ui) { $(this).addClass('.active'); } }); }); </script> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> </head> <body> <div id="content"> <div id="drag"> </div> <div id="drop"> </div> </div> </body> </html>

    Read the article

  • Lazy loading Javascript, object not created from IE8 cache

    - by doum-ti-di-li-doom
    Unfortunately the bug does not happen outside of my application! Scenario index.php <?php header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); header('Last-Modified: '.gmdate('D, d M Y H:i:s').'GMT'); header('Cache-Control: no-cache, must-revalidate'); header('Pragma: no-cache'); ?> <!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" lang="en"> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> <title>Lazy loader</title> </head> <body> ... <script type="text/javascript" src="internal.js"></script> ... </body> </html> internal.js myApp = { timerHitIt: false, hitIt: function () { if (arguments.callee.done) { return; } arguments.callee.done = true; if (myApp.timerHitIt) { clearInterval(myApp.timerHitIt); } var elt = document.createElement("script"); elt.async = true; elt.type = "text/javascript"; elt.src = "external.js"; elt.onload = elt.onreadystatechange = function () { alert(typeof(something)); } document.body.appendChild(elt); } } if (document.addEventListener) { document.addEventListener("DOMContentLoaded", myApp.hitIt, false); } /*@cc_on @*/ /*@if (@_win32) document.write("<script id=__ie_onload defer src="+((location.protocol == "https:") ? "//:" : "javascript:void(0)")+"><\/script>"); document.getElementById("__ie_onload").onreadystatechange = function () { if (this.readyState == "complete") { myApp.hitIt(); } }; /*@end @*/ if (/WebKit/i.test(navigator.userAgent)) { timerHitIt = setInterval(function () { if (/loaded|complete/.test(document.readyState)) { myApp.hitIt(); } }, 10); } window.onload = myApp.hitIt; external.js something = {}; alert(true); Valid results are undefined - true - object (± new request) true - object (± cached javascript) But sometimes, when hitting F5, I get true - undefined Does anyone have a clue why alert(true) is executed but something is not set?

    Read the article

  • How to update textbox value

    - by Thomas
    I have a textbox in my View. I input a number into the textbox, and then i want the controller to multiply the number and put the result into the textbox. How can I do that? This is what i have done already. Let's start with the View: <%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<dynamic>" %> <!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 runat="server"> <title>Index</title> </head> <body> <div> <h2>Please enter a number</h2> <% using (Html.BeginForm()) { %> <%=Html.TextBox("number")%> <input type="submit" value="Index" name ="Index" /> <% } %> </div> </body> </html> As you can see I have a simple textbox and button. This is my controller: using System.Web.Mvc; namespace MvcApplication1.Controllers { public class HomeController : Controller { // // GET: /Home/ public ActionResult Index() { return View(); } [HttpPost] public ActionResult Index(int number) { number = number * 2; ViewData["id"] = number; return View(ViewData); } } } But nothing really happens. Yeah, I see the Post is being done, and the coded steps into public ActionResult Index(int number). I see that the number is taken from the textbox, it's multiplied correctly. I've tried using ViewData as you can see. I've also used TempData. This is another code for the textbox in the View I've tried: <%=Html.TextBox("number", ViewData["number"])%> But it doesn't matter. The textbox doesn't get updated with the new value. How can I do that?

    Read the article

  • Why is zIndex not working from IE/Javascript?

    - by Vilx-
    <!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> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta http-equiv="X-UA-Compatible" content="IE=7" /> <title>Problem demo</title> </head> <body> <div style="background:red; position:relative;" id='div1'>1. <div style="background:lime; position: absolute; width: 300px;height: 300px; top: 3px; left: 30px" id="div2">3.</div> </div> <div style="background:blue;position:relative;color: white" id="div3">2.</div> <script type="text/javascript">/*<![CDATA[*/ window.onload= function() { // The container of the absolute DIV document.getElementById('div1').style.zIndex = 800; // The lowest DIV of all which obscures the absolute DIV document.getElementById('div2').style.zIndex = 1; // The absolute DIV document.getElementById('div3').style.zIndex = 1000; } /*]]>*/</script> </body> </html> In a nutshell, this script has two DIV elements with position:relative and the first of them has a third DIV with position:absolute in it. It's all set to run on IE-7 standards mode (I'm targeting IE7 and above). I know about the separate z-stacks of IE, so by default the third DIV should be beneath the second DIV. To fix this problem there is some Javascript which sets the z-orders of first and third DIV to 1000, and the z-order of the second DIV to 999. Unfortunately this does not help. If the z-indexes were set in markup, this would work, but why not from JS? Note: This problem does not exist in IE8 standards mode, but I'm targetting IE7, so I can't rely on that. Also, if you save this to your hard drive and then open it up, at first IE complains something about ActiveX and stuff. After you wave it away, everything works as expected. But if you refresh the page, the problem is there again.

    Read the article

  • Rails auto_complete "undefined method `auto_complete_for'" problem

    - by Andrew Wize
    rails - 2.3.8 ruby - 1.8.7 After auto_complete plugin installstion i still have "undefined method `auto_complete_for'" problem! Andrey-Bezruks-MacBook-Pro:eyeonasia.stage wizeflux$ ruby script/plugin install http://github.com/rails/auto_complete.git --force svn: '/Users/wizeflux/Projects/ionasia/eyeonasia.stage/vendor/plugins' is not a working copy Initialized empty Git repository in /Users/wizeflux/Projects/ionasia/eyeonasia.stage/vendor/plugins/auto_complete/.git/ warning: Option "depth" is ignored for github.com/rails/auto_complete.git From github.com/rails/auto_complete * branch HEAD - FETCH_HEAD Andrey-Bezruks-MacBook-Pro:eyeonasia.stage wizeflux$ after restarting server i get an error on line " auto_complete_for :listings, :name " - undefined method `auto_complete_for' for #

    Read the article

  • Frustrations about which language to use [closed]

    - by Joshua
    I am way too indecisive. I have an idea for a (admittedly craptastic) GUI program, so I start writing it in C# .NET WinForms. Then like halfway through I'm like, damn I should have written this in Qt. So I start writing it in Qt and remember why I hate C++ STL iterators so much. So in my head I go LINQ C++ STL So I'm like, maybe I'll do it in WPF, I like markup to make UIs hey this is kinda like web development (read: ez pz) BUT ITS LIKE WHY GOD WHY CANT I JUST PICK ONE AND COMMIT

    Read the article

  • How to stop page refresh when hit enter button from rich:inputNumberSpinner field?

    - by eswaramoorthy-nec
    Hi, I use rich:inputNumberSpinner tag. The problem is : I set cursor focus to inside of rich:inputNumberSpinner field, then i hit the enter button from my keyboard, that time page will be automatically refresh. But i don't need page refresh when i hit the enter button from my keyboard. The code : spinnerTagTest.jsp <%@page contentType="text/html" pageEncoding="UTF-8"%> <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %> <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %> <%@ taglib uri="http://richfaces.org/a4j" prefix="a4j" %> <%@ taglib uri="http://richfaces.org/rich" prefix="rich"%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <f:view> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>Spinner Tag Test</title> </head> <body> <h:form id="SpinnerForm"> <rich:panel id="SpinnerPanel"> <h:outputText value="Input Spinner Tag : "/> <rich:inputNumberSpinner id="spinnerField" value="" maxValue="23" inputSize="2"/> </rich:panel> </h:form> </body> I also use rich:hotKey for that inputNumberSpinner field. But Page refreshed. <rich:hotKey key="return" selector="#spinnerField" handler="event.stopPropagation();event.preventDefault(); return false;"/> And i check anotherway using javasccript, but page refreshed. The specific tag and javascript is : <rich:inputNumberSpinner id="spinnerField" value="" maxValue="23" inputSize="2" oninputkeypress="return stopPageRefresh();"/> <script type="text/javascript"> function stopPageRefresh() { return false; } </script> Here i use one alert message inside of stopPageRefresh(). But i hit enter button, first page refreshing and then alert message displayed. Help me about this. Thanks in advance.

    Read the article

< Previous Page | 95 96 97 98 99 100 101 102 103 104 105 106  | Next Page >