We use cookies to provide you with a better experience. If you continue to use this site, we'll assume you're happy with this. Alternatively, click here to find out how to manage these cookies

hide cookie message
Contact Forum Editor

Send an email to our Forum Editor:


PLEASE NOTE: Your name is used only to let the Forum Editor know who sent the message. Both your name and email address will not be used for any other purpose.

Tech Helproom


It's free to register, to post a question or to start / join a discussion


 

Javascript Functions/Validations In Firefox


MogsyDude22

Likes # 0

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;
}

Like this post

Reply to this topic

This thread has been locked.



IDG UK Sites

Amazon Kindle Voyage release date, price and specs UK: a high-end eReader with Amazon’s best-ever...

IDG UK Sites

Why local multiplayer gaming is rapidly vanishing: we look at the demise of split-screen and LAN...

IDG UK Sites

How to successfully bridge the gap between clients and creatives

IDG UK Sites

How to update your iPhone or iPad to iOS 8: including how to install iOS 8 if you don't have room