Jump to content


Photo

Making "Read More" button


  • Please log in to reply
5 replies to this topic

#1 genu

genu
  • Members
  • PipPipPip
  • Advanced Member
  • 32 posts

Posted 19 February 2006 - 03:41 PM

HI, I am using PHP to get the articles from a database, and then JavaScript and Css to truncate them to a certain height. When they Click Read More...That article would expand to show the whole thing. Here is what I have so far: [a href=\"http://localhost:8080/youth.php\" target=\"_blank\"]http://localhost:8080/youth.php[/a]

I notice that the JavaScript or CSS is messed up in Firefox...why is that, and how do I fix. Furthermore...how can I make it so that the once they click "Read More", it turns in to "Read Less" and when they click "Read Less", it woul again truncate the descripiton.

thx in advance

#2 AndyB

AndyB
  • Staff Alumni
  • Advanced Member
  • 5,465 posts
  • LocationToronto

Posted 19 February 2006 - 04:07 PM

Guess what? You're the only person on the planet that can connect to [a href=\"http://localhost:8080/youth.php\" target=\"_blank\"]http://localhost:8080/youth.php[/a]

Personally, I'd use Google and search for a simple javascript 'show/hide' script so that the div containing the news is either visible or not. Why your javascript/CSS doesn't work in some browsers is because your choices of js/CSS don't work in all browsers.
Legend has it that reading the manual never killed anyone.
My site

#3 genu

genu
  • Members
  • PipPipPip
  • Advanced Member
  • 32 posts

Posted 19 February 2006 - 06:43 PM

[!--quoteo(post=347391:date=Feb 19 2006, 11:07 AM:name=AndyB)--][div class=\'quotetop\']QUOTE(AndyB @ Feb 19 2006, 11:07 AM) View Post[/div][div class=\'quotemain\'][!--quotec--]
Guess what? You're the only person on the planet that can connect to [a href=\"http://localhost:8080/youth.php\" target=\"_blank\"]http://localhost:8080/youth.php[/a]

Personally, I'd use Google and search for a simple javascript 'show/hide' script so that the div containing the news is either visible or not. Why your javascript/CSS doesn't work in some browsers is because your choices of js/CSS don't work in all browsers.
[/quote]

im sorry...try genuchelu.redirectme.net/youth.php

what else can I use other than JavaScript, to get the same effect?

#4 ChrisDarl

ChrisDarl
  • Members
  • PipPip
  • Member
  • 27 posts

Posted 20 February 2006 - 03:12 PM

Flash?

#5 genu

genu
  • Members
  • PipPipPip
  • Advanced Member
  • 32 posts

Posted 20 February 2006 - 03:19 PM

[!--quoteo(post=347623:date=Feb 20 2006, 10:12 AM:name=ChrisDarl)--][div class=\'quotetop\']QUOTE(ChrisDarl @ Feb 20 2006, 10:12 AM) View Post[/div][div class=\'quotemain\'][!--quotec--]
Flash?
[/quote]

I cant use flash, because the data is extracted from the database via php.

#6 ChrisDarl

ChrisDarl
  • Members
  • PipPip
  • Member
  • 27 posts

Posted 20 February 2006 - 06:50 PM

You can still use Flash with a Database and PHP.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users