<dtml-var variable> from REQUEST not shown in <input> tag if it has spaces??
Hello everybody, Im using Zope 2.7.0 on Windows XP Pro. I pass some parameters from a form to a DTML method. Inside that method i try to get the parameters with <dtml-var sSQL> ( sSQL is the "name" of the submiting form's field). When i just use it as <dtml-var sSQL> everything is ok. When i use it like : <input type="text" value=<dtml-var sSQL>>, i get everything until the first space. For example from "select * from mytable" i get "select". Is it something wrong with what i am doing? Thank you in advance ___________________________________________________________ Χρησιμοποιείτε Yahoo!; Βαρεθήκατε τα ενοχλητικά μηνύματα (spam); Το Yahoo! Mail διαθέτει την καλύτερη δυνατή προστασία κατά των ενοχλητικών μηνυμάτων http://login.yahoo.com/config/mail?.intl=gr
Am Donnerstag, den 04.08.2005, 11:33 +0100 schrieb Thomas Apostolou:
Hello everybody,
Im using Zope 2.7.0 on Windows XP Pro. I pass some parameters from a form to a DTML method. Inside that method i try to get the parameters with <dtml-var sSQL> ( sSQL is the "name" of the submiting form's field). When i just use it as <dtml-var sSQL> everything is ok. When i use it like : <input type="text" value=<dtml-var sSQL>>, i get everything until the first space. For example from "select * from mytable" i get "select".
Is it something wrong with what i am doing?
Yes, you should write HTML when you want HTML ;) This means, attribute values in HTML are supposed to be in " " (See the HTML source in your Browser when you display the page and you will know what I mean :) So, if you really want DTML here, use: <input type="text" value="<dtml-var sSQL>" /> or <input type="text" value="&dtml-sSQL;" /> which is a bit nicer because you dont write a tag inside a tag. OR use ZPT: <input type=text" tal:attributes="value request/sSQL" />
--- Tino Wildenhain <tino@wildenhain.de> έγραψε:
Yes, you should write HTML when you want HTML ;) This means, attribute values in HTML are supposed to be in " " (See the HTML source in your Browser when you display the page and you will know what I mean :)
So, if you really want DTML here, use:
<input type="text" value="<dtml-var sSQL>" />
or
<input type="text" value="&dtml-sSQL;" />
which is a bit nicer because you dont write a tag inside a tag.
OR use ZPT:
<input type=text" tal:attributes="value request/sSQL" />
was that a realy stupid question or what? 8-< Thanks anyway, Thomas Apostolou ___________________________________________________________ Χρησιμοποιείτε Yahoo!; Βαρεθήκατε τα ενοχλητικά μηνύματα (spam); Το Yahoo! Mail διαθέτει την καλύτερη δυνατή προστασία κατά των ενοχλητικών μηνυμάτων http://login.yahoo.com/config/mail?.intl=gr
Hi Thomas,
When i just use it as <dtml-var sSQL> everything is ok. When i use it like : <input type="text" value=<dtml-var sSQL>>, i get everything until the first space. For example from "select * from mytable" i get "select". I'm not sure, but don't you need to enclose it with double quotation marks? Something like this:
<input type="text" value="<dtml-var sSQL>"> You can also try: <input type="text" value="&dtml-sSQL;"> Regards, Josef
Josef Meile wrote:
Hi Thomas,
When i just use it as <dtml-var sSQL> everything is ok. When i use it like : <input type="text" value=<dtml-var sSQL>>, i get everything until the first space. For example from "select * from mytable" i get "select".
I'm not sure, but don't you need to enclose it with double quotation marks? Something like this:
<input type="text" value="<dtml-var sSQL>">
You can also try:
<input type="text" value="&dtml-sSQL;">
I suspect this to be the right answer. The way to diagnose this would be to have looked at the page source itself. You would have seen something like:: <input type="text" value=select * from mytable> From this it seems obvious why only 'select' was showing up in the rendered output. --jcc -- "Building Websites with Plone" http://plonebook.packtpub.com/ Enfold Systems, LLC http://www.enfoldsystems.com
participants (4)
-
J Cameron Cooper -
Josef Meile -
Thomas Apostolou -
Tino Wildenhain