Python Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming LanguagesPython Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old May 30th, 2001, 02:58 AM
wabirdman wabirdman is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2000
Location: Australia
Posts: 111 wabirdman User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 m 19 sec
Reputation Power: 13
Populate a text area in Zope from ZSQL method

I have a field in a form which needs to be auto populated by the results of a ZSQL method. The result of the ZSQL is outputted to a column name called HIGH_AVG. I need the output of that column to auto populate a text box on the form

<input type=text value=(return of sql method)>

I have tried this
<input type=text name=HIGH_AVG value="<dtml-in sql_method_name>" </dtml-in> >

Please help with this problem
wabirdman

Reply With Quote
  #2  
Old May 30th, 2001, 08:08 AM
yitz yitz is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2001
Location: jerusalem
Posts: 0 yitz User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via AIM to yitz Send a message via Yahoo to yitz
Lightbulb this should work..

i think you want to put the <dtml-in> call outside the html tag.. like this:

<dtml-in sql_method_name>
<INPUT TYPE="TEXT" VALUE="<dtml-var sql_column_name>">
</dtml-in>

be aware that if your query returns more than one record, you will end up with a number of text fields each containing the appropriate text from one of the records.

Reply With Quote
  #3  
Old May 30th, 2001, 07:21 PM
wabirdman wabirdman is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2000
Location: Australia
Posts: 111 wabirdman User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 m 19 sec
Reputation Power: 13
auto populate

I tried doing that yitz, but it still has not worked. The only other thing I can think of is this. I only want 1 field from the ZSQL method to be returned in to the text box. I have tried cutting the ZSQL so that it only returns one field and that still does not work. I am at a complete loss as to what is happening. Is there a way in which you can call a particular field to be auto populated??

Cheers
wabirdman

Reply With Quote
  #4  
Old May 31st, 2001, 01:11 AM
wabirdman wabirdman is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2000
Location: Australia
Posts: 111 wabirdman User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 m 19 sec
Reputation Power: 13
SUCCESS

Thanks anyway, but I have worked it out. I also was able to have radio buttons that changed the value in the text box.

code for anyone who cares

<table>
<tr>
<td></td>
<TD valign="top" NOWRAP><B>Average Spend:</B></TD>
<td><!--#in sql_handset_details_for_handset_code --><input type=text name=HIGH_AVG value="<!--#var HIGH_AVG -->"><!--#/in--></td>
<TD>&nbsp;<B>3 Month:</B> <!--#var 3_MONTH_AVG --> <INPUT type="radio" name="AVG_CALL_SPEND_BASIS" value="3M" language=javascript onclick="document.thisForm.HIGH_AVG.value='<!--#var 3_MONTH_AVG -->';" checked>&nbsp;</TD>
<TD>&nbsp;<B>6 Month:</B> <!--#var 6_MONTH_AVG --> <INPUT type="radio" name="AVG_CALL_SPEND_BASIS" value="6M" language=javascript onclick="document.thisForm.HIGH_AVG.value='<!--#var 6_MONTH_AVG -->';"></TD>
<td></td>
</tr>
</table>

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPython Programming > Populate a text area in Zope from ZSQL method

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap