JavaScript class does not work on NetScape

G

Guest

Hello

I have JavaScript Functions and AJAX being used in my application

When I run my application using NetScape my JavaScriot or AJAX does not work?

Kindly give suggestions

Thank you,
 
I

intrader

sramakrishna said:
Hello

I have JavaScript Functions and AJAX being used in my application

When I run my application using NetScape my JavaScriot or AJAX does not work?

Kindly give suggestions

Thank you,
You have not supplied enough information; provide a small snippet to
illustrate what you are doing.
Note that the object used for AJAX functionality is different in IE vs.
Netspace. You may use a library like 'prototype' so surmount the
compatibility problems.
 
G

Guest

code

<script type="text/javascript" src="/js/ajax.js"></script>
<script type="text/javascript" src="/js/validation.js"></script>
<script language="javascript" type="text/javascript">
function validateForm() {

var ddl=document.getElementById("Opts");

if(ddl.value==2 || ddl.value==4)
{
if (document.getElementById('CustID').value.length == 0) {
alert('Please enter Custtomer ID');
document.getElementById('CustID').focus();
return false;
}
if (document.getElementById('first_name').value.length == 0) {
alert('Please enter first name');
document.getElementById('first_name').focus();

return false;
}
if (document.getElementById('last_name').value.length == 0) {
alert('Please enter a last name');
document.getElementById('last_name').focus();
return false;
}
if (document.getElementById('Address1').value.length == 0) {
alert('Please enter Address1');
document.getElementById('Address1').focus();
return false;
}
if (document.getElementById('City').value.length == 0) {
alert('Please enter City');
document.getElementById('City').focus();
return false;
}
if (document.getElementById('State').value.length == 0) {
alert('Please enter State');
document.getElementById('State').focus();
return false;
}
if (document.getElementById('Zip').value.length == 0) {
alert('Please enter a Zip Code');
document.getElementById('Zip').focus();
return false;
}

}
tblEmail.style.display = 'none';
tblMail.style.display = 'none';
tblPhone.style.display = 'none';
tblCustID.style.display = "none";

make_request('AJAXGetMessage.aspx', function(data)
{document.getElementById('test').innerHTML = data;}, 'data=' +
document.getElementById('Opts').value + '&custID= ' +
document.getElementById('CustID').value + '&email= ' +
document.getElementById('Email').value + '&phone=' +
document.getElementById('Phone').value + '&first_name=' +
document.getElementById('first_name').value + '&last_name=' +
document.getElementById('last_name').value + '&address1=' +
document.getElementById('Address1').value + '&address2=' +
document.getElementById('Address2').value + '&city=' +
document.getElementById('City').value + '&state=' +
document.getElementById('State').value + '&zip=' +
document.getElementById('zip').value, 'text');
document.getElementById('Submit').style.visibility = "hidden";
return true;
}
startPage = function()
{

var ddl=document.getElementById("Opts");
document.getElementById('test').innerHTML = "";


if(ddl.value==0)
{
tblEmail.style.display = "none";
tblMail.style.display = "none";
tblPhone.style.display = "none";
tblCustID.style.display = "none";
document.getElementById('Submit').style.visibility =
"hidden";
}
if(ddl.value==1)
{
tblCustID.style.display = "block";
tblEmail.style.display = "block";
tblMail.style.display = "none";
tblPhone.style.display = "none";
document.getElementById('Submit').style.visibility =
"visible";
}
if(ddl.value==2)
{
tblCustID.style.display = "block";
tblEmail.style.display = "none";
tblMail.style.display = "block";
tblPhone.style.display = "none";
document.getElementById('Submit').style.visibility =
"visible";
}
if(ddl.value==3)
{
tblCustID.style.display = "block";
tblEmail.style.display = "none";
tblMail.style.display = "none";
tblPhone.style.display = "block";
document.getElementById('Submit').style.visibility =
"visible";
}
if(ddl.value==4)
{
tblCustID.style.display = "block";
tblEmail.style.display = "block";
tblMail.style.display = "block";
tblPhone.style.display = "block";
document.getElementById('Submit').style.visibility =
"visible";
}

}

window.onload = startPage;
</script>
</head>
<form name="form1" method="post" action="index.aspx" onsubmit="return
validate(this)">
<fieldset><div ">
<table >
<tr >
<td>
<select
onchange="startPage()" name="Opts" id="Opts" size="1">
<option value="0"
Make your Selection</option> <option value="1"
Email</option> <option value="2"
Mail</option> <option value="3"
Phone</option> <option value="4"
Do Not Contact</option>
</select>

<input type="submit"
id="submit" onclick="return validateForm();" value="submit" />
</td>
<td></td>

</tr>
<tr><td><span id="test"
/></td></tr>
</table>
<table>
<tr><td>
<table
id="tblCustID" >
<tr><td
style="width: 84px" >Customer ID:</td><td style="width: 149px"><input
type="text" id="CustID" value="" style="width: 141px" onchange="return
val_num(this.value);" maxlength="10" /></td></tr>
</table>

<table
id="tblEmail" >
<tr><td
style="width: 85px" >Email:</td><td style="width: 149px"><input type="text"
id="Email" value="" style="width: 141px" onchange="return
val_email(this.value);" maxlength="200" /></td></tr>
</table>
<table
id="tblPhone" >
<tr><td
style="width: 84px;" >Phone:</td><td style="width: 149px"><input type="text"
id="Phone" value="" style="width: 142px" onchange="return
val_num(this.value);" maxlength="10" /></td></tr>
</table>
<table
id="tblMail" >
<tr><td
style="width: 83px">First Name:</td><td style="width: 149px"><input
type="text" id="first_name" value="" style="width: 142px" maxlength="30"
/></td></tr>
<tr><td
style="width: 83px">Last Name:</td><td style="width: 149px"><input
type="text" id="last_name" value="" style="width: 142px" maxlength="30"
/></td></tr>
<tr><td
style="width: 83px">Address1:</td><td style="width: 149px"><input
type="text" id="Address1" value="" style="width: 142px" maxlength="100"
/></td></tr>
<tr><td
style="width: 83px">Address2:</td><td style="width: 149px"><input
type="text" id="Address2" value="" style="width: 142px" maxlength="100"
/></td></tr>
<tr><td
style="width: 83px">City:</td><td style="width: 149px"><input type="text"
id="City" value="" style="width: 142px" maxlength="100" /></td></tr>
<tr><td
style="width: 83px">State:</td><td style="width: 149px"><input type="text"
id="State" value="" style="width: 141px" maxlength="10" /></td></tr>
<tr><td
style="width: 83px">Zip:</td><td style="width: 149px"><input type="text"
id="Zip" value="" style="width: 141px" maxlength="10" /></td></tr>
</table>

</td></tr>
</table>
</div></fieldset>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top