Hello,

I have an asp form page that works in IE but I receive an error in Firefox that says:

"There was an error on this page.
Error description: undefined
Click OK to continue"

Here is the code of the page below:

<html>
<head>
 
<script src="/backoffice/includes/jquery-1.3.2.min.js"></script>
<script src="/backoffice/includes/jquery.validate.js"></script>
<script src="/backoffice/includes/jquery.maskedinput-1.2.2.min.js"></script>

  <script>
      $(document).ready(function() {
	      if($("#Rep_Email_Address1").length > 0){
	  	  $("#Rep_Email_Address1").css("color","white");
		  }

          jQuery.validator.addClassRules({
              repID: {

                  minlength: 3,
                  maxlength: 6
              },
              zip: {
                  digits: true,
                  minlength: 5,
                  maxlength: 5
              },
              taxID: {
                  minlength: 10,
                  maxlength: 10
              },
              name: {

                  minlength: 3
              },
              ssn: {
                  minlength: 9,
                  maxlength: 9
              },
              phone: {
                  minlength: 12,
                  maxlength: 12
              },
              email: {
                  email: true,
                  required: true
              }
          });
          $("form").validate({

              invalidHandler: function(e, validator) {
                  var errors = validator.numberOfInvalids();
                  if (errors) {
                      var message = errors == 1
		  					? '<span style="color: red;">Please correct the error noted below.</span>'
		  					: '<span style="color: red;">Please correct the ' + errors + ' errors noted below.</span>';
                      $("div.error span").html(message);
                      $("div.error").show();

                  } else {

                      $("div.error").hide();
                  }

              },
              errorPlacement: function(error, element) {
                  error.appendTo(element.parent("td").next("td"));
              },
              highlight: function(element) {
                  $("input[name=" + $(element).attr('name') + "]").addClass('error');
                  $(element).addClass("error");
              },
              unhighlight: function(element) {
                  $("input[name=" + $(element).attr('name') + "]").removeClass('error');
                  $(element).removeClass("error");
              }

          });
      });

      	$(window).load(function(){
      		        $("input").each(function(i){
			          $(this).val(jQuery.trim($(this).val()));
          			});
  					if($("#Rep_Email_Address1").length > 0){
					$("#Rep_Email_Address1").val($("#Rep_Email_Address1").val().split(";")[0]);
					$("#Rep_Email_Address1").css("color","black");
					}
      	});


  </script>

<html>
<head>
</head>
<body>

<iframe id="easyFillFrame" scrolling="no" frameborder="0" width="100%" height="0" src="/Applications/EasyFill/FillWebForm.aspx?Source=&id=&idtype=&RepObjid="> </iframe>
</body>
</html>


<link rel="stylesheet" type="text/css" href="/backoffice/style/commlink_redesign.css">
<link rel="stylesheet" type="text/css" href="/backoffice/style/validation.css">
<style type="text/css">
body
{
	background-color:#ffffff;
}
</style>

<title>Model Management Beta Questions & Feedback Form</title>
</head>

<body>
<form Action ="../../../d_form/Email_BOS_FormCONFIRM.asp" Method="post">

<input type="hidden" name="#NameOfRep" value="CommunityLink User">


<input type="hidden" name="#FormName" value="Model Management Beta Questions & Feedback Form - CommunityLink User">

<input type="hidden" name="EmailRecipient" value="cfnmm@commonwealth.com">

<div id="FormWrapper">

<table cellSpacing="2" cellPadding="3" width="600" border="0">

   <tr>
    <td class="BodyHeader" style="color:#003366;">Model Management Beta Questions & Feedback Form</td>
  </tr>
  <tr><td></td></tr>
  <tr>
    <td>Name: <SELECT name=selRepName id='#lstRep' onChange='RepNameChange();'>
</SELECT>

<input type="hidden" id="#lstRepName" name="#lstRepName" value="">
<script type="text/javascript">
    function RepNameChange() {
        var nm = document.getElementById("#lstRepName");
        if (nm) {
            var lstrep = document.getElementById("#lstRep");

            if (lstrep.selectedIndex > 0) {
                nm.value = lstrep.options[lstrep.selectedIndex].text;
            }
        }
    }

</script>

	</td>
	<td></td>
  </tr>
  <tr>
    <td> E-mail: <input name="*Advisor_Email" size="41" ID="Rep_Email_Address1" class="required email">	</td>

	<td></td>
  </tr>
  <tr>
    <td colspan="2">Model Management Beta  Questions and Feedback:</td>
  </tr>
  <tr>
    <td style="padding-left:10px;"><TEXTAREA name="Model_Management_Beta_questions_and_feedback" rows="10" cols="60" wrap="physical" class="required"></TEXTAREA>
  <br>

    </td>
	<td></td>
  </tr>
  <tr>
    <td width="375" align="right" style="padding-bottom:10px;"> <INPUT type="submit" value="Submit">
    </td>
	<td colspan="2" align="right"></td>
  </tr>

  </table></div></form>
  <script type="text/javascript">
 
/* Google Analytics Code */
  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-17548476-1']);
  _gaq.push(['_trackPageview']);

 (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();
</script>
<!-- SiteCatalyst code version: H.20.3 Copyright 1997-2009 Omniture, Inc. More info available at http://www.omniture.com -->


<script language="JavaScript" type="text/javascript"><!--
s.prop10="CommunityLink User"
s.prop16="metrics##employee"
s.evar10="CommunityLink User"
s.evar14="metrics##employee"
/************* DO NOT ALTER ANYTHING BELOW THIS LINE ! **************/
var s_code=s.t();if(s_code)document.write(s_code)//--></script>
<!-- End SiteCatalyst code version: H.20.3 -->
</body>
</html>

Recommended Answers

All 5 Replies

try changing: if($("#Rep_Email_Address1").length > 0){ to: if($("#Rep_Email_Address1")[B].val()[/B].length > 0){ if the problem persist, go the addOns page for Firefox and look for Firebug. Install it, restart Firefox and go back to your page. Then specify on which line the error is happening.

Thank you, but it did not work. I installed firebug and am hoping that will clear things up a bit!

the problem I pointed out originally exists on lines 11 AND 83 of your original post.

I wasn't aware there were 2 spots that needed editing, I edited them both and still not working. Thanks for the speedy responses!

You have a major error between lines 92 - 95.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.