Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Code Interpretation in component
liv2luv
[html]
document.location='http://
';
[/html]
What does the above piece of code doing? Appreciate if any one can please explain it.
Thanks
Find more posts tagged with
Comments
Stokes
When transforming, it's expecting the value of the current XML node (
select="."
) to be a URL. It's setting an
onclick=
handler for the current output element that will change the current page to that URL. The URL might be missing the protocol prefix, so its prepending "
http://
" if it doesn't look like there is one.
So the output will be something like:
<myElement onclick="document.location='
http://some.url.value';"/>
Stokes