Search Results

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

Page 49/260 | < Previous Page | 45 46 47 48 49 50 51 52 53 54 55 56  | Next Page >

  • HTML, JavaScript, and CSS in a NetBeans Platform Application

    - by Geertjan
    I broke down the code I used yesterday, to its absolute bare minimum, and then realized I'm not using HTML 5 at all: <html> <head> <link rel="stylesheet" href="style.css" type="text/css" media="all" /> <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.3/jquery.min.js"></script> <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js"></script> <script type="text/javascript" src="script.js"></script> </head> <body> <div id="logo"> </div> <div id="infobox"> <h2 id="statustext"/> </div> </body> </html> Here's the script.js file referred to above: $(function(){ var banana = $("#logo"); var statustext = $("#statustext"); var defaulttxt = "Drag the banana!"; var dragtxt = "Dragging the banana!"; statustext.text(defaulttxt); banana.draggable({ drag: function(event, ui){ statustext.text(dragtxt); }, stop: function(event, ui){ statustext.text(defaulttxt); } }); }); And here's the stylesheet: body { background:#3B4D61 repeat 0 0; margin:0; padding:0; } h2 { color:#D1D8DF; display:block; font:bold 15px/10px Tahoma, Helvetica, Arial, Sans-Serif; text-align:center; } #infobox { position:absolute; width:300px; bottom:20px; left:50%; margin-left:-150px; padding:0 20px; background:rgba(0,0,0,0.5); -webkit-border-radius:15px; -moz-border-radius:15px; border-radius:15px; z-index:999; } #logo { position:absolute; width:450px; height:150px; top:40%; left: 30%; background:url(bananas.png) no-repeat 0 0; cursor:move; z-index:700; } However, I've replaced the content of the HTML file with a few of the samples from here, without any problem; in other words, if the HTML 5 canvas were to be needed, it could seamlessly be incorporated into my NetBeans Platform application: https://developer.mozilla.org/en/Canvas_tutorial/Basic_usage

    Read the article

  • SSI: Failed String Comparison with CGI Environment Variable [migrated]

    - by Calyo Delphi
    I am currently working on developing a personal website. It's not my first time doing this, but this is my first major foray into implementing SSI. I've run myself into a wall, however, with an if-else directive that uses one of the CGI environment variables as part of its comparison. Even after some limited attempts at debugging, all of the output and documentation that I have means that the comparisons being made should fail outright. This is not the case, and the wrong evaluation is being made by the if-else directive. Here's the code in the file index.shtml: <head> <!--#set var="page" value="Home" --> <!--#include file="headlinks.shtml" --> <style> img#ref { float: right; margin-left: 8px; border-width: 0px; } </style> </head> Here's the code in the file headlinks.shtml: <title><!--#echo var="page" --> &ndash; <!--#echo var="HTTP_HOST" --></title> <!--#set var="docroot" value="${DOCUMENT_ROOT}" --> <!--#echo var="docroot" --> <!--#if expr="( $docroot != '/Applications/MAMP/htdocs' ) || ( $docroot != '/home/dragarch/public_html' )" --> <link rel="stylesheet" type="text/css" href="../style.css"> <link rel="shortcut icon" type="image/svg+xml" href="../favicon.svg" /> <!--#else --> <link rel="stylesheet" type="text/css" href="style.css"> <link rel="shortcut icon" type="image/svg+xml" href="favicon.svg" /> <!--#endif --> And here's the output for the file index.shtml: <title>Home &ndash; dragarch</title> /Applications/MAMP/htdocs <link rel="stylesheet" type="text/css" href="../style.css"> <link rel="shortcut icon" type="image/svg+xml" href="../favicon.svg" /> Both style.css and favicon.svg are in the document root with index.shtml, so the if directive should fail and default to the output of the else directive. As you can see, while the document root (which is currently the MAMP htdocs folder on my own notebook) is correct according to the output of the echo directive, the comparison in the if-else directive fails to compare the strings properly. I'm using this page for my documentation: http://httpd.apache.org/docs/2.2/mod/mod_include.html I'm at a complete loss as to why this is the case, and need a bit of help here. EDIT: I should note that dragarch is a hostname that I configured in /etc/hosts to point to 127.0.0.1 so I could test the site without having to use localhost. It has no real effect on the functionality of anything, other than to just act as a prettier hostname to use.

    Read the article

  • How can I get the data from the json one by one by using javascript/jquery? [on hold]

    - by sandhus
    I have the working code which fetches all the records from the json, but how can I make it available one by one on the click of the button or link? The following code is working to fetch all the records: <!doctype html> <html> <head> <meta charset="utf-8"> <title>jQuery PHP Json Response</title> <style type="text/css"> div { text-align:center; padding:10px; } #msg { width: 500px; margin: 0px auto; } .members { width: 500px ; background-color: beige; } </style> </head> <body> <div id="msg"> <table id="userdata" border="1"> <thead> <th>Email</th> <th>Sex</th> <th>Location</th> <th>Picture</th> <th>audio</th> <th>video</th> </thead> <tbody></tbody> </table> </div> <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"> </script> <script type="text/javascript"> $(document).ready(function(){ var url="json.php"; $("#userdata tbody").html(""); $.getJSON(url,function(data){ $.each(data.members, function(i,user){ var tblRow = "<tr>" +"<td>"+user.email+"</td>" +"<td>"+user.sex+"</td>" +"<td>"+user.location+"</td>" +"<td>"+"<img src="+user.image+">"+"</td>" +"<td>"+"<audio src="+user.video+" controls>"+"</td>" +"<td>"+"<video src="+user.video+" controls>"+"</td>" +"</tr>" ; $(tblRow).appendTo("#userdata tbody"); }); }); }); </script> </body> </html> I used the json_encode function in the php file to encode the sql db. How can i achieve this?

    Read the article

  • php script google maps points from mysql (google example)

    - by user1637477
    I have recently added style information to my maps script, and it stopped working. Have I done something wrong? Guess you can tell I'm very new to this. Any help appreciated. <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"><head> <meta http-equiv="content-type" content="text/html; charset=utf-8"><title>Google Maps AJAX + mySQL/PHP Example</title> <script src="http://maps.google.com/maps/api/js?sensor=false" type="text/javascript"></script> <script type="text/javascript"> //<![CDATA[ ( *******************I INSERTED HERE ) var styles = [ { stylers: [ { hue: "#00ffe6" }, { saturation: -20 } ] },{ featureType: "road", elementType: "geometry", stylers: [ { lightness: 100 }, { visibility: "simplified" } ] },{ featureType: "road", elementType: "labels", stylers: [ { visibility: "off" } ] } ];**( ******************************** THROUGH TO HERE ) map.setOptions({styles: styles}); var customIcons = { restaurant: { icon: 'http://labs.google.com/ridefinder/images/mm_20_blue.png', shadow: 'http://labs.google.com/ridefinder/images/mm_20_shadow.png' }, bar: { icon: 'http://labs.google.com/ridefinder/images/mm_20_red.png', shadow: 'http://labs.google.com/ridefinder/images/mm_20_shadow.png' } }; function load() { var map = new google.maps.Map(document.getElementById("map"), { center: new google.maps.LatLng(-37.7735, 175.1418), zoom: 10, mapTypeId: 'roadmap' }); var infoWindow = new google.maps.InfoWindow; // Change this depending on the name of your PHP fileBHBHBHBHBHBHBHBBBBBBBBBBBBBBBBBBBBBBBBBBB downloadUrl("mywebsite-no i did this just a minute ago", function(data) { var xml = data.responseXML; var markers = xml.documentElement.getElementsByTagName("marker"); for (var i = 0; i < markers.length; i++) { var name = markers[i].getAttribute("name"); var address = markers[i].getAttribute("address"); var type = markers[i].getAttribute("type"); var point = new google.maps.LatLng( parseFloat(markers[i].getAttribute("lat")), parseFloat(markers[i].getAttribute("lng"))); var html = "<b>" + name + "</b> <br/>" + address; var icon = customIcons[type] || {}; var marker = new google.maps.Marker({ map: map, position: point, icon: icon.icon, shadow: icon.shadow }); bindInfoWindow(marker, map, infoWindow, html); } }); } function bindInfoWindow(marker, map, infoWindow, html) { google.maps.event.addListener(marker, 'click', function() { infoWindow.setContent(html); infoWindow.open(map, marker); }); } function downloadUrl(url, callback) { var request = window.ActiveXObject ? new ActiveXObject('Microsoft.XMLHTTP') : new XMLHttpRequest; request.onreadystatechange = function() { if (request.readyState == 4) { request.onreadystatechange = doNothing; callback(request, request.status); } }; request.open('GET', url, true); request.send(null); } function doNothing() {} //]]> </script><!--Adobe Edge Runtime--> <script type="text/javascript" charset="utf-8" src="map500x1000_edgePreload.js"></script> <style> .edgeLoad-EDGE-12956064 { visibility:hidden; } </style> <!--Adobe Edge Runtime End--> </head> <body onload="load()"> <div id="map" style="width: 1000px; height: 1000px;" class="edgeLoad-EDGE-12956064"></div> </body></html>

    Read the article

  • Disabling the right-click sub menu using JQuery

    - by nikolaosk
    Recently I needed to disable the right-click contextual menu in an HTML page for a very simple HTML application I was creating for a friend.This is going to be a short post where I will demonstrate how to disable the right-click contextual menu.I will use the very popular JQuery Library. Please download the library (minified version) from http://jquery.com/downloadPlease find here all my posts regarding JQuery.In this hands-on example I will be using Expression Web 4.0.This application is not a free application. You can use any HTML editor you like.You can use Visual Studio 2012 Express edition. You can download it here. I am going to create a very simple HTML 5 page with some text and an image. The HTML markup for the page follows. <!DOCTYPE html><html lang="en">  <head>    <title>HTML 5, CSS3 and JQuery</title>        <meta http-equiv="Content-Type" content="text/html;charset=utf-8" >    <link rel="stylesheet" type="text/css" href="style.css">     <script type="text/javascript" src="jquery-1.8.2.min.js">        </script><script type="text/javascript"> (function ($) { $(document).bind('contextmenu', function () { return false;}); })(jQuery); </script>       </head>  <body>      <div id="header">      <h1>Learn cutting edge technologies</h1>      <h2>HTML 5, JQuery, CSS3</h2>    </div>      <figure>  <img src="html5.png" alt="HTML 5"></figure>        <div id="main">          <h2>HTML 5</h2>                        <article>          <p>            HTML5 is the latest version of HTML and XHTML. The HTML standard defines a single language that can be written in HTML and XML. It attempts to solve issues found in previous iterations of HTML and addresses the needs of Web Applications, an area previously not adequately covered by HTML.          </p>          </article>      </div>             </body>  </html> This is the JQuery code, I use (function ($) { $(document).bind('contextmenu', function () { return false;}); })(jQuery); I simply disable/cancel the contextmenu event.When I load the simple page on the browser and I right-click the context menu does not appear.Hope it helps!!!

    Read the article

  • How can I change the color of the text in my iFrame? [closed]

    - by VinylScratch
    I have code here: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <title>Frag United Banlist</title> </head> <body> <h1>Tekkit Banlist</h1> <?php // change these things $server = "server-host"; $dbuser = "correct-user"; $dbpass = "correct-password"; $dbname = "correct-database"; mysql_connect($server, $dbuser, $dbpass); mysql_select_db($dbname); $result = mysql_query("SELECT * FROM banlist ORDER BY id DESC"); //This will display the most recent by id edit this query how you see fit. Limit, Order, ect. echo "<table width=100% border=1 cellpadding=3 cellspacing=0>"; echo "<tr style=\"font-weight:bold\"> <td>ID</td> <td>User</td> <td>Reason</td> <td>Admin/Mod</td> <td>Time</td> <td>Ban Length</td> </tr>"; while($row = mysql_fetch_assoc($result)){ if($col == "#eeeeee"){ $col = "#ffffff"; }else{ $col = "#eeeeee"; } echo "<tr bgcolor=$col>"; echo "<td>".$row['id']."</td>"; echo "<td>".$row['user']."</td>"; echo "<td>".$row['reason']."</td>"; echo "<td>".$row['admin']."</td>"; //Convert Epoch Time to Standard format $datetime = date("F j, Y, g:i a", $row['time']); echo "<td>$datetime</td>"; $dateconvert = date("F j, Y, g:i a", $row['length']); if($row['length'] == "0"){ echo "<td>None</td>"; }else{ echo "<td>$dateconvert</td>"; } echo "<td>".$row['id']."</td>"; echo "</tr>"; } echo"</table>" ?> </div> </body></html> And I am trying to make it so that when I put it in this iframe: <iframe src="http://bans.fragunited.net/" width="100%" length="100%"><p>Your browser does not support iframes.</p></iframe> But if you go to this page, fragunited.net/bans, (not bans.fragunited.net) the text is black and I want it to be white so you can actually see it. Sorry for the large amount of code, however I don't know where you have to put the code to change the color.

    Read the article

  • UnauthorizedAccessException on MemoryMappedFile in C# 4.

    - by Kevin Nisbet
    Hey, I wanted to play around with using a MemoryMappedFile to access an existing binary file. If this even at all possible or am I a crazy person? The idea would be to map the existing binary file directly to memory for some preferably higher-speed operations. Or to atleast see how these things worked. using System.IO.MemoryMappedFiles; System.IO.FileInfo fi = new System.IO.FileInfo(@"C:\testparsercap.pcap"); MemoryMappedFileSecurity sec = new MemoryMappedFileSecurity(); System.IO.FileStream file = fi.Open(System.IO.FileMode.Open, System.IO.FileAccess.ReadWrite, System.IO.FileShare.ReadWrite); MemoryMappedFile mf = MemoryMappedFile.CreateFromFile(file, "testpcap", fi.Length, MemoryMappedFileAccess.Read, sec, System.IO.HandleInheritability.Inheritable, true); MemoryMappedViewAccessor FileMapView = mf.CreateViewAccessor(); PcapHeader head = new PcapHeader(); FileMapView.Read<PcapHeader>(0, out head); I get System.UnauthorizedAccessException was unhandled (Message=Access to the path is denied.) on the mf.CreateViewAccessor() line. I don't think it's file-permissions, since I'm running as a nice insecure administrator user, and there aren't any other programs open that might have a read-lock on the file. This is on Vista with UAC disabled. If it's simply not possible and I missed something in the documentation, please let me know. I could barely find anything at all referencing this feature of .net 4.0 Thanks!

    Read the article

  • How to upload a file from iPhone SDK to an ASP.NET vb.net web form using ASIFormDataRequest

    - by user289348
    Download http://allseeing-i.com/ASIHTTPRequest/. This works like a charm and is a good wrapper and handles things nicely. The make the request this way to the asp.net code listed below. Create a asp.net webpage that has a file control. IPHONE CODE: NSURL *url = [NSURL URLWithString:@"http://YourWebSite/Upload.aspx"]; ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:url]; //These two must be added. ASP.NET Looks for them, if //they are not there in the request, the file will not upload [request setPostValue:@"" forKey:@"__VIEWSTATE"]; [request setPostValue:@"" forKey:@"__EVENTVALIDATION"]; [request setFile:@"PATH_TO_Local_File_on_Iphone/file/jpg" forKey:@"fu"]; [request startSynchronous]; This is the website code <%@ Page Language="VB" AutoEventWireup="false" CodeFile="Upload.aspx.vb" Inherits="Upload" %> <!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>Untitled Page</title> </head> <body> <form id="form1" runat="server"> <div> <asp:FileUpload ID="fu" runat="server" EnableViewState="False" /> </div> <asp:Button ID="Submit" runat="server" Text="Submit" /> </form> </body> </html> //Code behind page Partial Class Upload Inherits System.Web.UI.Page Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Dim tMarker As New EventMarkers If fu.HasFile = True Then 'fu.PostedFile fu.SaveAs("E:\InetPub\UploadedImage\" & fu.FileName) End If End Sub End Class

    Read the article

  • Rendering a UIWebView in drawRect with loadHTMLString

    - by Nick Weaver
    Hello there, I am having a problem with UIWebView. I'd like to render my own html code in it. When I add a webview as a subview and put in some html code it renders just fine. When it gets down to some optimized drawing of tableview cell with the drawRect method the problem pops up. Drawing UIView descendants works pretty well this way. It's even possible to load a URL with the loadRequest method, setting the delegate, conforming to the UIWebViewDelegate protocol and redrawing the table cell with setNeedsDisplay when webViewDidFinishLoad is called. It does show, but when it comes to loadHTMLString, nothing shows up, only a white rect. Due to performance reasons I have to do the drawing in the drawRect method. Any ideas? Thanks in advance Nick Example snippet code for the html code being loaded by a UIWebView: NSString *html = @"<html><head><title>My fancy webview</title></head><body style='background-color:green;'><p>It somehow seems<h2 style='color:black;'>this does not show up in drawRect</h2>!</p></body></html>"; [webView loadHTMLString:html baseURL:nil]; Snippet for the drawRect method: - (void)drawRect:(CGRect)aRect { CGContextRef context = UIGraphicsGetCurrentContext(); [[webView layer] renderInContext:context]; }

    Read the article

  • Silverlight ScriptableMember in Firefox 'Content is undefined' error.

    - by Sergey Mirvoda
    Recently I'm learned how to call SIlverlight methods from JavaScript. All works fine (even in Chrome !). But in FireFox 3 (3.6.4) registered Page object is undefined. My Code is very simple silverlight [ScriptableMember] public bool HasFilter() { return true; } And in MainPage constructor public MainPage() { InitializeComponent(); HtmlPage.RegisterScriptableObject("Page",this); LayoutRoot.DataContext = viewModel; Loaded += OnLoaded; } JavaScript <head> <script type="text/javascript"> function UpdateFilter() { var sl = document.getElementById('SilverlightChartControl'); alert(sl); alert(sl.Content.Page.HasFilter()); } </script> </head> <body> <a href="#" id="resize" onclick="UpdateFilter(); return false;">TEST</a> </body>

    Read the article

  • JQuery Thickbox - Can't get it to display

    - by Ali
    Hi All, I am using JQuery for the first time today. I can't make it to work (It simple doesnt show up). I want to display inline content using Thickbox (Eventually I will be displaying a PDF in an iframe). I have included all the javascript and css files etc. and referenced them as in code below. <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="JQueryLearning._Default" %> <!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>Untitled Page</title> <script src="Scripts/thickbox.js" type="text/javascript"></script> <script src="Scripts/thickbox-compressed.js" type="text/javascript"></script> <script src="Scripts/jquery-1.4.2.min.js" type="text/javascript"></script> <link href="App_Themes/Theme/Css/thickbox.css" rel="stylesheet" type="text/css" /> </head> <body> <form id="form1" runat="server"> <div> <a href="#TB_inline?height=50&width=300&inlineId=hiddenModalContent" title="Simple Demo" class="thickbox">Show hidden content.</a> <div id="hiddenModalContent" style="display: none;"> <div style="text-align: center;"> Hello ThickBox!</div> </div> </div> </form> </body> </html> Am I missing something? Thanks, Ali

    Read the article

  • asp.net/jquery - Countdown timer not working

    - by Julian
    Here is the full code: <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Default2" %> <!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 type="text/javascript" src="http://code.jquery.com/jquery-latest.pack.js"></script> <style type="text/css"> @import "jquery.countdown.css"; </style> <script type="text/javascript" src="Scripts/jquery.countdown.js"></script> <script type="text/javascript"> $('#shortly').countdown({ until: shortly, onExpiry: liftOff, layout: "{ps} seconds to go" }); $(document).ready(function () { shortly = new Date(); shortly.setSeconds(shortly.getSeconds() + 5.5); $('#shortly').countdown('change', { until: shortly }); }); function liftOff() { // refresh the page windowwindow.location = window.location; } </script> </head> <body> <form id="form1" runat="server"> <span id="shortly"></span> </form> </body> </html> I've got the jquery.countdown.js in the Scriptsmap of visual studio. Also the stylesheet "jquery.countdown.css" is in the project. Don't have a clue about what the problem could be. I'm kind of new to jquery and trying to learn it.

    Read the article

  • jquery mouseover/mouseout

    - by Hulk
    In the following code once the mouse out is done the mouse over again does not work ,what is the work around for this <!DOCTYPE html> <html> <head> <style> /* div { background:#def3ca; margin:3px; width:80px; display:none; float:left; text-align:center; }*/ </style> <script src="http://code.jquery.com/jquery-latest.min.js"></script> </head> <body> <div id="playControls" style="position:absolute; bottom:0px; left:0px; right:0px;color:blue;"> Mouse over me </div> <script> $(document).ready(function() { $("#playControls").mouseover(function () { alert('here'); $("div:eq(0)").show("fast", function () { /* use callee so don't have to name the function */ $(this).next("div").show("fast", arguments.callee); }); }); $("#playControls").mouseout(function () { alert('here'); $("div").hide(2000); }); }); </script> </body> </html>

    Read the article

  • Using jquery validate with multiple fields of the same name

    - by Matt H
    I am trying to get jquery validate to work on multiple fields. Reason being I have dynamically generated fields added and they are simply a list of numbers. So I thought I'd put together a basic example and followed the concept from the accepted answer in the following link: http://stackoverflow.com/questions/931687/using-jquery-validate-plugin-to-validate-multiple-form-fields-with-identical-name However, it's not doing anything useful. Why is it not working? <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <script src="http://code.jquery.com/jquery-latest.js"></script> <script type="text/javascript" src="http://dev.jquery.com/view/trunk/plugins/validate/lib/jquery.delegate.js"></script> <script type="text/javascript" src="http://dev.jquery.com/view/trunk/plugins/validate/jquery.validate.js"></script> <script> $("#submit").click(function(){ $("field").each(function(){ $(this).rules("add", { required: true, email: true, messages: { required: "Specify a valid email" } }); }) }); $(document).ready(function(){ $("#myform").validate(); }); </script> </head> <body> <form id="myform"> <label for="field">Required, email: </label> <input class="left" id="field" name="field" /> <input class="left" id="field" name="field" /> <input class="left" id="field" name="field" /> <input class="left" id="field" name="field" /> <br/> <input type="submit" value="Validate!" id="submit" name="submit" /> </form> </body> </html>

    Read the article

  • Why isn't uploadify and asp.net mvc 2 playing nice for me?

    - by Paperino
    First of all, I've checked out all the SO threads, and googled my brains out. I must be missing something obvious. I'd really appreciate some help! This is what I've got. UploadController.cs using System.Web; using System.Web.Mvc; namespace NIMDocs.Controllers { public class UploadController : Controller { public ActionResult Index() { return View(); } public string Procssed(HttpPostedFileBase FileData) { // DO STUFF return "DUHR I AM SMART"; } } } Index for Upload <%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage" %> <!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>ITS A TITLE </title> <script src="../../Content/jqueryPlugins/uploadify/jquery-1.3.2.min.js" type="text/javascript"></script> <script src="../../Content/jqueryPlugins/uploadify/swfobject.js" type="text/javascript"></script> <script src="../../Content/jqueryPlugins/uploadify/jquery.uploadify.v2.1.0.min.js" type="text/javascript"></script> <script type="text/javascript"> $(document).ready(function () { $('#uploadify').fileUpload({ 'uploader': '../../Content/jqueryPlugins/uploadify/uploadify.swf', 'script': '/Upload/Processed', 'folder': '/uploads', 'multi': 'true', 'buttonText': 'Browse', 'displayData': 'speed', 'simUploadLimit': 2, 'cancelImg': '/Content/Images/cancel.png' }); }); </script> </head> <body> <input type="file" name="uploadify" id="uploadify" /> <p><a href="javascript:jQuery('#uploadify').uploadifyClearQueue()">Cancel All Uploads</a></p> </body> </html> What am I missing here? I've tried just about every path permutation for uploadify's "uploader" option. Absolute path, '/' prefixed, etc.

    Read the article

  • Loading not-so-well-formed XML into XDocument (multiple DTD)

    - by Gart
    I have got a problem handling data which is almost well-formed XHTML document except for it has multiple DTD declarations in the beginning: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> ... </head> <body> ... </body> </html> I need load this data into XDocument object using only the first DTD and ignoring the rest declarations. It is not possible to completely ignore DTD processing because the document may have unusual characters like &acirc; or &euro; etc. The text is retrieved from external source and I have no idea why it comes like this. Obviously my naive attempt to load this document fails with System.Xml.XmlException : Cannot have multiple DTDs: var xmlReaderSettings = new XmlReaderSettings { DtdProcessing = DtdProcessing.Parse XmlResolver = new XmlPreloadedResolver(), ConformanceLevel = ConformanceLevel.Document, }; using (var xmlReader = XmlReader.Create(stream, xmlReaderSettings)) { return XDocument.Load(xmlReader); } What would be the best way to handle this kind of data?

    Read the article

  • HTML 5 Video OnEnded Event not Firing

    - by Eric J.
    I'm trying to react to the HTML 5 onended event for the video tag without success. In the code snippet below I added the mouseleave event to be sure the jQuery code is correct and that event does activate the alert() box. The video plays just fine but onended does not cause my alert() to fire off. Testing in Chrome, updated today to version 5.0.375.55. <html> <head> <script src="http://code.jquery.com/jquery-1.4.2.min.js"></script> <script> $(document).ready(function(){ $("#myVideoTag").bind('mouseleave onended', function(){ alert("All done, function!"); }); }); </script> </head> <body> <video id="myVideoTag" width="640" height="360" poster="Fractal-zoom-1-04-Snowflake.jpg" controls> <source src="Fractal-zoom-1-04-Snowflake.mp4" type="video/mp4"></source> <source src="Fractal-zoom-1-04-Snowflake.ogg" type="video/ogg"></source> </video> <body> <html>

    Read the article

  • dijit tree and focus node

    - by user220836
    Hello, I cannot get focusNode() or expandNode() get working. I also tried switching back to dojo 1.32 and even 1.3, no difference to 1.4. And I debugged with firebug, the node is a valid tree node and no errors occur but the node wont get focused. Help is VERY appreciated! <head> <script type="text/javascript"> dojo.declare("itcTree",[dijit.Tree], { focusNodeX : function(/* string */ id) { var node=this._itemNodesMap[id]; this.focusNode(node); } }); </script> </head> <body class="tundra"> <div dojoType="dojo.data.ItemFileReadStore" jsId="continentStore" url="countries.json"> </div> <div dojoType="dijit.tree.ForestStoreModel" jsId="continentModel" store="continentStore" query="{type:'continent'}" rootId="continentRoot" rootLabel="Continents" childrenAttrs="children"> </div> <div dojoType="itcTree" id="mytree" model="continentModel" openOnClick="true"> <script type="dojo/method" event="onClick" args="item"> dijit.byId('mytree').focusNodeX('AF'); </script> </div> <p> <button onclick="dijit.byId('mytree').focusNode('DE');">klick</button> </p> </body>

    Read the article

  • Howto rotate image using jquery rotate plugin?

    - by Tom
    How do you rotate an image using jquery (www.jquery.com) rotate plugin (http://code.google.com/p/jquery-rotate/)? I have tried the following and it doesn't seem to work: <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <title>View Photo</title> <script type="text/javascript" src="scripts/jquery.js"></script> <script type="text/javascript" src="scripts/jquery.rotate.1-1.js"></script> <script type="text/javascript"> var angle = 0; setInterval ( function (e) { rotate(); }, 100 ); function rotate() { angle = angle + 1; $('#pic').rotate(angle); } </script> </head> <body> <img border="0" src="player.gif" name="pic" id="pic"> </body> </html> Other methods that are supported by most browsers are wanted too, thanks!

    Read the article

  • Paperclip and tempfile with Rails

    - by Eric Koslow
    I'm trying to write a rails application where users can upload images, but Paperclip doesn't seem to be working for me. I've gone through all the basic steps (added has_attached_file, the migration, making the form multipart) but I keep getting the same error whenever I try uploading an image: can't convert nil into Integer Looking at the top of the stack ...rails3/lib/paperclip/processor.rb:46:in `sprintf' ...rails3/lib/paperclip/processor.rb:46:in `make_tmpname' .../ruby-1.9.2-head/lib/ruby/1.9.1/tmpdir.rb:154:in `create' .../ruby-1.9.2-head/lib/ruby/1.9.1/tempfile.rb:134:in `initialize' It seems the problem is in the tempfile. My code: _form.rb <%= form_for @high_school, :html => {:multipart => true} do |f| %> <%= f.error_messages %> ... <div class="field"> <%= f.file_field :photo %> </div> <div class="actions"> <%= f.submit %> </div> <% end %> model/high_school.rb ... validates_length_of :password, :minimum => 4, :allow_blank => true has_attached_file :photo has_many :students ... Is this a known problem? I basically followed the instructions from the github to the letter. My environment: Rails3 and Ruby 1.9.2dev Thank you!

    Read the article

  • Iframe src set dynamically through JavaScript is being executed twice on Internet Explorer

    - by Pierre
    Hello Everyone, I am encountering a very annoying problem with IE. Basically I need to set the source of an IFrame using JavaScript, however the source document is being executed twice not once during each call. The simplified HTML code is pasted below (I simplified it so that readers can understand it quickly. The source is being set through JavaScript since it will contain dynamic content): <html> <head> <title>Iframe test</title> </head> <body> <iframe id="testIframe" scrolling="no" frameborder="0" src="" width="800" height="600"></iframe> <script language="JavaScript"> document.getElementById("testIframe").src = "http://localhost/test.php"; </script> </body> </html> In this example, test.php inserts a record inside a local database once called. Whenever the page above is called using IE, two rows are being inserted on most occasions (sometimes only 1 row is inserted but this is not the norm). I tested the same script on Chrome and Opera and it works correctly on them so this must be an IE issue. If is set the src directly inside the iframe tag IE starts behaving correctly, however I need to be able to build the URL using javascript. Has anyone encountered this issue? and does anyone know of a solution/workaround? Thanks and Regards Pierre

    Read the article

  • Strings in array are no longer strings after jQuery.each()

    - by Álvaro G. Vicario
    I'm pretty confused with the behaviour of arrays of strings when I loop them through the jQuery.each() method. Apparently, the strings become jQuery objects inside the callback function. However, I cannot use the this.get() method to obtain the original string; doing so triggers a this.get is not a function error message. I suppose the reason is that it's not a DOM node. I can do $(this).get() but it makes my string become an array (from "foo" to ["f", "o", "o"]). How can I cast it back to string? I need to get a variable of String type because I pass it to other functions that compare the values among them. I enclose a self-contained test case (requires Firebug's console): <!DOCTYPE html> <html> <head><title></title> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> <script type="text/javascript"><!-- $(function(){ var foo = []; var $foo = $(foo); foo.push("987"); $foo.push("987"); foo.push("654"); $foo.push("654"); $.each(foo, function(i){ console.log("foo[%d]: object=%o; value=%s; string=%o", i, this, this, $(this).get()); // this.get() does not exist }); $foo.each(function(i){ console.log("$foo[%d]: object=%o; value=%s; string=%o", i, this, this, $(this).get()); // this.get() does not exist }); }); //--></script> </head> <body> </body> </html>

    Read the article

  • ASP.NET MVC GoogleBot Issues

    - by Khalid Abuhakmeh
    I wrote a site using ASP.NET MVC, and although it is not completely SEO optimized at this point I figured it is a good start. What I'm finding is that when I use Google's Webmaster Tools to fetch my site (to see what a GoogleBot sees) it sees this. HTTP/1.1 200 OK Cache-Control: public, max-age=1148 Content-Type: application/xhtml+xml; charset=utf-8 Expires: Mon, 18 Jan 2010 18:47:35 GMT Last-Modified: Mon, 18 Jan 2010 17:07:35 GMT Vary: * Server: Microsoft-IIS/7.0 X-AspNetMvc-Version: 2.0 X-AspNet-Version: 2.0.50727 X-Powered-By: ASP.NET Date: Mon, 18 Jan 2010 18:28:26 GMT Content-Length: 254 <!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> Index </title> </head> <body> </body> </html> Obviously this is not what my site looks like. I have no clue where Google is getting that HTML from. Anybody have an answer and a solution? Anybody experience the same issues? Thanks in advance.

    Read the article

  • PHP template class with variables?

    - by Josh
    I want to make developing on my new projects easier, and I wanted a bare bones very simple template engine solution. I looked around on the net and everything is either too bloated, or makes me cringe. My HTML files will be like so: <html> <head> <title>{PAGE_TITLE}</title> </head> <body> <h1>{PAGE_HEADER}</h1> <p>Some random content that is likely not to be parsed with PHP.</p> </body> </html> Obviously, I want to replace {PAGE_TITLE} and {PAGE_HEADER} with something I set with PHP. Like this: <?php $pageElements = array( '{PAGE_TITLE}' => 'Some random title.', '{PAGE_HEADER}' => 'A page header!' ); ?> And I'd use something like str_replace and load the replaced HTML into a string, then print it to the page? This is what I'm on the path towards doing at the moment... does anyone have any advice or a way I can do this better? Thanks.

    Read the article

  • ASP.Net Panel JQuery SlideToggle Postback

    - by Germ
    I have an asp.net panel with a style which hides it and I'm using JQuery to slideToggle the panel using a hyperlink. This works fine. However, if I add a button on the page that causes a postback the panel will default back to hidden. I understand why this is happening but what is the best way to keep the panels visibility state when a postback occurs? <head runat="server"> <title></title> <script type='text/javascript' src="jquery-1.4.1.min.js"> </script> <style type="text/css"> .panel { display: none; } </style> <script type="text/javascript"> $(function() { $("#Link1").click(function(evt) { evt.preventDefault(); $('#panelText').slideToggle('slow'); }); }); </script> </head> <body> <form id="form1" runat="server"> <asp:HyperLink ID="Link1" runat="server" NavigateUrl="#">SlideToggle </asp:HyperLink><br /> <asp:Panel ID="panelText" runat="server" CssClass="panel"> Some text</asp:Panel> <asp:Button ID="button1" runat="server" Text="Postback" /> </form> </body> </html>

    Read the article

< Previous Page | 45 46 47 48 49 50 51 52 53 54 55 56  | Next Page >