Using colon and type identifiers in names with javascript
I like the ability to type a variable for zope by using the vname:string syntax. However, javascript does appear to like variable names with embedded colons. My site is an inhouse site for access to company customer and order data. Our html forms make extensive use of javascript for validation and on form lookups and therefore I have not been able to use the colon+type feature in my variable names. Is there an alternate? Could I suggest something like vname__zpstring systax? Does anyone have any idea what module(s) would I need to patch to make this work? I would think that something that takes the request data as it comes in and translates __zp in any passed variables to a colon would work. Any suggestions? __________________________________________________________________ Jim Sanford ^ Database Engineer ^ ^ ^ Accelerated Technology, Inc. ^ ^ 720 Oak Circle Drive East ^ ^ ^ Mobile, AL 36609 ^ ^ ^ Voice: 334-661-5770 fax: 334-661-5788 ^ ^ E-Mail: jsanford@atinucleus.com Web: http://www.atinucleus.com Source Code, No Royalties, Any CPU...It just make sense ! __________________________________________________________________
Yes, i have this problem... i will look for the source code, patch it and i will send it to you if you wants... Jim Sanford wrote:
I like the ability to type a variable for zope by using the vname:string syntax. However, javascript does appear to like variable names with embedded colons.
My site is an inhouse site for access to company customer and order data. Our html forms make extensive use of javascript for validation and on form lookups and therefore I have not been able to use the colon+type feature in my variable names.
Is there an alternate?
Could I suggest something like vname__zpstring systax? Does anyone have any idea what module(s) would I need to patch to make this work? I would think that something that takes the request data as it comes in and translates __zp in any passed variables to a colon would work.
Any suggestions?
-- Mauricio Souza Lima <mauricio@hiper.com.br> Linux Registered User #141789 Hiperlógica <http://www.hiper.com.br> Automação de Web Sites | Web Site automation São Paulo | Brasil | Fone: +55-11-251-4894
Jim Sanford wrote:
I like the ability to type a variable for zope by using the vname:string syntax. However, javascript does appear to like variable names with embedded colons.
You have 2 ways to access variables in javascript. For example, to access the input field called comment insite the subscription form you should do: document.subscription.comment OR document.subscription['comment'] If your variable name can't be a identifier you MUST use the second one: document.subscriptin['comment:text'] I believe there's no need to modify Zope. regards, -- Paulo Eduardo Neves maito:neves@email.com
At 11:15 99-09-23 -0500, Jim Sanford wrote:
I like the ability to type a variable for zope by using the vname:string syntax.
Hi, Could someone tell me where I could find a reference to this syntax in the documentation, or explain me it. Thanks *************************** Oscar Picasso picasso@videotron.ca ***************************
At 17:35 26-9-99 , picasso@videotron.ca wrote:
At 11:15 99-09-23 -0500, Jim Sanford wrote:
I like the ability to type a variable for zope by using the vname:string syntax.
Hi,
Could someone tell me where I could find a reference to this syntax in the documentation, or explain me it.
The most complete overview I know of is in the Trinkets Tutorial: http://www.zope.org:8080/Documentation/Reference/Trinkets at about 1/3rd down the page. Strangely enough, only this document names the newest modifiers, and not the ZPublisher documentation, as you would expect. -- Martijn Pieters, Web Developer | Antraciet http://www.antraciet.nl | T: +31 35 7502100 F: +31 35 7502111 | mj@antraciet.nl http://www.antraciet.nl/~mj | PGP: http://wwwkeys.nl.pgp.net:11371/pks/lookup?op=get&search=0xA8A32149 ---------------------------------------------
participants (5)
-
Jim Sanford -
Martijn Pieters -
Mauricio Souza -
Paulo Eduardo Neves -
picasso@videotron.ca