web hosting and development forums
Web Design and Development Forums Archive


Index - JavaScript forum

problem with specifying a default value


Post reply

Can anyone tell me the syntax for specifying a default value for a parameter to a function. When I do function foobar(moo, hax = 123). I get syntax errors. Firefox says: Error: missing ) after formal parameters. Source Code: Function SwapToForm(el, method = "post"). And points to the = sign. Any ideas?




Dubai Forum | Paris Forum | Webmaster Forum | Vegan Forum | Brisbane Forum | 3D Forum | Jobs in Dubai | Jobs in London | London UK Classifieds
Archive script by RedHo.com