You need to sign in to do that
Don't have an account?
javascript gets mangled
I have some Javascript in a visualforce page that looks like this.
...
jQuery('#previewOrderPane')
.append('<table id="previewOrderTable"></table>');
...
if (previewUrl != "") {
previewUrl = '<a href="' + previewUrl + '" target="_blank">Preview...</a>';
}
...
But in a browser, this is what I see in the source.
Not sure if this is related, but if I edit the page in the Salesforce setup area (rather than Eclipse), I always get this warning:
Warning: The element type "param" should be terminated by the matching end-tag "</param>" at line 82
Always at line 82. I don't have a param element on the page. I can strip the page all the way down to this:
<apex:page controller="DirectMailOrderController" title="Marketing Supplies Order" tabStyle="Case" id="mainPage">
<h1>Marketing Supplies Order</h1>
</apex:page>
And I still get the same warning thus telling me that it's not invalid xhtml that is the problem.
I think I've solved it.
I changed the version on the Visualforce page from 16.0 to 20.0 and so far so good.
I'm not sure why I even thought to do that. Probably because the mention of the xhtml parser in the linked thread.