Javascript Functions/Validations In Firefox

  MogsyDude22 12:07 02 Dec 08
Locked

Hi,

I am relatively new to Javascript but do understand a bit about it, I have been working on a form that contains all dropdown menus that contain answers to the question that are asked. I have the values of the dropdown boxes setup fine and all the functions to validate the form are fine as far as I am aware as it works in Internet Explorer. But I cannot for the life of me get the Popup alerts to work in FireFox or Google Chrome. And also the submit button down the bottom of the page does not work either in FireFox or Google Chrome.

This is the code I have, can anybody please shed some light on this...


function formVal()
{
var dd = document.getElementById;

if(dd('tes1').value == "na")
{
alert('Test question 1?');
dd('test1').focus();
return false;
}

if(dd('test2').value == "na")
{
alert('Test question 2?');
dd('test2').focus();
return false;
}

if(dd('test3').value == "na")
{
alert('Test question 3?');
dd('test3').focus();
return false;
}

Advertisement

This thread is now locked and can not be replied to.

UK's best mobile network 2016: best 3G, best 4G, best mobile networks revealed

1995-2015: How technology has changed the world in 20 years

Google will stop accepting new Flash ads on June 30

How to use an Android Wear smartwatch with an iPhone: The benefits and drawbacks of mixing Android…