/    Sign up×
Community /Pin to ProfileBookmark

java form problem

Hi

Just wondering if anybody could please help with a Java script form problem.

Please go to [url]http://www.atcallchaufferedcars.com.au/bookingform.html[/url]

When I go to test the form works , basically it’s not sending the form to the designated email address – ([email protected])

Thank you for anybody’s help

Kind Regards

Micro MDW

to post a comment
JavaScript

4 Comments(s)

Copy linkTweet thisAlerts:
@felgallAug 24.2006 — That would be set somewhere in the PHP script on the server.
Copy linkTweet thisAlerts:
@micro_smartauthorAug 25.2006 — [COLOR=Black][B]Thank for your reply. I have checked to make sure I have uploaded all necessary files for this form. The java form is as per below code. plese note some of the items are not needed on this form.[/[/B]COLOR]





//=======================================================

var suburbs = new Array(

"** Airport Avalon ** ",

"Morwell ",

"Mt. Eliza ",

"Mt. Evelyn ",

"Mt. Macedon ",

"Mt. Martha ",

"Mt. Waverley ",

"Mulgrave ",

"Yallambie ",

"Yarra Glen ",

"Yarraville "

);



//=======================================================

function PopulateSuburbList()

{

for(var i = 0;i <suburbs.length; i++)

{

document.write("<option value = "");

document.write(suburbs[i]);

document.write("">");

document.write(suburbs[i]);

document.write("</option>n");

}

}



//=======================================================

function SuburbSelected_Pickup()

{

document.forms[0].PICKUP_SUBURB.value = document.forms[0].PICKUP_SUBURB_LIST.value;

}

//=======================================================

function GotoSuburb_Pickup()

{

var str = document.forms[0].PICKUP_SUBURB.value;

for(var i = 0;i <suburbs.length; i++)

{



if(suburbs[i].toLowerCase().indexOf(str) == 0)
{
document.forms[0].PICKUP_SUBURB_LIST.selectedIndex = i;
break;
}
else
{
document.forms[0].PICKUP_SUBURB_LIST.selectedIndex = -1;
}
}

}

//=======================================================

function GotoSuburb_Return()

{

var str = document.forms[0].RETURN_SUBURB.value;

for(var i = 0;i <suburbs.length; i++)

{

if(suburbs[i].toLowerCase().indexOf(str) == 0)
{
document.forms[0].RETURN_SUBURB_LIST.selectedIndex = i;
break;
}
else
{
document.forms[0].RETURN_SUBURB_LIST.selectedIndex = -1;
}
}

}

//=======================================================

function SuburbSelected_Return()

{

document.forms[0].RETURN_SUBURB.value = document.forms[0].RETURN_SUBURB_LIST.value;

}

//=======================================================

function SuburbSelected_Dest()

{

document.forms[0].DESTINATION_SUBURB.value = document.forms[0].DESTINATION_SUBURB_LIST.value;

}

//=======================================================

function GotoSuburb_Dest()

{

var str = document.forms[0].DESTINATION_SUBURB.value;

for(var i = 0;i <suburbs.length; i++)

{

if(suburbs[i].toLowerCase().indexOf(str) == 0)
{
document.forms[0].DESTINATION_SUBURB_LIST.selectedIndex = i;
break;
}
else
{
document.forms[0].DESTINATION_SUBURB_LIST.selectedIndex = -1;
}
}

}


//=======================================================

function UpdateServiceFields()

{

if (document.forms[0].SERVICES.value == "Other_Service")

{


document.getElementById("otherService").style.visibility = "visible";
document.getElementById("otherService_Label").style.visibility = "visible";

}
else
{

document.getElementById("otherService").style.visibility = "hidden";
document.getElementById("otherService_Label").style.visibility = "hidden";
document.forms[0].OTHER_SERVICE.value = "";
}


}

//=======================================================

function UpdateFindUSFields()

{

if (document.forms[0].FIND_US.value == "Other")

{

document.getElementById("Other_FindUs").style.visibility = "visible";

document.getElementById("Other_FindUs_Label").style.visibility = "visible";

}
else
{

document.getElementById("Other_FindUs").style.visibility = "hidden";
document.getElementById("Other_FindUs_Label").style.visibility = "hidden";
document.forms[0].OTHER_FIND_US.value = "";
}


}

//=======================================================

function TrimString (str)

{

str = this != window? this : str;

return str.replace(/^s+/g, '').replace(/s+$/g, '');

}

//=======================================================

function CheckEmail(email)

{


var parsed = true;
var validchars = "[email protected]_";

for (var i=0; i < email.length; i++)
{
var letter = email.charAt(i).toLowerCase();
if (validchars.indexOf(letter) != -1)
continue;
alert("Your Email contains invalid character " + letter);
parsed = false;
break;
}
return parsed;

}


//=======================================================

function ValidateForm()

{

retVal = false;

if(!CheckEmail(document.forms[0].EMAIL.value))

retVal = false;

else if(TrimString(document.forms[0].EMAIL.value) != TrimString(document.forms[0].EMAIL2.value))

{

alert("Retyped email does not match the email, please check your spelling");

retVal = false;

}
else
retVal = true;
if(!retVal)
return false;
if(!TrimString(document.forms[0].NAME.value))
{
alert("Please Enter your Name");
retVal = false;
}
else if (!TrimString(document.forms[0].PHONE.value) && !TrimString(document.forms[0].FAX.value) && !TrimString(document.forms[0].EMAIL.value))
{
alert("Need to provide at least one contact detail.n Please Enter either an email address, a phone number or a Fax Number)")
retVal = false;
}
else
retVal = true;

return retVal;


}

//=======================================================
Copy linkTweet thisAlerts:
@micro_smartauthorAug 25.2006 — Hi forgot to say please visit this link to view form

www.bigsmile.com.au
Copy linkTweet thisAlerts:
@micro_smartauthorAug 25.2006 — Hi forgot to say please visit this link to view form

http://www.bigsmile.com.au/bookingform.html
×

Success!

Help @micro_smart spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.23,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...