PDA

View Full Version : Extend Link for Description



Lincoln
11-19-2005, 09:23 AM
I'm looking for a code similar to that of when you click a 'plus' sign, it'll extend and show text, and the plus will turn into a minus allowing you to click again to extract. I don't even know THAT code, but I want the code where instead of plus and minus, I can just click text and have it extend underneath. Like.. if I have something say, 'Article appeared in Issue 07 - Click here for article'. I'd want to be able to click that simple text, not necessarily a link, and I could copy the article from the issue and put it in the html to show up when I click that. I'm only trying to make things more simple without involving outside links.

jscheuer1
11-20-2005, 04:10 AM
I'd recommend:

http://www.dynamicdrive.com/dynamicindex17/switchcontent.htm

If you don't want the pluses and minuses, simply change this part:


var contractsymbol='- ' //HTML for contract symbol. For image, use: <img src="whatever.gif">
var expandsymbol='+ ' //HTML for expand symbol.

to:


var contractsymbol=' ' //HTML for contract symbol. For image, use: <img src="whatever.gif">
var expandsymbol=' ' //HTML for expand symbol.

Another script to consider is:

http://www.dynamicdrive.com/dynamicindex17/switchcontent2.htm

Again, on that one, if you don't want the symbols, in this case where it has:


var contractsymbol='minus.gif' //Path to image to represent contract state.
var expandsymbol='plus.gif' //Path to image to represent expand state.

Use a transparent .gif like so:


var contractsymbol='transparent.gif' //Path to image to represent contract state.
var expandsymbol='transparent.gif' //Path to image to represent expand state.

Lincoln
11-20-2005, 09:18 AM
That's kind of what I want, but the font on my page is set to be 8pt and that code makes that specific text much larger and out of place. I was hoping to click on text like you would a link, unlike that code where the entire line it's on will extract it. It also seems to enter a few br's or p's before and after it without being able to get rid of them. I'm sure I'm not making much sense as all I've ever worked with is really simple html.

jscheuer1
11-20-2005, 09:35 AM
That's kind of what I want, but the font on my page is set to be 8pt and that code makes that specific text much larger and out of place. I was hoping to click on text like you would a link, unlike that code where the entire line it's on will extract it. It also seems to enter a few br's or p's before and after it without being able to get rid of them. I'm sure I'm not making much sense as all I've ever worked with is really simple html.

Pretty much makes sense. The text size can be set using css, as can spacing. Limiting the target area should be able to be accomplished fairly easily though, unlike the first two issues, I have no experience doing so. It would require tweaking the markup a bit and perhaps some css support as well.

If you are game, setup a demo page using your content. Just get it working, don't worry about text size, spacing or limiting the click targets unless you see a way to do so. Put the page up on the web somewhere (it can just be an orphan test page with no page linking to it) give us the URL to it and I'll work out these formatting issues.

About the click targets' texts, marking them with spans of a specific color and/or background color will help me to identify them. Or mark them with:


<b><u>click target text here</u></b>

Lincoln
11-20-2005, 01:04 PM
Geocities was the only place I could think of uploading it, since I use Yahoo Mail. This isn't even really for a web site, more so linking personal txt and html files that I have for easy reading and viewing.

http://www.geocities.com/discographyof/Database.html

What I want done with that is to be able to click (and hover over like links, hopefully, but probably not) Champions, Characters, Superfluous and Company Past and have information extended right underneath them where I can add my own information and even more links. The code you suggested likely wouldn't work seeing as I have links (hall of fame, group history) after what I want to be an extended link (company past). Seems to be there isn't a simple method for this. Originally I just wanted it to be like some a href code that I could place anywhere without getting things messy and hard to read/edit. I appreciate the help.

Lincoln
12-02-2005, 07:21 PM
There has to be a way to do this..