-
solution?
did u find a solution bytemonster ???
cheers
alex
-
ok, here's what I did. All the xml info is in nodes, including the url. I could never get more than 128 characters out of the html href link in the xml, so I put a button over the text box, imported the url as a variable into the getURL function and it worked fine with some tweeking. You can see the temporary results at http://micasa.bytemonster.com. I'm still working on the sections.
---------------
bytemonster
-
Hi all,
In regards to the 128 character limit on links, there is a reasonably simple workaround.
In your XML, you will need to store your links seperately, and give each one a unique ID, eg:
PHP Code:
<FILM>
<LINKS>
<LINK id="link1" href="http://weblogs.asp.net/TWalters/?bigString=0123456789 0123456789 0123456789 0123456789 0123456789 0123456789 0123456789 0123456789 0123456789 0123456789 0123456789 0123456789 0123456789" target="_blank" />
</LINKS>
<TITLE>
<font color="#0000FF">
<a href="asfunction:openLink,link1">About Schmidt</a>
</font>
</TITLE>
<CLIENT>New Line Cinema</CLIENT>
<PROJECT>Mixing and Mastering in 5.1 & 2.0</PROJECT>
</FILM>
Now, when you render this it will look fine, but the link won't do anything, so you need to add this magic little function to your code:
code:
function openLink( linkID )
{
// assuming the XML document is 'xmlFilms'
var xmlLinkNode = xmlFilms[ linkID ];
getURL( xmlLinkNode.attributes.href, xmlLinkNode.attributes.target );
}
This works because the getURL method isn't limited by the 128 character restriction.
Let me know if you have any troubles getting this to work.
Hope this helps!
Tim Walters
Senior Developer
XML Evangelist
"XML isn't a language, it's a way of life!"
-
Thanks I'll give that a try and let you know how it goes.
---------------
bytemonster
-
could you put the fla/xml files online so i can look at the code as i want to use this for my portfolio section?
thanks
a
-
okay.... I have read this thread and tried to make links working with plain xml, but in vain.
My code goes like this:
PHP Code:
<Lista>
<DVD>
<Ostovuosi>2003</Ostovuosi>
<Genre>Toiminta</Genre>
<Nimi>Testi</Nimi>
<Region>R2</Region>
<Arvostelu></Arvostelu>
</DVD>
</Lista>
Now that last element Arvostelu. I would like to include link and image on that and by clicking that image it would open review-site of that DVD.
Now I have tried for example this to make even that link working:
PHP Code:
<Arvostelu><a href="http://whateverdvd.com">DVD</a></Arvostelu>
also this
<Arvostelu href="http://whateverdvd.com">DVD</Arvostelu>
Nothing happens... I can't see DVD-text on that Arvostelu column.
My old design can be seen in here: DVD-list
If you view source, you can see how "messy" it is... so it would be far more easier to update my dvd-list by using xml.
any ideas how to get links working and that little review image?
Thank for advance
Last edited by Mikaq; 10-25-2003 at 11:20 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|