518 Posted Topics
Re: Current best-practice eschews the "new" keyword on Javascript primitives. If you want to create a new Array simply use brackets [] like this... [icode]var myArray = [];[/icode] You don't need to tell Javascript how many items to size the Array for. Javascript will automatically increase the size of the Array … | |
Re: Just another option! Please kindly marked this thread solved if thus solve the issue concerning your interest. Thanks... [code=html]<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>Input Text Validation</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />[/code] [code=css]<style type="text/css"> <!-- form { margin: 2px; font-weight: bold; color: green; text-align: left; } … | |
Re: Heres how it goes, just dont forget to change the URL values' assigned to the radio buttons. Enjoy coding... [code=html]<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>Associating links with radio button</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">[/code] [code=css]<style type="text/css"> <!-- /* i throw in some style attribution on this … | |
Re: [code=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> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title>[/code] [code=javascript]<script type="text/javascript"> <!--Begin Hiding //I just modified your code. Pls. Take a good look. function validateForm(form) { alert('Please enter your name.'); } // Done Hiding --> </script>[/code] [code=html]</head> <body> <form name="form1" method="post" … | |
Re: This will validate your form and if the user try to input another value asside from 0-9 they wil be alerted for invalid entry! Enjoy your coding... [code=html]<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title>Only Numbers Are allowed</title>[/code] [code=css]<style type="text/css"> <!-- form … | |
Just a new comer and hoping to make new friends' here. Well Coding is just another puzzle. And it's okay to have some help with those pieces. Please don't be afraid to ask. If your the kinda person that just loves to documentWrite, you can var me with my inbox... … | |
Re: [code=javascript]<script type="text/javascript"> <!--Begin Hiding function validateForm(form) { form = (form.paid.value.indexOf('.') == -1 || form.paid.value.indexOf(',') > 0 ) ? alert('\nInvalid entry!\nPlease try again...') : alert('Thank you!'); } /* This will validate your form if the user include any of this (',') or exclude one of this ('.') he/she wil be alerted … | |
Re: [color=green]I will use the document.getElementById method to change the CSS classname property of this ol tag. Code is as follows:[/color] [code=html]<!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>Javascript class switcher</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />[/code] [code=css]<style type="text/css"> <!-- * { margin: 0; padding: 0; … |