Current location: Hot Scripts Forums » General Web Coding » JavaScript » expand list


expand list

Reply
  #1 (permalink)  
Old 10-20-08, 04:58 AM
Miben Miben is offline
Wannabe Coder
 
Join Date: Sep 2008
Posts: 146
Thanks: 0
Thanked 0 Times in 0 Posts
expand list

I want to expand all list title by click on the "expand.gif" image.
How code it?
Reply With Quote
  #2 (permalink)  
Old 10-20-08, 05:03 AM
smithygotlost smithygotlost is offline
Aspiring Coder
 
Join Date: Jul 2006
Location: United Kingdom
Posts: 413
Thanks: 12
Thanked 3 Times in 3 Posts
ok now one thing

Quote:
I want to expand all list title by click on the "expand.gif" image.
How code it?
that doesnt give any info on what you are doing or why, are you using php, java. what are you using it for ? have you tryed already ? if so can you post the coding. and the most important question. Can you please give more info... ? ? ?

thanks
mike
Reply With Quote
  #3 (permalink)  
Old 10-20-08, 01:38 PM
ianbrind ianbrind is offline
Wannabe Coder
 
Join Date: Jul 2008
Location: Somerset UK!
Posts: 192
Thanks: 0
Thanked 0 Times in 0 Posts
Try Googling "javascript expanding table content"
Reply With Quote
  #4 (permalink)  
Old 10-20-08, 02:56 PM
wirehopper's Avatar
wirehopper wirehopper is offline
-
 
Join Date: Feb 2006
Posts: 2,515
Thanks: 20
Thanked 109 Times in 106 Posts
Sounds like HTML/javascript
Reply With Quote
  #5 (permalink)  
Old 10-20-08, 09:26 PM
Miben Miben is offline
Wannabe Coder
 
Join Date: Sep 2008
Posts: 146
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
<?php
include "database.php";
?>
<?php
function expand(){

$db=new database();
$id=$_GET['id'];
$sql="SELECT * FROM url WHERE site_id='$id'";
$result=$db->query($sql);
while($row=$db->fetch_array($result)){
echo '<br/>';
echo ' '.'<img src="images/collapse.gif" width=12" height="12">';
echo $row['url'];
}
}

?>
<html>
<head>
</head>
<body>
<?php
$db=new database();
$sql="SELECT * FROM site";
$result=$db->query($sql);
while($row=$db->fetch_array($result)){

echo '<a href="expand.php?id='.$row['site_id'].'" onclick="expand()"><img src="images/expand.gif" width=12" height="12"></a>';
echo " ".$row['sitename']."<br/>";
}
expand();
?>
</body>
</html>
I still didnt get the way to do.
Reply With Quote
Reply

Bookmarks


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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump


All times are GMT -5. The time now is 11:44 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.