Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
VF and script tags
JvdW
Hi,
Does someone know how I can add a piece of javascript code to a Visual Format field? I did the following (in HTML view):
<script language="javascript">document.write("hello world");</script>
When I change to WYSIWYG mode all you see at the position of the javascript is //
When I then change back to HTML view, VF has changed my code to:
<script language="javascript">//<!--document.write("hello world");
//--></script>
When I now generate the html page, the javascript code will not work! Please help!
Regards,
JvdW
Find more posts tagged with
Comments
Migrateduser
I think the solution may be to add linefeeds around the code.
<script language="javascript">
document.write("hello world");
</script>
Migrateduser
Same issue here. If you enter the following in the VFE HTML mode:
<script></script>
The "cleaning" process transforms it into:
<script>//<!--
//--></script>
...which causes unwanted "//" in the WYSIWYG mode. Does anyone have any suggestions?
TeamSite 5.5.2 SP2 on Solaris.
Thanks,
Dan Pike
Senior Consultant
Trinity Consulting Group, Inc.
dpike@trinitycg-inc.com
MattP
you should be able to change the autoclean functions in your config file. somewhere around...
<!-- publish options are "minimal", "cleanhtml", "xhtml" -->
<standard autoclean="true" publish="cleanhtml">
matt
Matthew Petitjean
BOC Group
Murray Hill, NJ 07974 USA
lawspetvetri
Is there any definite solution for this problem?
It would be great if someone could reply with the solution.
Thanks,
Vetri
gzevin
I don't think that this issue relates to code cleanup. As far as I have seen, VF always does this, it can even fail to open a DCR that will have some Javascript or FORM code in it.
My advice - if one has to do insert some code like this - enter it in a plain textarea
Greg Zevin, Ph.D. Comp. Sc.
Independent Interwoven Consultant/Architect
Sydney, AU
HTML.dsc
KTReddy
There is some solution for the following issues:
it can even fail to open a DCR that will have some Javascript or FORM code in it.
-- Refer the following article and you can fix it and also you can continue using VFE for your text area:
https://support.interwoven.com/kb/kb_show_article2.asp?ArticleID=53983
I was able to solve similar problem by following this article.
gzevin
yes, this is why I wrote initially that I saw some ektron articles on that....
Greg Zevin, Ph.D. Comp. Sc.
Independent Interwoven Consultant/Architect
Sydney, AU