• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
5.4 and comments
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

5.4 and comments


  • Subject: 5.4 and comments
  • From: Jeffrey Simpson <email@hidden>
  • Date: Mon, 29 Oct 2007 11:49:59 -0400
  • Thread-topic: 5.4 and comments

We often use tags to pass values into a piece of JavaScript.  Will the tags
be parsed?  For example

    <!-- <webobject name="validateEmail"></webobject> = function(){

var valid = false;
            var email =
document.getElementById('<webobject name="emailId"></webobject>').value;

var msg = "Invalid email address.";
            if(email!=null) {

// check that there's an @
                OK = (email.indexOf("@") >= 0);

// validate against regexp
                if(OK) {
                    OK =
/<webobject name="emailRegExp"></webobject>/.exec(email);

if(OK) {
                        valid = true;
                    }

} else {
                    msg = "Email address requires an '@'";

}
            }
            if(!valid) {

document.getElementById('<webobject name="errorId"></webobject>').innerHTML
= msg;
            } else {

document.getElementById('<webobject name="errorId"></webobject>').innerHTML
= "";
            }
            return valid;
        }
    // -->


I left of the script tags in the hopew this will get through a fire wall.

Jeffrey Simpson
Youth For Understanding USA
email@hidden
Telephone: (240) 235-2114
FAX: (202) 235-2104

Preparing young people for their responsibilities and opportunities in a
changing, interdependent world.





 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: 5.4 and comments
      • From: "Daniele Corti" <email@hidden>
  • Prev by Date: Re: Database choices
  • Next by Date: Re: The Official What-I-Did-To-Run-5.3-On-Leopard Post
  • Previous by thread: Re: HTML
  • Next by thread: Re: 5.4 and comments
  • Index(es):
    • Date
    • Thread