518 Posted Topics

Member Avatar for ErlendHL

Hi, here's a simple demo that will help you to accomplish your task. this demo comes with 2 documents: [b]test.php[/b] [code]<?php echo '<?xml version="1.0" encoding="UTF-8" standalone="no"?>'; ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://w3.org/TR/xhtm1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <meta http-equiv="X-UA-Compatible" content="EmulateIE6" /> <meta http-equiv="Pragma" content="no-cache" /> <meta http-equiv="Cache-Control" content="no-cache" …

Member Avatar for danishanila
0
569
Member Avatar for Ryujin

Hi, you could also try this: [CODE]<?xml version="1.0" encoding="UTF-8" standalone="no"?> <!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-US"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta http-equiv="Conent-Style-Type" content="text/css" /> <meta http-equiv="Content-Script-Type" content="text/javascript" /> <title>www.daniweb.com [ JS character counter to 'double' certain characters? ]</title> <script type="text/javascript"> // <![CDATA[ var …

Member Avatar for Ryujin
0
388
Member Avatar for SKANK!!!!!

Hi, [B]AJAX[/B] is not necessary for this type operation, here's a simple code that demonstrate on you perform such task: [CODE]<?xml version="1.0" encoding="UTF-8" standalone="no"?> <!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-US"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta http-equiv="Conent-Style-Type" content="text/css" /> <meta http-equiv="Content-Script-Type" content="text/javascript" /> <title>JavaScript …

Member Avatar for essential
0
155
Member Avatar for leroi green

Here's a simple demo to help you get, things done. This is tested in ie5+, ff3+ and Op8+. Here's the code for the main page: [code=javascript]<?xml version="1.0" encoding="utf-8"?> <?xml-stylesheet type="text/css" href="#internal-style"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html id="xhtml10" xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="X-UA-Compatible" content="IE=5; IE=EmulateIE7; IE=8" …

Member Avatar for memaddy
0
683
Member Avatar for ryan311

Hi, here's a short bit of example on how you would be able to clear those field values: [CODE]<html> <head> <title>Live Help</title> <script type="text/javascript"> <!-- var clearFields = function() { var form = document.getElementById("registerForm") || document.forms.registerForm; var elem = { 0 : "First_name", 1 : "Last_name", 2 : "Username", 3 …

Member Avatar for Troy III
0
159
Member Avatar for servis

Hi servis, you could try this [url=http://www.daniweb.com/forums/thread259141.html][B]thread[/B][/url] and see how I made an [B]AJAX[/B] call via the onsubmit handler. hope it helps you...

Member Avatar for Graphix
0
2K
Member Avatar for ulrik04

This should work! Instead of ( [b]readAttribute[/b] ) / simply replace it with the ( [color=red]getAttribute[/color] ). [code]window.location.hash = $(Event.element(e)).[color=red]getAttribute[/color]('href'); new Ajax.Updater('main', $(Event.element(e)).[color=red]getAttribute[/color]('href'), {method: 'post' }[/code]

Member Avatar for pcmaniac
0
107
Member Avatar for Pleasant Day

From the [b]showQuotation()[/b] function, replace it with the following format: [code]function showQuotation() { document.write( "<b>" + Quotation[whichQuotation] + "</b>" ); }[/code]

Member Avatar for yehawdude
0
155
Member Avatar for arvindikchari

Try this code: [code=javascript]<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta http-equiv="Content-Script-Type" content="text/javascript"> <title>Populating text field</title> <script type="text/javascript"> <!-- function textFill(ref, data) { var ua = (document.all) ? document.all[ref] : document.layers[ref]; try { if ( ua ) { ua.value = data; } …

Member Avatar for augie804
0
4K
Member Avatar for Terry56

Hi, you can try this: [code]<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta http-equiv="Content-Script-Type" content="text/javascript"> <title>www.daniweb.com</title> </head> <body> <noscript> <p> This site requires a browser that support <b>JavaScript</b>. </p> </noscript> <div id="div0"> <script type="text/javascript"> <!-- ( function() { var applet = "applet" …

Member Avatar for Terry56
0
189
Member Avatar for Baddesley

Hi, obtaining [b]Airshow[/b]'s suggestion of the DOM procedure over the document and also i've applied some iframes to simulate real window experience: [code]<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta http-equiv="Content-Script-Type" content="text/javascript"> <title>www.daniweb.com</title> <style type="text/css"> <!-- body { min-height : 600px; } …

Member Avatar for Baddesley
0
1K
Member Avatar for essential

This script will lists all available methods, properties, values, and types, supported inside your browser. This is useful when you are creating script and you want to see a full reference lists of methods supported on the browser that you are working on - then you can simply run the …

0
217
Member Avatar for essential

A simple tool that provides easy navigation in your site using a Combo box. It lets you jump to different location on the Web and also included with text display, which provides short details about the site. If you have comments, suggestions or request &#8212; don't hesitate to post back …

Member Avatar for DealthRune
0
184
Member Avatar for essential

This script simply preload's images inside (x)HTML document. [b]<<<INSTRUCTION>>>[/b] — Simply attached these preloader.js in your document, were you want your images to be preloaded. — You can simply referenced it using [icode]<script type="text/javascript" src="path/preloader.js"></script>[/icode] block. — if you have any suggestions, comments or request, please feel free to post …

0
202
Member Avatar for essential

This script is capable of handling multiple iframes inside your page. Which allow you to specify [b]fixed[/b] [color=red]Width[/color]/[color=red]Height[/color] with your iframes' to ensure layout stability in your page and also it comes with an auto-fit feature. [b]<<<INSTRUCTION>>>[/b] &#8212; [color=green]The[/color] iframeFixer.js [color=green]must be included in your[/color] iframe page [color=green]including all pages …

Member Avatar for essential
0
206
Member Avatar for essential

This version is more precise and accurate compared to my first posted version of this script.

0
187
Member Avatar for essential

In for the latest addition to my code snippets, here's one you'll trully appreciate. This validation tools is packed with the W3Cs (x)HTML Markup validator, CSS validator, MobileOK tester and Semantics Extractor. hope you'll enjoy this newest addition of snippets'...

1
244
Member Avatar for essential

A two columned fixed layout with vertical navigation sample. Now all it needs is your great imagination. Hope you find this useful, and help you all the way in your web activities. Enjoy...

0
185
Member Avatar for essential

A basic example on how to change your stylesheet dynamicaly! I will use a dropDown list to control the environtment! Assuming that you have 4 different .css ( default, red, blue and green ) on your directory! From this line you'll have to replace this with your own stylesheets. [b]default.css[/b] …

Member Avatar for hakimkal
0
160
Member Avatar for essential

A simple date picker with live 12/24hr clock, month/week names, 2/4 digits' year display and supported with configuration settings...

Member Avatar for uringinteristi
0
147
Member Avatar for essential

Making a calendar is a bit more complex than making a timer or clock but mostly because any calendar script is going to be generating HTML to display the calendar and whenever you have programs writing programs things always get a bit funky! We'll do this as a prototype so …

Member Avatar for DealthRune
0
4K
Member Avatar for essential

[color=maroon]This method escapes all &, <, and > symbols in the string, making it safe to display the string on a web page without fear that it will be treated as HTML.[/color]

Member Avatar for westworld
0
211
Member Avatar for Neo7

Hi, here's a simple demonstration of installing events onto target elements': [code]<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta http-equiv="Content-Script-Type" content="text/javascript"> <title>Adding Events</title> <script type="text/javascript"> <!-- var addEvent = Object.prototype.addEvent = ( function( eve, fun ) { if ( "addEventListener" in window …

Member Avatar for Neo7
0
939
Member Avatar for QuickBooksDev

Hi, try the following pattern below, to strip down element in the page if the [icode]getElementById[/icode] method, fails to catch your target object. [code=javascript]<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta http-equiv="Content-Script-Type" content="text/javascript"> <title>Free Live Help!</title> <script type="text/javascript"> <!-- var checkObj = …

Member Avatar for QuickBooksDev
0
185
Member Avatar for penepepe

Hi, try this for now: [code=javascript]<script type="text/javascript"> <!-- function notEmpty() { var _form = ( "form" in document ) ? form : document.getElementById("form"); if ( _form.eponimo.value ) { return true; } alert( "field cannot be empty!" ); _form.eponimo.focus(); return false; } //--> </script>[/code]

Member Avatar for penepepe
0
135
Member Avatar for leviathan185

Hi Lev, i've made a lite modification inside your function and preserved all of your implemented lines: [code]<?xml version="1.0" encoding="utf-8" standalone="no"?> <?xml-stylesheet type="text/css" href="./scripts/imt.css" media="all"?> <!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" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Style-Type" content="text/css" /> <meta http-equiv="Content-Script-Type" content="text/javascript" …

Member Avatar for essential
0
160
Member Avatar for feoperro

Hi, here' a simple document that uses [b]HTML DOM[/b] manipulation procedure: [code]<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta http-equiv="Content-Style-Type" content="text/css"> <meta http-equiv="Content-Script-Type" content="text/javascript"> <title>http://www.daniweb.com</title> <style type="text/css" media="screen"> <!-- table { width : 100%; color : #778899; letter-spacing : 2px; background-color : …

Member Avatar for feoperro
0
162
Member Avatar for leviathan185

Hi, try to re-apply few changes over lines': [code]<script type="text/javascript"> // <![CDATA[ function generate() { var sms = '' var impact = document.sms.impacted.value; var status = document.sms.status.value; var action = document.sms.action.value; var [color=red]BR = '\n'[/color]; sms = sms + '<textarea name="template" rows="10" cols="55">'; sms = sms + 'Service Impacted: '+ …

Member Avatar for leviathan185
0
237
Member Avatar for KlNTARO

Hi kintaro, try this code: [code=javascript]<script type="text/javascript"> // <![CDATA[ var d = document; var GetXmlHttpObject = 0; if ( d.getElementById ) { ( GetXmlHttpObject = function( ) { var req = 0; if ( req = new XMLHttpRequest() ) { return req; } try { var client = [ "MSXML2.XMLHTTP.5.0", …

Member Avatar for farhan386
0
176
Member Avatar for eduardor2k

Hi Eduardo, try to make it in a lowercase format when you specify its tagname: [icode]var x = document.getElementsByTagName("[color=red]div[/color]")[/icode]. Havnt tried your code yet. Please let me know how it worked..

Member Avatar for Airshow
0
310
Member Avatar for Chad Gary

You could try this: [code]<?xml version="1.0" encoding="utf-8" standalone="no"?> <?xml-stylesheet type="text/css" href="#css21" media="screen"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html id="xhtml10S" xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head profile="http://www.w3.org/2005/10/profile"> <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" /> <meta http-equiv="Window-target" content="_top" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Style-Type" content="text/css" /> <meta http-equiv="Content-Script-Type" content="text/javascript" /> <title>Free Live …

Member Avatar for Chad Gary
0
205
Member Avatar for rahul8590

Hi rahul, you could also try this simple application: [code]<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta http-equiv="Content-Script-Type" content="text/javascript"> <title>Free Live Help!</title> </head> <body> <script type="text/javascript"> <!-- var emp = new Array( 5 ); for ( var i = 0; i < …

Member Avatar for Dukane
0
137
Member Avatar for sivakumarl

Hi, try this instead: [code=javascript]<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta http-equiv="Content-Script-Type" content="text/javascript"> <title>www.daniweb.com</title> <script type="text/javascript"> <!-- var d = document; window.onload = function() { var els = ( "testform" in d ) ? d.testform : d.getElementById( "testform" ); var attr …

Member Avatar for sivakumarl
0
150
Member Avatar for mbirame

Hi everyone, mbirame &#8212; you could also try this one: [code=javascript]<?xml version="1.0" encoding="utf-8" standalone="no"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html id="xhtml10" xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <!-- W3Cs Standard Template : XHTML 1.0 Transitional DTD --> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Script-Type" content="text/javascript" /> <title>www.daniweb.com</title> <style type="text/css" …

Member Avatar for mbirame
0
331
Member Avatar for mohanvamsi_18

Hi, try this one: [code=javascript]<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta http-equiv="Content-Script-Type" content="text/javascript"> <title>www.daniweb.com</title> <script type="text/javascript"> <!-- var d = document; var validate = function( field ) { var today = new Date(); var field = ( typeof( field ) === …

Member Avatar for essential
0
997
Member Avatar for jay.barnes

Hi jay, here's a simple demo that converts all checked items, into an array of length, using a single hidden field: [b]startpage[/b] [code=javascript]<?xml version="1.0" encoding="UTF-8" standalone="no"?> <?xml-stylesheet type="text/css" href="#css_level21" media="screen"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" /> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> …

Member Avatar for jay.barnes
0
172
Member Avatar for b0tz

Hi everyone, the first-child access will only work if you have no other nodes' next to the target element. So the safest way to get the 1st-element would be: [code=javascript]<?xml version="1.0" encoding="utf-8" standalone="no"?> <?xml-stylesheet type="text/css" href="#css21" media="screen"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html id="xhtml10S" xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> …

Member Avatar for b0tz
0
273
Member Avatar for DealthRune

Hi DealthRune, you could try this: [code]<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta http-equiv="Content-Script-Type" content="text/javascript"> <title>Free Live Help!</title> <script type="text/javascript"> <!-- var _confirm = function() { if ( confirm("Are You Sure You Want To Logout?")) location.replace("logout.php"); }; // JavaScript-1.5 --> </script> …

Member Avatar for DealthRune
0
105
Member Avatar for Totaal

Hi peter and totaal, - totaal i am not sure if this will claim what you really need over your project, but i hope this will help you in some other ways. Here's the code: [code]<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> …

Member Avatar for essential
0
405
Member Avatar for polo_coins
Member Avatar for Troy III
0
306
Member Avatar for drugoholic

Hi, you can try this with your form: [code]<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta http-equiv="Content-Script-Type" content="text/javascript"> <title>www.daniweb.com</title> <script type="text/javascript"> <!-- window.onload = ( function( monthid ) { var monthid = ( monthid - 1 ); return function() { var ids …

Member Avatar for essential
0
2K
Member Avatar for UncleJoe

Hi UncleJoe, You can skip the long declaration of your arrays collection by using a single stance of: [code]var elements = []; // Starting with an empty array. for ( var i = 0; i < 400; i++ ) { // Looping procedure that counts up to 400xdivs ids. elements[ …

Member Avatar for Airshow
0
1K
Member Avatar for surekhavk

Hi, under IE mode you must include a [icode]name="someName"[/icode] attribute along with your input elements'. Here's a quick demontration: [code]<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta http-equiv="Content-Style-Type" content="text/css"> <meta http-equiv="Content-Script-Type" content="text/javascript"> <title>http://www.daniweb.com</title> <style type="text/css"> <!-- --> </style> <script type="text/javascript"> <!-- window.onload …

Member Avatar for essential
0
199
Member Avatar for Xessa

Hi Xessa, try this table format: [code]<table frame="void" rules="none" border="0" width="100%" cellpadding="0" cellspacing="0"> <colgroup> <col style="width : 30%; vertical-align: middle; text-align : left; padding : .300em;"> <col style="width : auto; vertical-align: middle; text-align : center; padding : .300em;"> </colgroup> <tr><td>Helegemere:</td><td><input type="text" value="" size="30"></td></tr> <tr><td>More:</td><td><input type="text" value="" size="30"></td></tr> </table>[/code]

Member Avatar for essential
0
78
Member Avatar for sivakumarl

Things can be handled in both ways, by implementing some lines along with the [icode]documen.forms[index][/icode] itself, enhancing its support for the other modes of browsers: [code]var form = (( document.getElementById ) ? document.getElementById( "yourFormId" ) : document.forms["yourFormId"] ); // more stuff >>>[/code] that should work in both browsers.

Member Avatar for essential
0
227
Member Avatar for Cheeki

Hi cheeki, here's a simple demo, showing a different way of calling your ajax request and how to set your own timer and make auto updates in your elements. And also i've revealed some of the lines behind, the used of prototype.js ajax handler, this will give you a small …

Member Avatar for essential
0
214
Member Avatar for rapture

Hi rapture, All things can be simulated under the used of a client-side-scripting, like [b]JavaScript[/b]. But not as efficient of what [b]PHP[/b] can offer. And also if you will pick javascript for this job, then this will require some tedeous work over the lines' and alot testing's for the whole …

Member Avatar for essential
0
147
Member Avatar for polo_coins

Hi polo, im not sure, if this is what you intend to do, but this might help you out, to shorten the lines inside your code and as wel as making the code to work in other modes of browsers. [code]<?xml version="1.0" encoding="UTF-8" standalone="no"?> <?xml-stylesheet type="text/css" href="#css_level21" media="all"?> <!DOCTYPE html …

Member Avatar for essential
0
167
Member Avatar for polo_coins

Hi, try this first: [code=javascript]<?xml version="1.0" encoding="UTF-8" standalone="no"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" /> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta http-equiv="Content-Style-Type" content="text/css" /> <meta http-equiv="Content-Script-Type" content="text/javascript" /> <title>http://www.daniweb.com :: DHTML JavaScript / AJAX</title> <script type="text/javascript"> // <![CDATA[ var ChangeCol = function() …

Member Avatar for polo_coins
0
183
Member Avatar for aosmith

Hi aosmith, your code looks fine to me and maybe what it needs is a little adjustment. Please don't get confused by the lines that i have implemented on this demo, my intention is to provide better support in AJAX handling, no matter what version of browsers that may come …

Member Avatar for aosmith
0
170

The End.