Re: 5.4 and comments

2007-10-30 Thread Daniele Corti
2007/10/29, Mike Schrag [EMAIL PROTECTED]:

 2007/10/29, Jeffrey Simpson [EMAIL PROTECTED]:
 
  We often use tags to pass values into a piece of JavaScript.  Will the
  tags
  be parsed?


 Sure!
 The only case, where some problems occur (but probably it works) is

 var myStr = My Name is webobject name=MyName /;

 in this case you should use webobject name=MyName / without quote.

 Wait, are you answering for WO 5.4 or the WOLips validator. This sounds
 like the WOLips validator, which also sounds like a bug that you can't use
 name = whatever inside of javascript quotes.  I honestly don't know for
 5.4 -- I haven't tested this out.


Well, I used name=whatever inside quote, and it worked in WO 5.3  (I've
not 5.4), but I remember I used it also in another component and in the
runtime (I don't remember the class, while generating the HTML) it gives an
exception (Tag Not Valid if I remember, sorry but It was last year). After I
remove the quotes it works perfectly.

ms

  ___
 Do not post admin requests to the list. They will be ignored.
 Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
 Help/Unsubscribe/Update your Subscription:
 http://lists.apple.com/mailman/options/webobjects-dev/ildenae%40gmail.com

 This email sent to [EMAIL PROTECTED]




-- 
Daniele Corti
AIM: S0CR4TE5
Messenger: [EMAIL PROTECTED]

--
Computers are like air conditioners -- they stop working properly if you
open
WINDOWS

-- 
What about the four lusers of the apocalypse? I nominate:
advertising, can't log in, power switch and what backup?
--Alistair Young
 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Re: 5.4 and comments

2007-10-30 Thread Charles Koppelman
I think your problem with using double-quoted name attributes inside of
double-quotes in JS.  If you want to solve that, use single-quotes for your
JS string.  I have had trouble with using a webobject ... / tag in JS,
though.  I instead use webobject ... /webobject
Charles Koppelman


On 10/30/07 4:31 AM, Daniele Corti [EMAIL PROTECTED] wrote:

 
 
 2007/10/29, Mike Schrag [EMAIL PROTECTED]:
 2007/10/29, Jeffrey Simpson  [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] 
 :
  We often use tags to pass values into a piece of JavaScript.  Will the
 tags 
 be parsed?
 
 Sure! 
 The only case, where some problems occur (but probably it works) is
 
 var myStr = My Name is webobject name=MyName /;
 
 in this case you should use webobject name=MyName / without quote.
 Wait, are you answering for WO 5.4 or the WOLips validator. This sounds like
 the WOLips validator, which also sounds like a bug that you can't use name =
 whatever inside of javascript quotes.  I honestly don't know for 5.4 -- I
 haven't tested this out.
 
 Well, I used name=whatever inside quote, and it worked in WO 5.3  (I've not
 5.4), but I remember I used it also in another component and in the runtime (I
 don't remember the class, while generating the HTML) it gives an exception
 (Tag Not Valid if I remember, sorry but It was last year). After I remove the
 quotes it works perfectly.
 
 ms
 
  ___
 Do not post admin requests to the list. They will be ignored.
 Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com
 mailto:Webobjects-dev@lists.apple.com )
 Help/Unsubscribe/Update your Subscription:
 http://lists.apple.com/mailman/options/webobjects-dev/ildenae%40gmail.com
 http://lists.apple.com/mailman/options/webobjects-dev/ildenae%40gmail.com
 
 This email sent to [EMAIL PROTECTED]
 
 


 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

5.4 and comments

2007-10-29 Thread Jeffrey Simpson
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 PROTECTED]
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  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: 5.4 and comments

2007-10-29 Thread Mike Schrag

2007/10/29, Jeffrey Simpson [EMAIL PROTECTED]:
We often use tags to pass values into a piece of JavaScript.  Will  
the tags

be parsed?

Sure!
The only case, where some problems occur (but probably it works) is

var myStr = My Name is webobject name=MyName /;

in this case you should use webobject name=MyName / without quote.
Wait, are you answering for WO 5.4 or the WOLips validator. This  
sounds like the WOLips validator, which also sounds like a bug that  
you can't use name = whatever inside of javascript quotes.  I  
honestly don't know for 5.4 -- I haven't tested this out.


ms ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Re: 5.4 and comments

2007-10-29 Thread Daniele Corti
2007/10/29, Jeffrey Simpson [EMAIL PROTECTED]:

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


Sure!
The only case, where some problems occur (but probably it works) is

var myStr = My Name is webobject name=MyName /;

in this case you should use webobject name=MyName / without quote.


  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 PROTECTED]
 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  (Webobjects-dev@lists.apple.com)
 Help/Unsubscribe/Update your Subscription:
 http://lists.apple.com/mailman/options/webobjects-dev/ildenae%40gmail.com

 This email sent to [EMAIL PROTECTED]




-- 
Daniele Corti
AIM: S0CR4TE5
Messenger: [EMAIL PROTECTED]

--
Computers are like air conditioners -- they stop working properly if you
open
WINDOWS

-- 
What about the four lusers of the apocalypse? I nominate:
advertising, can't log in, power switch and what backup?
--Alistair Young
 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]