Python Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
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 June 18th, 2002, 04:56 AM
nickname nickname is offline
inexperienced and useless
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2001
Location: Stevenage, uk
Posts: 10 nickname User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
bit by bit display of list contents

I'm very stuck at the minute, I have a database cgi script which perfroms searches on the database and returns a hitlist. The problem is that this hitlist can become very large, and to show all the results at the same time is impossible. I therefore want to be able to display sections of the hitlist and provide a link to the next section, however I am at a loss with reguard to how I do this.

at the minute the code goes something like this:

for smile in result_list:
print result_html % (smile, smile, smile, tdt_display(smile))

I'm not gonna put all the details of the code, but basicaly I wondered if anyone could point me in the right direction?

I know how to slice the list, and can do that ok, it's the link to the other section that I have problems with. Ideally I would like a javascript 'onclick' command to induce a python command is this possible?

tHaNkS

Reply With Quote
  #2  
Old June 18th, 2002, 11:10 AM
ygdrasyl ygdrasyl is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2002
Location: BCN
Posts: 84 ygdrasyl User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 1 m 4 sec
Reputation Power: 7
Send a message via Yahoo to ygdrasyl
Maybe this helps

Hi,
Using javascript you can connect a onclick with a form submit order. If you created a hidden form whose action where send the first and last number of item to a python script it should do the job. The only problem is that I don't know a way to keep in memory the list, so this way you should look for it again.Hope it helps.

Reply With Quote
  #3  
Old June 20th, 2002, 06:05 AM
nickname nickname is offline
inexperienced and useless
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2001
Location: Stevenage, uk
Posts: 10 nickname User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
It might work, but I'm not so sure...

I have looked at using the hidden field on a form to pass the values of the python list slice, but I don't see how I am able to then pass subsequent values for the next python list slice and the one after, ect, ect...
without having to have a new set of html with the different values in it. I don't think I am being very clear about this, but I don't really know what to do.
The saving of the list is fine, as I have taken care of that, it's just the display that I am having problems with.

Thanks

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPython Programming > bit by bit display of list contents


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 | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway