Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > title tag question

title tag question
Thread Tools
Mac Elite
Join Date: Dec 2000
Location: Tempe, AZ
Status: Offline
Reply With Quote
Aug 25, 2004, 03:17 PM
 
I would like to use the "title" attribute in the table's "td" tag, so that the browser could view some info about the specific link that is visible in the table.

Most of that info comes from a database, and can contain HTML code. Unfortunately I cannot use php code, or any kind of JavaScript to strip out the HTML code from the entry. Sometimes entries do contain HTML code, which can break the page's layout.

I know that I need to place the info within the title attributes qoutes...like this.
Code:
<td title="info">
So let's assume that info will contain HTML coe, and I cannot use any scripting to strip out the HTML code from info. Is there a way in HTML, where I could add something to that "info" part to make it non browser rendered? I tried the
Code:
<td title="<!--info-->">
Something along these lines?
     
Grizzled Veteran
Join Date: Jun 2001
Location: Melbourne, Australia
Status: Offline
Reply With Quote
Aug 25, 2004, 06:12 PM
 
Originally posted by t_hah:
I would like to use the "title" attribute in the table's "td" tag, so that the browser could view some info about the specific link that is visible in the table.

Most of that info comes from a database, and can contain HTML code. Unfortunately I cannot use php code, or any kind of JavaScript to strip out the HTML code from the entry. Sometimes entries do contain HTML code, which can break the page's layout.

I know that I need to place the info within the title attributes qoutes...like this.
Code:
<td title="info">
So let's assume that info will contain HTML coe, and I cannot use any scripting to strip out the HTML code from info. Is there a way in HTML, where I could add something to that "info" part to make it non browser rendered? I tried the
Code:
<td title="<!--info-->">
Something along these lines?
If you don't have server-side scripting then how are you retrieving your database fields?

I haven't tried this, but I'd assume that if you put your HTML into comments then the browser would ignore the contents completely.

Ideally you would want a 'safe' version of your information (e.g. stripped of all HTML tags but leaving entities as-is) for this purpose - is it possible to do this from the database rather than from the page itself?
Computer thez nohhh...
     
t_hah  (op)
Mac Elite
Join Date: Dec 2000
Location: Tempe, AZ
Status: Offline
Reply With Quote
Aug 25, 2004, 06:43 PM
 
Sorry for not craifying this up front.
The problem is not with the server side scripting. We are running a blogging system, and most of our info is stored in a database. Then we use templates in the blogging software to edit the appearance of some parts of the site. This is where we are not allowed to use any kind of scripting, only strict HTML code.

I have the option to use some (of the blogging system's) built-in functions in these templates. They get some data from the database, such as a specific entry.

So in the template we have tables, and I would like to use the "title" attribute to provide some more information on a specific item. I would like the title to list the main part of the entry. Sometimes entries include HTML links and codes, which seem to brake the coding.

In my previous entry if the word "info" is replaced by some of the database entries, because of their HTML content the title attribute gets closed too much in advance and then breaks the layout of the rest of the page. It gets really ugly.
I tried to find a way to strip out all HTML content of the database entry, but because of the limitations of the blogging software it is just not possible. So I figured that if I could somehow make the browsers ignore HTML tags between the title attribute's quotes, things would work.

I have not found a way yet.
     
Grizzled Veteran
Join Date: Jun 2001
Location: Melbourne, Australia
Status: Offline
Reply With Quote
Aug 25, 2004, 07:44 PM
 
Is it an open-source or documented blogging system? Somewhere to find out what is and isn't supported in the templates?
Computer thez nohhh...
     
t_hah  (op)
Mac Elite
Join Date: Dec 2000
Location: Tempe, AZ
Status: Offline
Reply With Quote
Aug 25, 2004, 09:11 PM
 
It is pmachine. It is known (to my best knowledge) that php and scripting in general is not supported within the templates.
     
   
Thread Tools
Forum Links
Forum 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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 01:11 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2