General Programming Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingGeneral Programming Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old December 30th, 2003, 11:27 AM
aparna aparna is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Posts: 17 aparna User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 15 m 34 sec
Reputation Power: 0
Question text area and hyperlinking

Hi everyone,

Is it possible to make tha contents of a text area hyperlinked so clicking one line will repopulate the text area with fresh contents based on link?

eg

Display all directories in the drive in the text area. clicking on a directory name should repopulate textbox with the clicked directory contents



Thanks in Advance.

Aparna

Reply With Quote
  #2  
Old December 30th, 2003, 11:36 AM
dhouston's Avatar
dhouston dhouston is offline
Contributing User
Dev Articles Beginner (1000 - 1499 posts)
 
Join Date: May 2003
Location: Tennessee
Posts: 1,355 dhouston User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Send a message via ICQ to dhouston
To my knowledge, this is not possible. You could achieve a similar effect by using a DIV whose style makes it look like a textarea and whose overflow property is set to "scroll." This would allow you to have clickable links while emulating the appearance of a textarea.

Reply With Quote
  #3  
Old December 30th, 2003, 12:21 PM
aparna aparna is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Posts: 17 aparna User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 15 m 34 sec
Reputation Power: 0
thanks alot . will look into that
apu

Reply With Quote
  #4  
Old January 1st, 2004, 08:28 PM
aparna aparna is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Posts: 17 aparna User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 15 m 34 sec
Reputation Power: 0
i am using a list area to display the contents.the directory names there are hyperlinks .My problem now is clicking the links just refreshes the page instead of displaying the clicked directory contents.
HAPPY NEW YEAR
Thanks in advance.
Apu.

Reply With Quote
  #5  
Old January 2nd, 2004, 06:50 AM
dhouston's Avatar
dhouston dhouston is offline
Contributing User
Dev Articles Beginner (1000 - 1499 posts)
 
Join Date: May 2003
Location: Tennessee
Posts: 1,355 dhouston User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Send a message via ICQ to dhouston
Can you point me to the page? I'm having trouble envisioning exactly what's going on.

Reply With Quote
  #6  
Old January 3rd, 2004, 10:01 AM
aparna aparna is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Posts: 17 aparna User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 15 m 34 sec
Reputation Power: 0
hi,
this is the link to my page

i think i have really messed up the whole thing

any help would be greatly appreciated
thanks in advance.
Apu
http://www.symonds.net/~dosai/aparna
the file is test1.php

Reply With Quote
  #7  
Old January 3rd, 2004, 10:54 AM
dhouston's Avatar
dhouston dhouston is offline
Contributing User
Dev Articles Beginner (1000 - 1499 posts)
 
Join Date: May 2003
Location: Tennessee
Posts: 1,355 dhouston User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Send a message via ICQ to dhouston
It's kind of hard to decipher exactly what your code's doing, but my guess is that when you have a directory selected, validation() is returning true and the page is submitting itself because you gave it no action.

Maybe try moving the last line of validation() up above the return true statement. The script is never getting to that line because it returns, and perhaps moving it up will set a variable that your PHP uses to list the selected directory's contents.

Reply With Quote
  #8  
Old January 3rd, 2004, 11:05 AM
aparna aparna is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Posts: 17 aparna User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 15 m 34 sec
Reputation Power: 0
hi,
i thought that was more to do with the onchange property of teh select box or is it not?

Reply With Quote
  #9  
Old January 4th, 2004, 08:30 AM
aparna aparna is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Posts: 17 aparna User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 15 m 34 sec
Reputation Power: 0
please help out coz am in a real mess and running short of time.

Reply With Quote
  #10  
Old January 6th, 2004, 08:31 AM
dhouston's Avatar
dhouston dhouston is offline
Contributing User
Dev Articles Beginner (1000 - 1499 posts)
 
Join Date: May 2003
Location: Tennessee
Posts: 1,355 dhouston User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Send a message via ICQ to dhouston
Did you try what I had suggested?

Reply With Quote
  #11  
Old January 6th, 2004, 09:43 AM
aparna aparna is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Posts: 17 aparna User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 15 m 34 sec
Reputation Power: 0
yes i did and it did not work

i am not able to figuer out why my list area is acting dynamic and resizing on every click

Reply With Quote
  #12  
Old January 6th, 2004, 10:41 AM
stumpy's Avatar
stumpy stumpy is offline
May contain nuts.
Dev Articles Regular (2000 - 2499 posts)
 
Join Date: Aug 2002
Location: Sydney, AU
Posts: 2,058 stumpy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 8 m 57 sec
Reputation Power: 9
Send a message via ICQ to stumpy Send a message via MSN to stumpy
Are you referring to the width of the SELECT box? If so, it changes width depending on the content inside it. It is possible to overide the width by using CSS.

e.g.
Code:
<select style="width:200px;">
  <option>foobar</option>
</select>
__________________
DevArticles Moderator
BlueSix - Web Development and Consulting

Reply With Quote
  #13  
Old January 6th, 2004, 11:27 AM
dhouston's Avatar
dhouston dhouston is offline
Contributing User
Dev Articles Beginner (1000 - 1499 posts)
 
Join Date: May 2003
Location: Tennessee
Posts: 1,355 dhouston User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Send a message via ICQ to dhouston
Looks like it's working alright to me. As far as the width, stumpy's dead on.

Reply With Quote
  #14  
Old January 6th, 2004, 12:08 PM
stumpy's Avatar
stumpy stumpy is offline
May contain nuts.
Dev Articles Regular (2000 - 2499 posts)
 
Join Date: Aug 2002
Location: Sydney, AU
Posts: 2,058 stumpy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 8 m 57 sec
Reputation Power: 9
Send a message via ICQ to stumpy Send a message via MSN to stumpy
Oh yeah - the directory browsing stuff seems to work fine for me too.

I get a page full of PHP errors when I initially load the page though.

Reply With Quote
  #15  
Old January 6th, 2004, 01:04 PM
aparna aparna is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Posts: 17 aparna User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 15 m 34 sec
Reputation Power: 0
hi,
thanks alot stumpy and dhouston , that was very easy and effective solution.
just one small problem my path keeps getting appended ie when starting from a base directory eg var, it appends to prev path and adds a extra /
Thanks again
Apu

Reply With Quote
  #16  
Old January 6th, 2004, 04:08 PM
dhouston's Avatar
dhouston dhouston is offline
Contributing User
Dev Articles Beginner (1000 - 1499 posts)
 
Join Date: May 2003
Location: Tennessee
Posts: 1,355 dhouston User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Send a message via ICQ to dhouston
Post a short code snippet and maybe we can take a look and help you figure it out.

Reply With Quote
  #17  
Old January 6th, 2004, 09:16 PM
aparna aparna is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Posts: 17 aparna User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 15 m 34 sec
Reputation Power: 0
hi
heres what i am using:
PHP Code:
 $output=
"<select onchange=\"this.form.submit();\"   name=\"directory\" size=\"9\"      style=\"width:700px;\">";                         

if(
$dirpath=="")          
{          
$dirpath="/";          
echo 
"<input type=\"hidden\" name=\"a\" value=\"1\">";         
}                         

$directory $_POST['directory'];          $dirpath $_POST['dirpath'];          $filelist="";          
$thisdirectory=$dirpath '/' $directory;    

$output "<input type=\"hidden\" name=\"dirpath\" value=\"$thisdirectory\">" $output

echo 
"<input type=\"hidden\" name=\"b\" value=\"$thisdirectory\">";          

if(
filetype("$thisdirectory")!='dir')          
{          
$output .= "<option   value=\"$thisdirectory\">$thisdirectory</option>"$a=1;          
}          
if(
$a!=1)          
{          
$dir opendir ("$thisdirectory");         while ($filereaddir ($dir))          
{           
if(
filetype("$dirpath")=='dir')         
{         
 
$output =$output "<option value=\"$file\">$file</option>";          
}          
else         
 {          
$filelist =$filelist "<option value=\"$file\">$file</option>";          
}          
}          
closedir