1,330 Posted Topics
Re: Jasystweb, How did you discover the inserted DIV tags; View Source or by inspecting the DOM? [QUOTE=AOlevel1;1153783]IE could be seeing extra child nodes from white space and not traversing the DOM as you intend.[/QUOTE] Surely it's Moz browsers (notably FF) that suffer from seeing white space and not behaving as … | |
![]() | Re: freggel2, You need to style the document(s) that appear in the iframe with a black background, rather than the iframe itself. [B]Airshow[/B] |
Re: Albertkao, All your checkboxes have the same name ("checkboxChoice") and all your hidden fields have the same name ("checkboxvalue"). Browser behaviour is undefined (and therefore unpredictable) when form element names are dulpicated (except for radio buttons formed into mutually exclusive groups by giving all members of the group the same … | |
Re: Styles_p, This is more of an ASP.NET question than Javascript/DHTML/AJAX. I think you will find that most folks who monitor this section (myself included), won't have a clue about ASP.NET. As far as I can tell, you can't mix and match raw html with asp: controls. They appear to be … | |
Re: Gunnarflax, Most object-oriented languages have Classes; reusable blocks of code which define a named collection of properties and methods. Once a Class is defined, one or more instances thereof can be created with a code statement, typically of the form [ICODE]foo = new Bar(param1, param2 ....)[/ICODE];, where [ICODE]Bar[/ICODE] is the … | |
Re: HTML/Javascript has no universal native support for drag & drop so you need to either write your own drag & drop functions (not recommended) or use a javascript productivity suite such as jQuery/Prototype/MooTools. With a bit of luck you will find a worked example somewhere on the web to do … | |
Re: Easiest way is probably to insert a test into the mouseover handler(s) such that they return immediately when the popup is displayed, without performing their normal action. For example: [CODE]function mouseOverHandler(){ var popup = document.getElementById('popup'); if(popup && popup.style.display == 'block') { return; } // ............... // normal action // ............... … | |
Re: You probably want to use jQuery's [URL="http://api.jquery.com/serializeArray/"].serializeArray()[/URL] method. The examples in the API should be enough to get you started. [B]Airshow[/B] | |
Re: I can't debug this but I can help you to do so. What you need is a debug strategy. The way I would do it is as follows: [LIST=1] [*]Browse the page [*]View source, select all, copy then paste into a new document. [*]Save as "debug.html" [*]Inspect the javascriopt & … | |
Re: Aha, that won't work because [ICODE]name[i] = this.value;[/ICODE] will use the vlue of [ICODE]i[/ICODE] at the time of execution of the anonymouis function, not the value at the time the function is created. There's a number of ways round this. If you have time, read [URL="http://www.jibbering.com/faq/faq_notes/closures.html"]this[/URL], in particular the examples … | |
Re: [QUOTE=alipica;1149922]When I click from my homepage to the portfolio page is when it loads the content twice. Let me know if you need more info. I still have no clue what's happening! I've googled everything I could think of...[/QUOTE] Hard to say why it does that double load thing. I … | |
Re: It is a tribute to FF's tollerance to bad HTML that MyrtleTurtle got this to run without modification. [LIST] [*]<body> tag : missing > [*]onLoad attribute in <body> tag : missing " [*]<table> tag : not closed, missing </table> [/LIST] Also, those old MM_ functions are really looking their age … | |
Re: Mmmmm, HTML 5. Possibly OK for [U]intranet[/U] apps where you have knowledge of every browser in use but not yet for general internet deployment. Read [URL="http://www.nczonline.net/blog/2009/07/21/introduction-to-sessionstorage/"]here[/URL] for a reasonable discussion. [B]Airshow[/B] | |
Re: Before you do anything else, replace those “angled quotes” in the css with "straight'ns". [B]Airshow[/B] | |
Re: I don't know how tablekit's sort function works but I can make a shrewd guess that it is initialised with the id/class of the relevant table(s), and thereafter uses Javascript reference(s) to the corresponding DOM element(s) (probably stored in a closure). Your first AJAX blitz the original DOM elements (everything … | |
Re: For ideas try [URL="www.csszengarden.com"]www.csszengarden.com[/URL]. [B]Airshow[/B] | |
Re: The probelm could be something to do with [CODE] //GET - user submitted data using AJAX //POST - in case user does not support javascript, we'll use POST instead[/CODE] which is followed by a block that handles $_POST but not $_GET. Therefore if your web page submits via GET method, … | |
Re: [QUOTE=blur_guava;1145550]... I want the user to be able to click on an "X" beside every File Upload control, so that it will close those unnecessary (or unused) FIle Upload controls.[/QUOTE] You could do that but what about the case where a user opens more controls than he uses and fails … | |
Re: I think you will find that $_COOKIE, $_POST and $_GET (and others?) are not super-globals, therefore you must put [ICODE]global $_COOKIE;[/ICODE] inside functions (which have their own scope). [B]Airshow[/B] | |
Re: Because the event handler [ICODE]onChange="showCustomer6(document.myform1.project.value)"[/ICODE] is specified within the <select name="project"> tag you can simplify it to [ICODE]onChange="showCustomer6(this.value)"[/ICODE]. However, it seems more likely that your problem is caused by non-inclusion of the js file containing function showCustomer6(){...}. Is the path to the .js file correct in the tag [ICODE]<script ... … | |
Re: [QUOTE=Mike516;1144408]... executing a query in javascript...[/QUOTE] If you mean an SQL query then it will typically be performed server-side. I can't think of a context in which Javascript would be used to perform an SQL query though Javascript could initiate such a query via Ajax (or possibly ActiveX) and receive … | |
Re: Given that the Ajax call might fail, you presumably want to set the checkmark to green only when the Ajax call has signalled that it has successfully completed. So I think what you need is to pass [ICODE]this[/ICODE] (as an additional parameter) into PutParam(), such that PutParam() knows which DOM … | |
Re: When I wrote a JavaScript card game several years ago, I came to the rapid conclusion that the only realistic way to manage it was to have constructor functions for Game, Pack, Suit, Stack, Card, with (multiple) instances of each. Internally, each instance: a) cross-referred to other instances by means … | |
Re: ZM, You need to give your page a doctype statement - right at the top. Any of these works for me (in IE 6): [CODE]<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"--> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <!DOCTYPE html PUBLIC … | |
Re: JRW, In javascript [ICODE]function x(){...}[/ICODE] and [ICODE]var x = function(){...}[/ICODE] do exactly the same thing - namely define a function named x. From this, you will see that your second use of "compatibilityCheck" overwrites the first (without throwig an error). Your code makes a good a attempt at defining a … | |
Re: VG, I think you will have to post some code before anyone can say what is wrong with it. [B]Airshow[/B] | |
Re: In a stylesheet, urls are relative to the sheet itself, not to the html page on which the sheet is incuded. This allows a single stylesheet to be valid for inclusion on html pages in directories at any level. If "style sheet file is in the APP_THEMES folder and images … | |
Re: Jagadeshms, I would suspect [ICODE]document.getElementsByName()[/ICODE]. I confess I've never used it and as far as I can recall, it doesn't get a mention in my DOM reference book (I'm currently away from home), and though it is in a W3C recommendation, I can't get it to work (not even in … | |
Re: Pop up marketing is about as unfriendly as it gets, which is why most users have a pop-up blocker installed. This is not the way to go either for you or your visitors. I think you should find a more more modern way to do it. [B]Airshow[/B] | |
Re: Jino, I'm not sure that jquery will handle this but there's a simple workaround based on the ability of HTML/DOM elements to have more than one class. So arrange for all the relevant divs to have an additional class name, eg. [ICODE]<div class="msg_body msg_body_3">[/ICODE] then select with [ICODE]$(".msg_body")[/ICODE]. That should … | |
Re: Kelvin, Both JS and HTML can be be simplified considerably by looping, firstly to build the questions table, then to scan it when the "Update" button is pressed. [CODE=html] <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <title>survey2</title> <style> body, td { font-family:arial; } #questions_table { } #questions_table … | |
Re: The RSS specification includes a Time To Live (<ttl>) element, which is an optional sub-element of <channel>, indicating the time in minutes that "a channel can be cached before refreshing from the source". This is the best clue you have as to the period your FF extension should use between … | |
Re: Lifeworks, In Javascript, you can indeed pass a function, both as an argument or as a returned result. This is because Javascript functions are "first-class objects" (see [URL="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Functions"]here[/URL] for example). A more typical ajax caller might look something like this: [CODE]function ajaxCall(url, successFn, failFn) { var httpRequest = GetXmlHttpObject(); if(!httpRequest) … | |
Re: Grungina, Could be something to do with [ICODE]body's padding:5em 0 0;[/ICODE]? Pleased to see someone using a sprite. Great technique. [B]Airshow[/B] | |
Re: Newto, If you rephrase your code as follows (without actually changing anything), then you can see that only [ICODE]visa[/ICODE] gets attached. [ICODE]dolj[/ICODE] is never attached and never called. [CODE]function borja(){ var vanster = document.getElementsByTagName("h2"); for (i=0; i<vanster.length; i++){ vanster[i].nextSibling.nextSibling.className = "osynlig"; vanster[i].onclick = (vanster[i].nextSibling.nextSibling.className=="osynlig") ? visa : dolj; } } … | |
Re: Tekkno, The code can be made much simpler by framing the whole thing inside one function, for example an anonymous window.onload function, like this: [CODE=javascript] var $ = function(id){ return (document.getElementById) ? document.getElementById(id) : (document.all) ? document.all[id] : (document.layers) ? document.layers[id] : (window.opera) ? window.opera[id] : null; } window.onload = … | |
Re: CFrog, First thing to check is that your document(s) have a valid doctype: For HTML: [CODE]<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">[/CODE] For XHTML: [CODE]<!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 XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">[/CODE] If in … | |
Re: Pradeepktg, Use [ICODE]parentNode[/ICODE] rather than [ICODE]parentElement[/ICODE]. This will work in both browsers without needing to branch. [B]Airshow[/B] | |
Re: There is a number of ways to do this. Here are a couple: Rule based (prepend "big_"): [CODE=javascript] function visa(){ var imgUrlArray = this.src.split('/'); imgUrlArray[imgUrlArray.length-1] = 'big_' + imgUrlArray[imgUrlArray.length-1]; open(imgUrlArray.join('/')); } [/CODE] Non rule based, with large image url coded as a custom attribute of the img tag: [CODE=javascript] function … | |
Re: HST, Like all things javascript, there are many ways to do this. Here's one (below). I'm pretty sure it's is not fully working but certainly offers a framework for monitoring multiple files. [CODE] <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <style type="text/css"> .fNameDiv { margin: 10px 0 … | |
Re: [link] .... What game of hangman? All I get is advertising with more advertising in a popup!!!! No game. [B]Airshow[/B] | |
Re: Unfortunately, you have to loop to pick up the checked value from a radio group. AFAIK, there's no convenient method as for select menus. Try this: [CODE] <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>MVC Student Information System - Search</title> <script type="text/javascript"> function … | |
Re: There's so much code there, I can't really work out what you are trying to do. Can you provide more explanation please and/or a complete page (as far as you have developed it). [B]Airshow[/B] | |
Re: Steven, That's 339 lines of javascript. How is anyone supposed to know why, where or how to add ajax-loader.gif to it with such a rudimentary introduction? [B]Airshow[/B] | |
Re: What Bob says, plus ...... Typically, registration validation emails are in plain text and include a hyperlink which is displayed in a clickable form by most modern email clients (some of which may allow this feature to be turned off). No Javascript is necessary. The hyperlink will contain all the … | |
Re: To inspect the data, you could do something like this: [CODE] <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <title>Airshow :: Untitled</title> <style type="text/css"> {} </style> <script> function viewData(dataString, headingsArray, containerID){ //Prepare the data var dataArray = dataString.split(";"); for(var i=0; i<dataArray.length; i++){ dataArray[i] = dataArray[i].split(','); } //Create Table … | |
Re: [ICODE]<body onload="initPhotoShow("<?php $inStr=$_GET['showName']; echo $showName; ?>")">[/ICODE] looks very suspicious. What does the served version of this line look like? [B]Airshow[/B] | |
Re: Mapper, Your onerror handler does nothing more than return (into a big void) the url of your default image. A return from a function attached as an event handler is completely meaningless because there's nothing (other than inaccessible native code) to receive the returned value. No error is thrown to … | |
Re: Rouse, Please, STOP CODING AND DO SOME READING - for about a day. You need to look at the jquery documentation and some examples. In particular you need to learn how to frame your code in a structure of the form: [CODE=javascript]$(document).ready(function() { // put all your jQuery goodness in … | |
Re: Eantz, Sorry, I'm not sure I fully understand but here's my best guess ..... [ICODE]alert[/ICODE] is a native javascript function and as such doesn't have a [ICODE]title[/ICODE] (as do some HTML elements). The appearance/format of a javascript alert popup is browser-dependant and is not under programmatic control (except for the … |
The End.