PDA

View Full Version : Javascript to chart custom html tags



whoknowswhat
12-24-2007, 03:20 AM
Hello,

I am looking to make custom html tags for dynamic use, I want to be able to have a custom tag that uses the strong attribute but uses a different name.
For Example

test.html:


<html>
<head>
<script type="text/javascript" src="tags.js"></script>
<script type="text/javascript" src="replacement.js"></script>
<script type="text/javascript" src="replacement2.js"></script>
<script type="text/javascript" src="replacement3.js"></script>
<head>
<body>
<logo1>Test</logo1>
</body>
</html>


replacement is a script I use to generate my fonts with php and javascript, I enter the tag I want to change in there and it does it.

The custom tags work in Fire Fox without a problem, but only the text is shown in IE instead of the images the text generates. It is limiting to cover any tag but strong, and I need 3 different sizes to make the logo, so I then have to use the header tags, and those create extra space in the logo.

So I want a file to tell IE that a tag has the attribute of another, and it will likely no longer degrade in IE

Example Psudo:


tag .logo1="strong"
tag .logo2="strong"


And I would like that in an external javascript.

Any pointers would be appreciated.

If there is another way to do this I am open to suggestions, the script I am using is required to take over a tag to make the swap, so any way I can make a custom tag IE will except will do:D

whoknowswhat
12-30-2007, 07:30 PM
I am still unable to figure this out, if I do I will post my code in this thread for the community.

Helllllo
12-30-2007, 07:38 PM
You need xml

whoknowswhat
01-02-2008, 11:56 PM
You need xml

Thank you for your response, but xml is not quite an option.
For some reson IE does not like when I make my custom tag with it, it does not load the php or javascript and says error on page. I need to have a way to make a tag up, and have javascript list what the tag does. It will be an xml tag, but I need an external javascript to contain the tag information, it's attributes. I am using javascript and php to dynamically display content with a custom font. I just need to know how to make something like tags.js with tag "logo1" = "replacement1.js"
tag "logo2" = "replacement2.js"

Trinithis
01-03-2008, 12:42 AM
You could just use a span (or a div) element to simulate it via a classname.