Delphi For PHP Forums       


Go Back   Delphi-PHP Forums > Programming > Javascript and Ajax
Forum Jump Register FAQ Members List Downloads Search Today's Posts Mark Forums Read

Javascript and Ajax Questions and information about working with Ajax and Javascript in Delphi for PHP.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 9th July 2009, 15:49
D4PHP Enthusiast
 
Join Date: Apr 2007
Location: Milano
Posts: 182
goitalia is on a distinguished road
Default Please help, trunc a text with a js

Hi,
Please find attched a little project.
Also a sql table wich contains only a id autoincrement.
The aims is to have a label with more clicable in order to display the rest of label.
PHP Code:
 Lorem ipsum dolor sit ametconsectetuer adipiscing elitEtiam fringillapurus a ultrices blandit,  (interruzione
[
leggi tutto
The form have a label and a dbrepeater with a label on it.
In the event onshow i echo
PHP Code:
echo <<<CODE
<div id="jTruncate_example2" style="border: 1px solid rgb(204, 204, 204); padding: 10px; margin-left: auto; margin-right: auto; width: 320px; background-color: #EAEAFF; text-align: left;">
  Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Etiam fringilla, purus a ultrices blandit,
  odio ante scelerisque neque, vitae imperdiet odio velit ac nisl. Sed tortor metus, placerat condimentum,
  feugiat in, feugiat adipiscing, mi. Donec pulvinar sem vitae leo. Vestibulum eget lectus et ligula hendrerit
  pharetra. Sed porta justo ac nisl. Aliquam nisi erat, pellentesque sed, sagittis eu, fringilla sit amet,
  dolor. Nam ac mi. Pellentesque pede purus, mattis aliquet, semper nec, cursus a, orci. Duis bibendum nibh
  ac massa. Integer eu tortor. Aenean convallis quam at nunc. Nunc mollis tincidunt nisi. Suspendisse mauris
  odio, iaculis ut, feugiat vitae, ultrices in, tortor. Quisque at elit. In hac habitasse platea dictumst. </div>

CODE; 
in the two label: label1 and label2.
The div id is different from the label outside the dbrepeater and the label inside.
For the label outside the scrip, you can find also in the attachement, work very well.
The script was toke from HTML.it in the javascript section.

For the label in the dbrepeater it work only for the first row.

Did somebody can help to find what is wrong ?
In advance : many many thank's.


PS: the unit attached do not have the Database component, you mast in order to test, add one.
Attached Files
File Type: zip New Folder.zip (17.6 KB, 2 views)
__________________
La guerre est un massacre entre gens qui ne se connaissent pas, et qu'il profite à des gens qui se connaissent mais qui ne se massacrent pas
Paul Valery
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 10th July 2009, 13:09
405hp's Avatar
Firebug Fanatic
 
Join Date: Dec 2007
Location: State of Confusion
Posts: 3,269
405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute
Default

I would guess that you are not identifying all of the labels. Something like Get a row value form dbrepeater
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT +1. The time now is 19:37.




Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0 ©2009, Crawlability, Inc.
Copyright © 2004 - 2009, G&J Solutions Ltd. All Rights Reserved. terms of use