Search Results

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

Page 54/260 | < Previous Page | 50 51 52 53 54 55 56 57 58 59 60 61  | Next Page >

  • Can someone describe the nested set model from a C#/LINQ perspective?

    - by Chad
    I know the nested set model doesn't pertain to the C# language or LINQ directly... it's what I'm using to develop my web app. For hierarchical data (categories with sub-categories in my case), I'm currently using something similar to the Adjacency List model. At the moment, I've only got 2 levels of categories, but I'd like to take it further and allow for n levels of categories using the nested set model. I'm not quite clear on how to use it in a C# context. Here's the article I'm reading on the nested set model. Though this article cleared up my confusion some, I still have a big ?? in my head: - Is inserting, updating or deleting categories tedious? It looks like the left and right numbers would require re-numbering... what would the LINQ queries look like for the following scenarios? Delete a child node (re-number all node's left/right values) Delete a parent node (what do you do with the orphans?) Move a child node to a different parent node (renumber again) If my understanding is correct, at all times the child node's left/right values will always be between the parent node's left/right values, am I correct? Seems easy enough, if only the categories were static... most likely I need to spend more time to get my head around the concept. Any help is greatly appreciated!

    Read the article

  • simple jquery fetch from mysql

    - by JPro
    I am trying to use jQuery with MYSQL and I wrote something like this : <html> <head> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script> <script> function example_ajax_request() { $('#example-placeholder').html('<p>Loading results ... <img src="ajax-loader.gif" /></p>'); $('#example-placeholder').load("loadres.php"); } </script> </head> <body> <div id="query"> <select name="show" id="box" > <option value="0">Select A Test</option> <option value="All">--All--</option> <option value="M1">Model1</option> </select> <input type="button" onclick="example_ajax_request()" value="Click Me!" /> </div> <div id="example-placeholder"> <p>Placeholding text</p> </div></body> </html> Basically I want to pass parameters to the loadres.php file. But unable to figure out the exact way to do. Any help is appreciated. Thanks.

    Read the article

  • R: convert data.frame columns from factors to characters

    - by Mike Dewar
    Hi, I have a data frame. Let's call him bob: > head(bob) phenotype exclusion GSM399350 3- 4- 8- 25- 44+ 11b- 11c- 19- NK1.1- Gr1- TER119- GSM399351 3- 4- 8- 25- 44+ 11b- 11c- 19- NK1.1- Gr1- TER119- GSM399352 3- 4- 8- 25- 44+ 11b- 11c- 19- NK1.1- Gr1- TER119- GSM399353 3- 4- 8- 25+ 44+ 11b- 11c- 19- NK1.1- Gr1- TER119- GSM399354 3- 4- 8- 25+ 44+ 11b- 11c- 19- NK1.1- Gr1- TER119- GSM399355 3- 4- 8- 25+ 44+ 11b- 11c- 19- NK1.1- Gr1- TER119- I'd like to concatenate the rows of this data frame (this will be another question). But look: > class(bob$phenotype) [1] "factor" Bob's columns are factors. So, for example: > as.character(head(bob)) [1] "c(3, 3, 3, 6, 6, 6)" "c(3, 3, 3, 3, 3, 3)" [3] "c(29, 29, 29, 30, 30, 30)" I don't begin to understand this, but I guess these are indices into the levels of the factors of the columns (of the court of king caractacus) of bob? Not what I need. Strangely I can go through the columns of bob by hand, and do bob$phenotype <- as.character(bob$phenotype) which works fine. And, after some typing, I can get a data.frame whose columns are characters rather than factors. So my question is: how can I do this automatically? How do I convert a data.frame with factor columns into a data.frame with character columns without having to manually go through each column? Bonus question: why does the manual approach work?

    Read the article

  • JavaScript access parent window from popup windows

    - by user359472
    I am trying to code this for hours and still couldn't do it. It keep tell me "Permission Denied". Here is what I am trying to accomplish. This pretty hard to explain please follow the example below. For example. domain111.com and domain222.com. When I am on domain111.com i click on the popup link , it will pop-up the domain111.com/popup.html then it redirect me to domain222.com. On this domain222.com it will redirect to couple pages before it redirect back to domain111.com with the result. I want to send the result from domain111.com to domain111.com. The process is like below. Domain111-popup to--Domain111-redirect--Domain222-redirect xxx Domain222 pages then redirect to---Domain111---SEND to parent window-Domain11 Here is my code. File name 1.hml on domain111.com <script type="text/javascript"> function IamParent() { alert('I am the parent of this window') } function PopUP() { window.open("http://domain222.com/2.htm", 'ALpop').focus(); } </script> <body> <a href="#void(0);" onclick="PopUP();" >Click</a> </body> File name 2.html on domain222.com <head> <title></title> <meta http-equiv="refresh" content="1;url=http://domain111.com/3.htm?Result=Yes" /> </head> Filename 2.htm on domain111.com <script type="text/javascript"> parent.IamParent(); //execute the function from the same domain111.com/1.htm </script> Please don't suggest AJAX or web request because it will not work with this case. Thanks for reading.

    Read the article

  • Why does my Perl CGI script complain about "Can't locate CGI/Simple.pm"?

    - by dexter
    For more information see this Example use strict; use warnings; use CGI::Simple; use DBI; my $cgi = CGI::Simple->new; my $dsn = sprintf( 'DBI:mysql:database=%s;host=%s', 'cdcol', 'localhost' ); my $dbh = DBI->connect($dsn, root => '', { AutoCommit => 0, RaiseError => 0 } ); my $status = $dbh ? 'Connected' : 'Failed to connect'; print $cgi->header, <<HTML; <!DOCTYPE HTML> <html> <head><title>Test</title></head> <body> <h1>Perl CGI Script</h1> <p>$status</p> </body> </html> HTML This code gives me error: The server encountered an internal error and was unable to complete your request. Error message: Can't locate CGI/Simple.pm in @INC (@INC contains: C:/xampp/perl/site/lib/ C:/xampp/perl/lib C:/xampp/perl/site/lib C:/xampp/apache) at C:/xampp/htdocs/perl/index.pl line 4. BEGIN failed--compilation aborted at C:/xampp/htdocs/perl/index.pl line 4. , Error 500 localhost 3/25/2010 11:19:19 AM Apache/2.2.14 (Win32) DAV/2 mod_ssl/2.2.14 OpenSSL/0.9.8l mod_autoindex_color PHP/5.3.1 mod_apreq2-20090110/2.7.1 mod_perl/2.0.4 Perl/v5.10.1 What does this mean and how can I resolve it?

    Read the article

  • jQuery.load doesn't execute javascript with document.write

    - by Garfield
    I am trying to use jQuery.Load to load an ad call that has a document.write, and for some reason its not able to, or in firefox atleast, reloads the page with the entire ad. Here is the simplified version of the code. DynamicLoad.html <html> <head> <script src="http://www.prweekus.com/js/scripts.js?3729212881" type="text/javascript"></script> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>jQuery Load of Script</title> <script type="text/javascript" src="http://www.google.com/jsapi"></script> <script type="text/javascript"> google.load("jquery", "1.3.2"); </script> <script type="text/javascript"> $(document).ready(function(){ $("#myButton").click(function() { $("#myDiv").load("source.html"); }); }); </script> </head> <body> <button id="myButton">Click Me</button> <div id="myDiv"></div> <div id="slideAdUnit"></div> </body> </html> Source.html <script language="javascript" type="text/javascript"> document.write('<script language="javascript" type="text/javascript"><\/script>'); </script> test Once you click the button in FF the browser just waits for something to load. Any thoughts ? Eventually I would be passing a src element in the document.write which points to our ad server. Thanks for your help.

    Read the article

  • Loading user controls programatically into a placeholder (asp.net(vb))

    - by Phil
    In my .aspx page I have; <%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" AspCompat="True" %> <%@ Register src="Modules/Content.ascx" tagname="Content" tagprefix="uc1" %> <!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> </head> <body> <form id="form1" runat="server"> <div> <asp:PlaceHolder ID="Modulecontainer" runat="server"></asp:PlaceHolder> </div> </form> </body> </html> In my aspx.vb I have; Try Dim loadmodule As Control loadmodule = Me.LoadControl("~/modules/content.ascx") Modulecontainer.Controls.Add(loadmodule) Catch ex As Exception Response.Write(ex.ToString & "<br />") End Try The result is an empty placeholder and no errors. Thanks a lot for any assistance

    Read the article

  • Create a HTML table from nested maps (and vectors)

    - by Kenny164
    I'm trying to create a table (a work schedule) I have coded previously using python, I think it would be a nice introduction to the Clojure language for me. I have very little experience in Clojure (or lisp in that matter) and I've done my rounds in google and a good bit of trial and error but can't seem to get my head around this style of coding. Here is my sample data (will be coming from an sqlite database in the future): (def smpl2 (ref {"Salaried" [{"John Doe" ["12:00-20:00" nil nil nil "11:00-19:00"]} {"Mary Jane" [nil "12:00-20:00" nil nil nil "11:00-19:00"]}] "Shift Manager" [{"Peter Simpson" ["12:00-20:00" nil nil nil "11:00-19:00"]} {"Joe Jones" [nil "12:00-20:00" nil nil nil "11:00-19:00"]}] "Other" [{"Super Man" ["07:00-16:00" "07:00-16:00" "07:00-16:00" "07:00-16:00" "07:00-16:00"]}]})) I was trying to step through this originally using for then moving onto doseq and finally domap (which seems more successful) and dumping the contents into a html table (my original python program outputed this from a sqlite database into an excel spreadsheet using COM). Here is my attempt (the create-table fn): (defn html-doc [title & body] (html (doctype "xhtml/transitional") [:html [:head [:title title]] [:body body]])) (defn create-table [] [:h1 "Schedule"] [:hr] [:table (:style "border: 0; width: 90%") [:th "Name"][:th "Mon"][:th "Tue"][:th "Wed"] [:th "Thur"][:th "Fri"][:th "Sat"][:th "Sun"] [:tr (domap [ct @smpl2] [:tr [:td (key ct)] (domap [cl (val ct)] (domap [c cl] [:tr [:td (key c)]]))]) ]]) (defroutes tstr (GET "/" ((html-doc "Sample" create-table))) (ANY "*" 404)) That outputs the table with the sections (salaried, manager, etc) and the names in the sections, I just feel like I'm abusing the domap by nesting it too many times as I'll probably need to add more domaps just to get the shift times in their proper columns and the code is getting a 'dirty' feel to it. I apologize in advance if I'm not including enough information, I don't normally ask for help on coding, also this is my 1st SO question :). If you know any better approaches to do this or even tips or tricks I should know as a newbie, they are definitely welcome. Thanks.

    Read the article

  • Problems with registering click event listener to a frame-element

    - by distractedBySquirrels
    Hi everybody, I ran into a problem with adding an event listener. I wrote a Firefox plugin a while ago for my bachelor thesis. It was based on a different attacker model than you would normally expect. In this scenario the attacker was the service provider (like Facebook, Google,...), who reads all your private data stored on their site (via JS). My final solution was to temporally allow JS (while the page loads and after an user action occured). To observe the interaction I used event listener, which worked very well so far. But last week I noticed that my approach doesn't work with web sites which are using a frameset (I added the event listener to the body...). So I tried to add the listener to the frameset respectively to the frame. But the clicks are only noticed when you actually click on the frame... (eg resize the frame with your mouse) But I want to register clicks on the document loaded inside the frame. I already tried the .frameElement. Sadly it seems that Firefox doesn't like my (or, which is more likely, I'm too stuipd :) ) and claims there are no frames... Could anyone tell me how to add an event listener to the document inside a frame? The web site looks like this: <html> <head> <title>Frameset Test</title> </head> <frameset cols="150,*"> <frame src="nav.html" name="Navigation"> <frame src="main.html" name="Main"> </frameset> </html> This was my first bigger projekt with Mozilla so this could be a really dumb failure of mine... I hope you guys can help me. Thanks in advance. Sebastian

    Read the article

  • Firefox: Can I use a relative path in the BASE tag?

    - by Aaron Digulla
    I have a little web project where I have many pages and an index/ToC file. The toc file is at the root of my project in toc.html. The pages are spread over a couple of subdirectories and include the toc with an iframe. The project doesn't need a web server, so I can create the HTML in a directory and browse it in my browser. The problem is that I'm running into XSS issues when JavaScript from the toc.html wants to call a function in a page (violation of the same origin policy). So I added base tags in the header with a relative URL to the directory in which toc.html. This works for Konqueror but in Firefox, I have to use absolute paths or the toc won't even display :( Here is an example: <?xml version='1.0' encoding='utf-8' ?> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <base href="../" target="_top" /> <title>Project 1</title> </head> <body> <iframe class="toc" frameborder="0" src="toc.html"> </iframe> </body> </html> This is file is in a subdirectory page. Firefox won't even load it, saying that it can't find page/toc.html. Is there a workaround? I would really like to avoid absolute paths in my export to keep it the same everywhere (locally and when I upload it on the web server later).

    Read the article

  • jQuery problem with change event and IE8

    - by Marcus
    There is a bug in jQuery 1.4.2 that makes change event on select-element getting fired twice when using both DOM-event and a jQuery event, and this only on IE7/8. Here is the test code: <html> <head> <script src="http://code.jquery.com/jquery-1.4.2.js" type="text/javascript"></script> <script type="text/javascript"> jQuery(document).ready(function() { jQuery(".myDropDown").change(function() { }); }); </script> </head> <body> <select class="myDropDown" onchange="alert('hello');"> <option>1</option> <option>2</option> <option>3</option> <option>4</option> </select> </body> </html> Ticket to actual bug: http://dev.jquery.com/ticket/6593 This causes alot of trouble for us in our application cause we use both ASP.NET-events mixed with jQuery and once you hook up a change event on any element every select (dropdown) gets this double firing problem. Is there anyone who knows a way around this in the meantime until this issue is fixed?

    Read the article

  • Filtering Wikipedia's XML dump: error on some accents

    - by streetpc
    I'm trying to index Wikpedia dumps. My SAX parser make Article objects for the XML with only the fields I care about, then send it to my ArticleSink, which produces Lucene Documents. I want to filter special/meta pages like those prefixed with Category: or Wikipedia:, so I made an array of those prefixes and test the title of each page against this array in my ArticleSink, using article.getTitle.startsWith(prefix). In English, everything works fine, I get a Lucene index with all the pages except for the matching prefixes. In French, the prefixes with no accent also work (i.e. filter the corresponding pages), some of the accented prefixes don't work at all (like Catégorie:), and some work most of the time but fail on some pages (like Wikipédia:) but I cannot see any difference between the corresponding lines (in less). I can't really inspect all the differences in the file because of its size (5 GB), but it looks like a correct UTF-8 XML. If I take a portion of the file using grep or head, the accents are correct (even on the incriminated pages, the <title>Catégorie:something</title> is correctly displayed by grep). On the other hand, when I rectreate a wiki XML by tail/head-cutting the original file, the same page (here Catégorie:Rock par ville) gets filtered in the small file, not in the original… Any idea ? Alternatives I tried: Getting the file (commented lines were tried wihtout success): FileInputStream fis = new FileInputStream(new File(xmlFileName)); //ReaderInputStream ris = ReaderInputStream.forceEncodingInputStream(fis, "UTF-8" ); //(custom function opening the stream, reading it as UFT-8 into a Reader and returning another byte stream) //InputSource is = new InputSource( fis ); is.setEncoding("UTF-8"); parser.parse(fis, handler); Filtered prefixes: ignoredPrefix = new String[] {"Catégorie:", "Modèle:", "Wikipédia:", "Cat\uFFFDgorie:", "Mod\uFFFDle:", "Wikip\uFFFDdia:", //invalid char "Catégorie:", "Modèle:", "Wikipédia:", // UTF-8 as ISO-8859-1 "Image:", "Portail:", "Fichier:", "Aide:", "Projet:"}; // those last always work

    Read the article

  • Loading one page inside another

    - by Robin I Knight
    User 'Citizen' provided an answer to the iframe situation with the ajax script from dynamic drive. As I predicted it although it loads one page inside another it does not work with the calculation scripts, collapsible panels, validation form. All of it simply not working. I have set up a test page that has the exact same HEAD section as the page that is loaded inside it, so it is not s problem of script location. Take a look and see if you can tell me what is going on. Baring in mind this is just a test page. On the test page the entire page is loaded from another and as you can see all the collapsible panels are open, all calculations except the duration are not working because another file that is loaded by ajax on the original page is not loading in this one, the accordion menu us not working and the validation form is not validating. It is as if all script triggers have been removed and left behind but like I said the HEAD section of the parent page contains all of the scripts as well. Any ideas http://www.divethegap.com/scuba-diving-programmes-dive-the-gap/programme-pages/dahab-divemaster/test.php

    Read the article

  • how to close popup using javascript with xml formatting

    - by Michael Robinson
    I bought this program that created a pretty nice imageuploader flash script however I can't get the Javascript function close window to close the popup and redirect the original page. here is the XML piece that defines the url's: <urls urlToUpload="upload.php?" urlOnUploadSuccess="http://www.home.com/purchase.html" urlOnUploadFail="http://www.home.com/tryagain.html" urlUpdateFlashPlayer="http://www.home.com/flashalternative.html" jsFunctionNameOnUpload=""/> This last line calls a javascript function on upload. The problem is I don't know what to call and where to put it. Here is the HTML file that is the popup: <HEAD> <title>Baublet Uploader</title> <script type="text/javascript" src="swfobject.js"></script> </HEAD> <BODY> <!-- Q-ImageUploader www.quadroland.com --> <div id="QImageUploader"> Flash Player stuff here </div> <script type="text/javascript"> // <![CDATA[ var so = new SWFObject("q_image_uploader.swf", "imageuploader", "650", "430", "9", "#FFFFFF"); so.addParam("scale", "noscale"); so.addParam("salign", "TL"); so.addVariable("AdditionalStringVariable","pass additional data here"); so.write("QImageUploader"); // ]]> </script> I found this Closing script I thought might work: <script language="javascript"> function close_window(page) { window.opener.location.href=page setTimeout(function(){window.close()},10); } </script> Does this go into the Popup HTML page above or would it be a separate close.js file in the root? Thanks, I'm really confused.

    Read the article

  • Sortable clone helper not working

    - by Jeremy Seekamp
    Maybe I don't understand how clone works with sortable, but here is what I would like to do. When sorting an item I would like a clone of the item I am dragging remain until I stop drop the item in its new position. Here's the code: <html> <head> <script type="text/javascript" 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.8.2/jquery-ui.min.js"></script> <style type="text/css"> .sort { width: 150px; } .ui-state-highlight { background-color: #000; height:2px; } </style> </head> <body> <div> <ul class="sort"> <li>Item 1</li> <li>Item 2</li> <li>Item 3</li> <li>Item 4</li> </ul> </div> <script type="text/javascript"> $(function() { $('.sort').sortable({ helper: 'clone', placeholder: 'ui-state-highlight', opacity: '.5' }) }) </script> </body> </html> Thanks in advance for the help!

    Read the article

  • How to get Firebug to tell me what error jquery's .load() is returning?

    - by Edward Tanguay
    I'm trying to find out what data/error jquery's .load() method is returning in the following code (the #content element is blank so I assume there is some kind of error). Where do I find in Firebug what content or error .load() is returning? How can I use console.log to find out at least what content is being returned? <!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> <script type="text/javascript" src="http://www.google.com/jsapi"></script> <script type="text/javascript"> google.load("jquery", "1.3.2"); google.setOnLoadCallback(function() { $('#loadButton').click(loadDataFromExernalWebsite); }); function loadDataFromExernalWebsite() { console.log("test"); $('#content').load('http://www.tanguay.info/web/getdata/index.php?url=http://www.tanguay.info/knowsite/data.txt', function() { alert('Load was performed.'); }); } </script> </head> <body> <p>Click the button to load content:</p> <p id="content"></p> <input id="loadButton" type="button" value="load content"/> </body> </html>

    Read the article

  • Attempting to use CSS top property on a SWF file, but it's not working

    - by ben
    Hey guys, I'm trying to position my Flex app so that it's further down the page, but I can't get it working. It's still appearing in the top left. Here is the HTML, any help would be greatly appreciated! <html lang="en"> <head> <title>Page</title> <style type="text/css"> body { margin: 0px; overflow: hidden; } #swf {top:50%;} </style> <script src="http://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js"></script> <script type="text/javascript"> swfobject.embedSWF( "link_to_the_swf", "swf", "100%", "100%", "10.0.0", "playerProductInstall.swf", flashVars, params ); </script> </head> <body scroll="no"> <div id="swf"> <p>Alternative content</p> </div> </body> </html>

    Read the article

  • Functional way to get a matrix from text

    - by Elazar Leibovich
    I'm trying to solve some Google Code Jam problems, where an input matrix is typically given in this form: 2 3 #matrix dimensions 1 2 3 4 5 6 7 8 9 # all 3 elements in the first row 2 3 4 5 6 7 8 9 0 # each element is composed of three integers where each element of the matrix is composed of, say, three integers. So this example should be converted to #!scala Array( Array(A(1,2,3),A(4,5,6),A(7,8,9), Array(A(2,3,4),A(5,6,7),A(8,9,0), ) An imperative solution would be of the form #!python input = """2 3 1 2 3 4 5 6 7 8 9 2 3 4 5 6 7 8 9 0 """ lines = input.split('\n') print lines[0] m,n = (int(x) for x in lines[0].split()) array = [] row = [] A = [] for line in lines[1:]: for elt in line.split(): A.append(elt) if len(A)== 3: row.append(A) A = [] array.append(row) row = [] from pprint import pprint pprint(array) A functional solution I've thought of is #!scala def splitList[A](l:List[A],i:Int):List[List[A]] = { if (l.isEmpty) return List[List[A]]() val (head,tail) = l.splitAt(i) return head :: splitList(tail,i) } def readMatrix(src:Iterator[String]):Array[Array[TrafficLight]] = { val Array(x,y) = src.next.split(" +").map(_.trim.toInt) val mat = src.take(x).toList.map(_.split(" "). map(_.trim.toInt)). map(a => splitList(a.toList,3). map(b => TrafficLight(b(0),b(1),b(2)) ).toArray ).toArray return mat } But I really feel it's the wrong way to go because: I'm using the functional List structure for each line, and then convert it to an array. The whole code seems much less efficeint I find it longer less elegant and much less readable than the python solution. It is harder to which of the map functions operates on what, as they all use the same semantics. What is the right functional way to do that?

    Read the article

  • Javascript working in chrome but not in explorer

    - by Greg
    Hello, I am writing this code in 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> <script language="javascript" type="text/javascript"> function setVisibility(id, visibility) { document.getElementById(id).style.display = visibility; } </script> <title>Welcome to the memory game</title> </head> <body> <h1>Welcome to the memory game!</h1> <input type="button" name="type" value='Show Layer' onclick="setVisibility('sub3', 'inline');"/> <input type="button" name="type" value='Hide Layer' onclick="setVisibility('sub3', 'none');"/> <div id="sub3">Message Box</div> </body> </html> It suppose to make the "div" disappear and reapper, but it works in chrome and not in explorer. Anyone has any idea how can I make it work in explorer (I tried allowing blocked content when that message about activeX appears in explorer)? Thanks, Greg

    Read the article

  • Why can't I fade out this table row in IE using jQuery?

    - by George Edison
    I can't get the table row to fade out in IE. It works in Chrome, but not IE. It just becomes really 'light' and stays on the screen. I tried IE8 with and without compatibility mode. <html> <head> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript"> function hideIt() { $('#hideme').fadeTo("slow", 0.0); } </script> </head> <body> <table> <tr id='hideme'> <td>Hide me!</td> </tr> </table> <button onclick='hideIt();'>Hide</button> </body> </html> Is there a workaround/solution for a smooth fade?

    Read the article

  • create new db in mysql with php syntax

    - by Jacksta
    I am trying to create a new db called testDB2, below is my code. Once running the script all I am getting an error on line 7 Fatal error: Call to undefined function mysqlquery() in /home/admin/domains/domain.com.au/public_html/db_createdb.php on line 7 This is my code <? $sql = "CREATE database testDB2"; $connection = mysql_connect("localhost", "admin_user", "pass") or die(mysql_error()); $result = mysqlquery($sql, $connection) or die(mysql_error()); if ($result) { $msg = "<p>Databse has been created!</p>"; } ?> <HTML> <head> <title>Create MySQL database</title> </head> <body> <? echo "$msg"; ?> </body> </HTML>

    Read the article

  • change image use javascript DOM

    - by user289346
    <html> <head> <script type="text/javascript"> var curimage = "cottage_small.jpg"; var curtext = "View large image"; function changeSrc() { if (curtext == "View large image"||curimage == "cottage_small.jpg") { document.getElementById("boldStuff").innerHTML = "View small image"; curtext="View small image"; document.getElementById("myImage")= "cottage_large.jpg"; curimage = "cottage_large.jpg"; } else { document.getElementById("boldStuff").innerHTML = "View large image"; curtext = "View large image"; document.getElementById("myImage")= "cottage_small.jpg"; curimage = "cottage_small.jpg"; } } </script> </head> <body> <!-- Your page here --> <h1> Pink Knoll Properties</h1> <h2> Single Family Homes</h2> <p> Cottage:<strong>$149,000</strong><br/> 2 bed, 1 bath, 1,189 square feet, 1.11 acres <br/><br/> <a href="#" onclick="changeSrc()"><b id="boldStuff" />View large image</a> </p> <p><img id="myImage" src="cottage_small.jpg" alt="Photo of a cottage" /></p> </body> </html> This is my coding I need to change the image and text the same time when I click it. I use LTS, it shows the line document.getElementById("myImage")= "cottage_large.jpg"; is a wrong number of arquments or invalid property assigment. Dose someone can help? Bianca

    Read the article

  • IE 6 bug? width: 987

    - by William
    I'm having a very weird issue in IE6. If I set a div container do the width of 987px it adds a spacing between the container and an absolute positioned element inside. Any other width works fine, it's just 987. Is there something I'm not seeing? Code to reproduce: <!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" xml:lang="en" lang="en"> <head> <title>IE6 Issue</title> <style type="text/css"> body { background-color: #000; } #c1 { width: 987px; background-color: #fff; } #c2 { border: #f00 1px solid; zoom: 1; position: relative; } #tl, #tr { background-color: #000; font-size: 0; line-height: 0; position: absolute; top: 0px; left: 0px; width: 4px; height: 6px; } #tr { left: auto; right: 0; } </style> </head> <body> <div id="c1"><div id="c2"><div id="tl"></div><div id="tr"></div>a</div> </div> </body> This is crazy.

    Read the article

  • CSS / jQuery Vertically and Horizontally Center DIV

    - by aherrick
    I'm trying to vertically and horizontally center this div even when there is content to scroll and the user is scrolling down the page. The following test works fine in IE, but in Firefox I get a weird flickering affect when hovering over the thumbnail image. Any thoughts? <html> <head> <title>aj</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() { // img preview $('.img').hover(function() { if (!$('#overlay').length) { $('<div id="overlay"/>').css({ position: 'fixed', top: 0, left: 0, width: '100%', zIndex: 100, height: $(window).height() + 'px' }).appendTo('body'); $('<div id="item" />').css({ border: '7px solid #999', height: '500px', width: '500px', top: '50%', left: '50%', position: 'absolute', marginTop: '-250px', marginLeft: '-250px' }).append('<img src="' + $(this).attr('rel') + '" alt="img" />').appendTo('#overlay'); } }, function() { $('#overlay').remove(); }); }); </script> </head> <body> <img class="img" src="http://ajondeck.net/temp/paperboy_thumb.gif" rel="http://ajondeck.net/temp/paperboy.gif" alt="image" /> </body> </html>

    Read the article

  • Why can't upload three files with FileUpload ?

    - by Valter Henrique
    Hi everyone, i'm trying to upload three images to my server, is working, but upload always the last file selected by the user, not the three selected. Here's my code: protected void doPost(HttpServletRequest request, HttpServletResponse response){ boolean multipart = ServletFileUpload.isMultipartContent(request); if (multipart) { DiskFileItemFactory fileItemFactory = new DiskFileItemFactory(); fileItemFactory.setSizeThreshold(5 * 1024 * 1024); //5 MB fileItemFactory.setRepository(tmpDir); ServletFileUpload uploadHandler = new ServletFileUpload(fileItemFactory); try { List items = uploadHandler.parseRequest(request); Iterator itr = items.iterator(); while (itr.hasNext()) { FileItem item = (FileItem) itr.next(); File file = new File(dir, generateNewName()); item.write(file); } } catch (FileUploadException ex) { } catch (Exception ex) { } } } -- UPDATE: <html> <head> <title>Upload</title> </head> <body> <form action="Upload" method="post" enctype="multipart/form-data"> <input type="file" name="file1" /> <br /> <input type="file" name="file2" /> <br /> <input type="file" name="file3" /> <br /> <input type="submit" value="Enviar" /> </form> </body> </html> Best regards, Valter Henrique.

    Read the article

< Previous Page | 50 51 52 53 54 55 56 57 58 59 60 61  | Next Page >