Welcome Guest ( Log In | Join )

Discover the best free computer help!
Learn more about Geeks to Go by taking the tour. Want to ask a question, reply to a topic, or remove all advertising? It's easy, fast and free. Join today!
Spyware, virus, trojan, fake security or privacy alerts? Please start with our malware cleaning guide.
     
 
Reply to this topicStart new topic
Using JavaScript or CSS to replace text
interpolarity
post Aug 20 2007, 12:38 PM
Post #1


Member
***
Posts: 232
OS: Mac OSX Leopard 10.5.6



I want to have a blank div that can have text put in by clicking on a link, or, if the div has text in it, for the link to replace the text....
so like...


link
link1
link2

(click the first link)

ABCD

link
link1
link2

(click the second link)

EFGH

link
link1
link2

etc....

any ideas?
Go to the top of the page
 
+Quote Post
Major Payne
post Aug 20 2007, 01:03 PM
Post #2


Trusted Techie
Group Icon
Posts: 4,639
From: Now in a MEMA (Katrina) Cottage
OS: Win XP/Vista Home Premium. Backup PC: Commodore 64 with 300 baud modem!



Play with the attached files and see if they will work as you want.

Ron
Attached File(s)
Attached File  ZZ__Text_Change_Dynamically_2.html ( 2.47K ) Number of downloads: 32
Attached File  ZZ__Text_Change_Dynamically.html ( 6.75K ) Number of downloads: 23
 
Go to the top of the page
 
+Quote Post
interpolarity
post Aug 20 2007, 02:39 PM
Post #3


Member
***
Posts: 232
OS: Mac OSX Leopard 10.5.6



VERY close to what I'm looking for, but is it possible for the links to send the text somewhere other than right in front of it...

let me explain exactly what I want....

I want to have a page on my website with poetry. Instead of having tons of poems show up, I want them to be able to click a link, and have the poem appear in a specific box (like a div tag or something) that will have a specified width and can scroll. When they click one poem, I want the poem to appear. When they click on another, I want the former to go away, and the new one to appear....I hope I'm coming across clear...
Go to the top of the page
 
+Quote Post
Supercalifragili...
post Aug 20 2007, 02:53 PM
Post #4


Member
***
Posts: 396
From: England
OS: Windows XP Home SP2



iframes?
Go to the top of the page
 
+Quote Post
Major Payne
post Aug 20 2007, 03:12 PM
Post #5


Trusted Techie
Group Icon
Posts: 4,639
From: Now in a MEMA (Katrina) Cottage
OS: Win XP/Vista Home Premium. Backup PC: Commodore 64 with 300 baud modem!



OK. That can be done by JavaScript too. IFrames is one solution, too, to load by iframe's target name into the <div> by clicking different links with that name. JS would not work by anyone who has it turned off in their browser. Your choice.

Ron
Go to the top of the page
 
+Quote Post
interpolarity
post Aug 20 2007, 03:17 PM
Post #6


Member
***
Posts: 232
OS: Mac OSX Leopard 10.5.6



I found what I was looking for...thank you for your help...

I found it here-->http://www.netlobo.com/div_hiding.html
Go to the top of the page
 
+Quote Post
Major Payne
post Aug 20 2007, 04:12 PM
Post #7


Trusted Techie
Group Icon
Posts: 4,639
From: Now in a MEMA (Katrina) Cottage
OS: Win XP/Vista Home Premium. Backup PC: Commodore 64 with 300 baud modem!



That's good, but same limitations as it uses JS. Of course, my attachments had some basic CSS, but I didn't set it up with divs that much. Also, have one with a div that shows the text on a mouseover. At least, I don't have to write anymore code for you. LOL.

Ron

This post has been edited by Major Payne: Aug 20 2007, 04:13 PM
Go to the top of the page
 
+Quote Post
interpolarity
post Aug 20 2007, 05:26 PM
Post #8


Member
***
Posts: 232
OS: Mac OSX Leopard 10.5.6



Thank you very much for your help....u see, I am programming-challenged....

here is a working example though...
http://musichasm.110mb.com/Gallery/Poetry.html
Go to the top of the page
 
+Quote Post
Major Payne
post Aug 20 2007, 05:45 PM
Post #9


Trusted Techie
Group Icon
Posts: 4,639
From: Now in a MEMA (Katrina) Cottage
OS: Win XP/Vista Home Premium. Backup PC: Commodore 64 with 300 baud modem!



Nice. I remember this site of yours from other post(s) you've made on GTG. LOL

Ron
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 


RSS Time is now: 8th January 2009 - 08:33 PM
Advertisements do not imply our endorsement of that product or service. The forum is run by volunteers who donate their time and expertise. We make every attempt to ensure that the help and advice posted is accurate and will not cause harm to your computer. However, we do not guarantee that they are accurate and they are to be used at your own risk.