Author |
Message |
Registered: April 10, 2007 | Posts: 51 |
| Posted: | | | | Hi, Is it possible to display a tag name, if it is checked, in a HTML window? I have sorted my DVD's into sections, say S1, S2, S3. I also have three tags S1, S2, S3. Depending on where the DVD is located, one of the tags will be checked. Is there a way to display that this tag has been checked. I only want one of these three to be displayed. For example, if I had another tag TO WATCH which is also checked, I would not want this displayed in the window. Any help on this would be greatly appreciatied. I'm not sure if it's a mammoth task or not Thanks, Spike |
|
Registered: March 13, 2007 | Reputation: | Posts: 2,005 |
| |
Registered: April 10, 2007 | Posts: 51 |
| Posted: | | | | It works. Thank you! |
|
Registered: June 9, 2007 | Posts: 1,208 |
| Posted: | | | | That's great Tom, but is there any way of inserting a comma and space between each displayed tag? |
|
Registered: March 13, 2007 | Posts: 350 |
| Posted: | | | | where it says "document.write(tag);" change it to "document.write(tag+', ');"
and yes, that will leave a trailing comma space after the last tag. | | | -fred | | | Last edited: by FredLooks |
|
Registered: June 9, 2007 | Posts: 1,208 |
| Posted: | | | | Of course, can't believe that didn't occur to me Cheers Fred. |
|
Registered: April 10, 2007 | Posts: 51 |
| Posted: | | | | What if S1, S2 and S3 are child tags of Location?
Is this still possible?
Thanks |
|
Registered: March 13, 2007 | Reputation: | Posts: 2,005 |
| Posted: | | | | Quoting SpikeX: Quote: What if S1, S2 and S3 are child tags of Location?
Is this still possible?
Thanks Change it to if (tag=="Location/S1" || tag=="Location/S2" || tag=="Location/S3") document.write(tag); or better if (tag.match("Location/") document.write(tag); | | |
| | | Last edited: by TomGaines |
|
Registered: June 9, 2007 | Posts: 1,208 |
| Posted: | | | | Quoting TomGaines: Quote: [...] or better
if (tag.match("Location/") document.write(tag); I had to add in another ) to get that to work Tom. if (tag.match("Location/") ) document.write(tag); Great work though, certainly is easier than specifiying each tag. I have a question though, is it possible to prevent the parent tag being displayed with every child tag? | | | Last edited: by MarEll |
|
Registered: March 13, 2007 | Reputation: | Posts: 2,005 |
| Posted: | | | | Quoting MarEll: Quote: I have a question though, is it possible to prevent the parent tag being displayed with every child tag? Somthing like this should do the trick: if (tag.match("Contributions/")) document.write(tag.substring(tag.lastIndexOf("/")+1)); | | |
|
|
Registered: June 9, 2007 | Posts: 1,208 |
| Posted: | | | | Awesome. Cheers again Tom |
|
Registered: April 10, 2007 | Posts: 51 |
| Posted: | | | | Thank you again! |
|
Registered: January 5, 2009 | Posts: 6 |
| Posted: | | | | i, I'm trying to make a layout that shows awards icons/images. I have award tags,... but, I don't know how to make a script that connect images and tags
any suggestions?
Thanks |
|
Registered: April 4, 2007 | Posts: 884 |
| Posted: | | | | Quoting TomGaines: Quote: Quoting MarEll:
Quote: I have a question though, is it possible to prevent the parent tag being displayed with every child tag?
Somthing like this should do the trick:
if (tag.match("Contributions/")) document.write(tag.substring(tag.lastIndexOf("/")+1)); Tom, your post is basically the only mention I find of DP_Tags. Is there a complete list of the header vars somewhere, or can it maybe be generated within DVDP? Edit: AH, found it! It's in the generated HTML. | | | - Jan | | | Last edited: by hydr0x |
|