1,330 Posted Topics

Member Avatar for FlashCreations

Where it comes to centre alignment, IE is pretty intuitive but the others, whilst probably more stadards compliant, aren't. When all else fails, to center align a block element hoizontally, try the following CSS: [CODE]#whatever { width:200px; margin-left:50%; position:relative; left:-100px; }[/CODE] By making the left exactly -0.5 of the width, …

Member Avatar for Airshow
0
160
Member Avatar for HelenLF

Helen, Case sensitivity of filenames is a server issue, and there's nothing you can do in the HTML other than use the right case for every filename you wish to your users to see. Realistically, the measures you can take are twofold (and you should do both): [LIST=1][*]Rename all the …

Member Avatar for Josh Connerty
0
89
Member Avatar for adaykin

Adaykin, Original code didn't run in IE6. Would neither add nor delete. Part of the reason is that IE needs [ICODE]thead[/ICODE] or [ICODE]tbody[/ICODE] elements within a table to make rows addressable. IE also didn't like [ICODE]table.innerHTML = '';[/ICODE] This may also affect other browsers (not tested). Solution: Remove id from …

Member Avatar for adaykin
0
221
Member Avatar for thecodingbee

Thecodingbee, As I'm sure you realise, you need to store all user configuration settings somewhere - the question is where? You could use a cookie, which would tie a particular user configuration to a particular computer/logon. Not particularly useful for many people. The other main option is to store settings …

Member Avatar for diafol
0
118
Member Avatar for bwbwings

I'm struggling to understand. What interface are the users expected to use when editing these multiple-choice questions? As far as I can see, it must be a text editor, as a thin-client (browser) interface would not (without server-side scripting) allow the edited file to be saved anywhere other than in …

Member Avatar for Airshow
0
110
Member Avatar for sean_khan

I've been having a go at this one too. Persistent errors in IE made it rather tough but I think I'm on top of them now. Try this, it seems reliable in IE6 and FF 3.0.10. It's basically Itsjareds code with a bit of heavy refactoring into a namespace, plus …

Member Avatar for Airshow
0
360
Member Avatar for SKANK!!!!!

Skank, Suggestions: [LIST=1] [*]There's a reasonable chance that @font-face is not supported by your browser. [*]Avoid naming your font "italic". [*]text-decoration:italic; will have no effect. "italic is not a valid option for text-decoration". [*]Are you sure that you created a truetype font? [/LIST] [B]Airshow[/B]

Member Avatar for Airshow
0
114
Member Avatar for jimmiller96

Yup that's pretty well how I would do it. If you name the two hidden fields "action" and "actionValue" then you have a flexible system for instructing the server-side code what to do. If necessary, multiple values can be passed in the single "actionValue" field by using suitable delimiters, eg. …

Member Avatar for jimmiller96
0
146
Member Avatar for m-hrt

m-hrt, Try this. It validates name, card number and date fields so it's a bit more than you asked for. From this you should be able to see how client-side form validation works. The main parts of the trick are to attach the validate() function as the form's onsubmit handler …

Member Avatar for m-hrt
0
2K
Member Avatar for SKANK!!!!!

It's quite simple. You need to learn how to return true/false from event handlers in order to determine whether natural HTML actions are performed or not. Write your checking function(s) to return false for each error condition, and true (typically at the very botttom of the function) if no error …

Member Avatar for SKANK!!!!!
0
154
Member Avatar for Arumugams
Member Avatar for Airshow
0
156
Member Avatar for ficus

Ficus, Try these changes (everything else stays the same). Can't test without turning on The Terminator, my dev machine, so will probably still need debugging but you should get the gist of it. Notes [LIST][*]I have hard-coded 'cat1' in checkNew(). There's no need to send it to the server and …

Member Avatar for Airshow
0
296
Member Avatar for yehtech

[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>Airshow :: Highlight words</title> <style type="text/css"> #para { margin:0 0 012px 0; width:400px; padding:10px; border:1px solid #999999; font-family:vaerdana,arial; font-size:11pt; } .highlight { background-color:yellow; } </style> <script> function highlightText(){ var p = document.getElementById('para');//Get the text div var r = document.getElementById('readingRate');//Get the …

Member Avatar for Airshow
0
90
Member Avatar for Potato.Head

P.H, I think you need [I]SoundManager 2[/I] (or similar). This is an set of javascript functions that provide, uner a BSD license, a cross-browser API for controlling mp3 and swf-embedded sound. Google [I]SoundManager[/I] and you should find it. [B]Airshow[/B]

Member Avatar for Airshow
0
98
Member Avatar for MattTheHat

Matt, It's about 8 years since I did anything like this so please forgive me for not recalling every detail. I was responsible for the javascript side of things while somone else created the swf. As in your problem we had to pass through a flash-click to the js and …

Member Avatar for MattTheHat
0
174
Member Avatar for powermxpx

Powermxpx, You will undoubtedly find snippets here and there to help, and if you're lucky you may find a tutoral with a worked example doing something similar. However, I expect you will pretty well have to build the application yourself from the ground up. And remember, you will need to …

Member Avatar for SKANK!!!!!
0
141
Member Avatar for coolmind259

If I understand correctly, then either: [LIST=1][*]If you can, then use location.reload() as per Essential's suggestion, after receiving the response from your Ajax request, but be aware that location.reload() works as follows (from Danny Goodman: [I]Dynamica HTML[/I]: O'Reilly): [INDENT]"[B]reload([unconditional])[/B] "Performs a hard reload of the document associated with the location …

Member Avatar for Airshow
0
271
Member Avatar for learnerasp

Learnerasp, Style your div with [ICODE]position:absolute; display:none;[/ICODE] then show/hide it in javascript with: [ICODE]divObj.display = 'block';[/ICODE] [ICODE]divObj.display = 'none';[/ICODE] where [ICODE]divObj[/ICODE] is the DOM reference to the div in question (use eg. document.getElementById(id) to discover it). [B]Airshow[/B]

Member Avatar for Airshow
0
172
Member Avatar for ganmo

[URL="http://www.crockford.com/javascript/private.html"]Public, Private, Privileged[/URL] - learn from Douglas, the master. [B]Airshow[/B]

Member Avatar for Airshow
0
111
Member Avatar for Harutyun

Harutyun, First thoughts are : [LIST=1][*]Use the stasts pack(s) provided on your host server. These should allow you to see which of your pages have been visited (by day, month, year, browser variant, colour of your cat etc. etc), and where visitors exit to (ie pages on other domains hyperlinked …

Member Avatar for Airshow
0
145
Member Avatar for dexeloper

Dexeloper, I have had no end of problems getting block element alignment successfully under control in all browsers. Most reliable:IE (though probably not stds-compliant), most stubborn:Opera (which probably is). When all else fails try this technique: [CODE]table.myClass { width:250px; margin-left:50%; position:relative; left:-125px; }[/CODE] By making the left offset exactly -0.5 …

Member Avatar for dexeloper
0
90
Member Avatar for vidhyaponnusamy

Vidhyaponnusamy, If I understand correctly, you want to make the calculated value of time+1hr available to other scripts (ie. pages), not just to the page on which the calculation is made. If this is the case, then there are several ways: 1. Set a session variable (stored server-side for the …

Member Avatar for diafol
0
100
Member Avatar for veledrom

Veledrom, No question marks here. Are you sure that's the full URL? [B]Airshow[/B]

Member Avatar for veledrom
0
116
Member Avatar for rowads80

Refactoring Henry's code into a more familiar pattern (and building in a bit of flexibility), we get this: <script language="JavaScript" type="text/javascript"> var randomImage = function(){ var elementos = []; return { add : function(src, texto, url, targ, ancho){ elementos.push({src:src, texto:texto, url:url, targ:targ, ancho:ancho}); }, setElemIDs : function(linkID, imgID, captionID){ this.linkElem …

Member Avatar for JugglerDrummer
0
167
Member Avatar for Lib Auth

Lib Auth, Nice effect. You can use CSS to style the menu differently if that's what you want. You can't avoid Javascript for the animation and why would you want to? .... it's developed and working. [B]Airshow[/B]

Member Avatar for Airshow
0
102
Member Avatar for RonaldDuncan

Ronald, Agreed, XSLT is pretty unfriendly. I go there as little as possible. This is a good review is php templates: [url]http://codeutopia.net/blog/2007/11/05/different-php-template-engines/[/url] Smarty seems to be everybody's benchmark. Would require a major shift to server-side of course, but maybe a move worth making. Personally, my favourite is the phpBB template …

Member Avatar for RonaldDuncan
0
85
Member Avatar for billymcguffin

Billy, [QUOTE=billymcguffin;869599]i was wondering if there is a way to make it so that each string has its own wait time till the next string starts appearing, so that they dont all go away after the single set time.[/QUOTE] You could do something like this: [CODE]var messages = [ {m:"Hello", …

Member Avatar for billymcguffin
0
89
Member Avatar for odysea

As ardav says, use [ICODE]id[/ICODE] not [ICODE]name[/ICODE], plus you might like to reverse the order of the two sql blocks such that the menu can be rebuilt with row deleted, and displayed back to you with a confirmatory message. Something like this maybe (not tested): [CODE]<?php include 'cms/core/config.php'; include 'cms/core/opendb.php'; …

Member Avatar for odysea
0
96
Member Avatar for billymcguffin

Billymcguffin, Or are you trying to parse out a particular [I]name=value[/I] pair from a querystring? ie. the part of the URL to the right of the [ICODE]?[/ICODE]. [B]Airshow[/B]

Member Avatar for Airshow
0
564
Member Avatar for sgweaver

[QUOTE=ardav;868271]I should point out that this is a real pain if you are using 'localhost/mysite/' for local testing. For this, your html directory will be '/mysite/' instead of the usual remote server '/'. I use Dreamweaver/XAMPP and hit this problem time after time. I still don't know how to work …

Member Avatar for diafol
0
204
Member Avatar for midnightdesire

Midnightdesire, [QUOTE=midnightdesire;868453]The problem is that when the information is submitted, the items are coming up with the names, not the label from the form.[/QUOTE] That's the way forms work. $_POST (or $_GET depending on the form's [I]method[/I]) is an associative array indexed by the [I]names[/I] of the elements in the …

Member Avatar for Airshow
0
99
Member Avatar for suresure88

Suresure, There are a couple of things going on here: a. <body onLoad="setTimeout('getMouseXY(e)', 3000)"> This is guaranteed to generate a javascript error 3 seconds after page load. Solution: Delete the onload, it is not required. b. On page load, (deltaX,deltaY) jump from (0,0) to (mouseX,mouseY). If the mouse is to …

Member Avatar for suresure88
0
164
Member Avatar for millsy007

Millsy, You just reinvented something called a Sprite! Put your adidas shoes image (shoes.jpg) in a folder named "images", then save the following code as eg. "myProduct.html", then browse it in your browser. [CODE]<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <title>Untitled</title> <style type="text/css"> #productImg div { margin:6px …

Member Avatar for millsy007
0
193
Member Avatar for Ries

Ries, To be rid of your white border, you need to ensure that the page margin is reduced to zero. Try adding to your CSS: [CODE]body { margin:0; }[/CODE] You will then typically want to add some CSS [ICODE]padding[/ICODE] to your divs' to prevent their content abutting the edge of …

Member Avatar for almostbob
0
83
Member Avatar for pluMmet

PluMmet, You're unlikely to find [I]exactly[/I] what you want off the shelf but the good news is that the major players in forum software (phpBB, phpNuke, vBulletin, yaBB and others) offer their code open source. That means you can tailor it to your own design. It's not always easy but …

Member Avatar for Airshow
0
62
Member Avatar for revata

Revata, I'd recommend route 'B'. Redisign your pages to serve them complete with header and footer each time. Many many sites do this and the overhead is generally minimal because (a) any graphical content (jpegs/gifs/pngs) is cached by all modern browsers and (b) the text component (which [I]will[/I] be reserved) …

Member Avatar for Airshow
0
75
Member Avatar for lifeworks

Lifeworks, Simple solution is to avoid iFrames, but I understand that they can be useful. You might get some joy by exploring CSS @media rules. These allow you to specify eg. different font size (or face or colour, paragraph margins etc.) for printing as opposed to on-screen. [B]Airshow[/B]

Member Avatar for Airshow
0
62
Member Avatar for SteveKubrick

Steve, Div wrappers are actually unnecessary because UL is already a block element. 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> <title>Site</title> <style type="text/css"> #mainNav{ list-style: none; margin: 0px; padding: 0px; text-align: center; border: 1px solid #000000; background-color: #e0e0e0; } #mainNav li { display: inline; border:0 …

Member Avatar for !!underlink!!
0
87
Member Avatar for sunilsinha

[QUOTE=sunilsinha;864838]I need to indent text of textarea control with either bullets or numbers[/QUOTE] Maybe you just want a scrolling area containing a bulleted list. If so, then try this approach: [CODE]<div style="overflow:auto; width:200px; height:70px; border:1px solid; font-size:10pt;"> <p style="margin:0 0 3px 0; font-weight:bold;">Trees</p> <ul style="margin:0 20px; padding:0;"> <li>Abies Grandis</li> <li>Chamaecyparis …

Member Avatar for Airshow
0
115
Member Avatar for dpatz

Dpatz, Looked around and the consensus seems to be that IE won't play ball with dynamically changing an INPUT field's type. The standard(?) solution appears to be to swap out a [I]faux[/I] (text) field for the real (password) field, somthing like this: [CODE][B]Javascript[/B] <script type="text/javascript"> function onFocusHandler_p(fld){ fld.style.display = 'none'; …

Member Avatar for dpatz
0
255
Member Avatar for Rakesh Nagekar

Rakesh, Consultancy not code, I'm afraid ...... [I]Check-as-you-go[/I] can be necessary under some circumstances; in particular if features of your page (including the form itself) need to adapt in response to user values or selections. However, most forms can be checked on submission. By adopting a [I]check-on-submission[/I] strategy, you will …

Member Avatar for Airshow
0
132
Member Avatar for JooClops

Hi JooClops, With this version you can choose whether the test is case-sensitive or case-insensitive and it also returns a proper boolean (not -1 | index): [CODE]<script language="JavaScript" type="text/javascript"> //old English expression: "It's like trying to find a needle in a haystack" function string_contains(haystack, needle, caseInsensitive){ if(needle.toString() === '') { …

Member Avatar for JooClops
0
190
Member Avatar for odysea

Odysea, Templating is complex enough for most php programmers to use a 3rd party class/suite for the job. In such suites, much of the hard work has been done for you. Instead, all you have to do is install and learn how to drive them! Here's an (old) discussion - …

Member Avatar for odysea
0
239
Member Avatar for theimben

Hi Essential, Would it be fair to point out that, in addition to images defined in CSS not being catered for, that your (very neat) preloader would also not handle images whose URLs are computed (or looked up) in response to future events after page load? In other words, as …

Member Avatar for essential
0
300
Member Avatar for FisherGraphics

I'm not completely sure I understand but this is my interpretation: [LIST][*]Two windows; MainWin and PopupWin. [*]MainWin contains a number of links, which when clicked cause an image to be displayed in PopupWin. [*]PopupWin is opened if not already open, otherwise it is reused.[/LIST] If this is the case, then …

Member Avatar for FisherGraphics
0
172
Member Avatar for chaituu

Chaituu, The easiest (and arguably the most reliable) approach is not to allow your 1st page to be destroyed. You can do this by opening 2nd page in either a popup window or within a iframe on the same page. Otherwise, the solution depends on how the user returns to …

Member Avatar for Airshow
0
99
Member Avatar for raghuprasad
Member Avatar for qavo

Qavo, You can write a [I]single[/I] function and attach it as the handler for onsteadystatechange to different instances of XMLHttpRequest. Inside the handler, refer back to the instance of XMLHttpRequest that fired it with [ICODE]this[/ICODE]. See [url]http://www.w3.org/TR/XMLHttpRequest/[/url] Of course, if you need to do very different things onsteadystatechange in each …

Member Avatar for Airshow
0
167
Member Avatar for sunilsinha

Sunilsinha, If I understand correctly, what you want is beyond the current capability of HTML/CSS. From what I have read (briefly), [I]write-mode[/I] may do what you want but is currently poorly supported (if at all). For static content, then you could create four images (in eg Photoshop) one for each …

Member Avatar for Airshow
0
154
Member Avatar for mimoDsg

MimoDsg, Try this. I had to rearrange the code a bit but it should do what you want now: [CODE]function validacion_contenidos(palabra) { if(palabra.length >= 4){ //dw("palabra valida"); for(var j=0; j<palabra.length; j++){ letra = palabra.charCodeAt(j); //dw(letra); if(letra < 65 || (letra > 90 && letra < 97) || letra > 122) …

Member Avatar for Airshow
0
85

The End.