function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Luke@TWSLuke@TWS 

Editor Javascript bug?

Having a little problem with the page editor, if i'm adding a little javascript like

Code:
    for (i=0; i<categories.length;i++)
{
var option = document.createElement("Option");
option.value = boundaries[i];
option.text = categories[i];
option.style.fontWeight = "bold";
try { lstA.add(option,null); }
catch (e) { lstA.add(option); }
}

the page gets generated with:

Code:
        for (i=0; i<categories fontWeight="bold" .length;i++)
{
var option = document.createElement("Option");
option.value = boundaries[i];
option.text = categories[i];
option.style.;
try { lstA.add(option,null); }
catch (e) { lstA.add(option); }
}

 
 



Message Edited by Luke@TWS on 07-23-2008 07:14 AM
dchasmandchasman
Yes, this one is wacky. Its not an issue with the editor - same thing would happen via the API - the problem is with some of the post processing we do in visualforce. That logic is identifying <categories as the start of a tag. The workaround for now is to put some whitespace between the < and categories.

I do get a warning in the online VF page editor:

Warning: Element type "categories" should be followed by either attribute specifications, ">" or "/>". at line 3

I've opened a bug for my team to track this issue.



Message Edited by dchasman on 07-23-2008 11:24 AM
Luke@TWSLuke@TWS
Ah excellent, didn't even think of that as it was happening when I put the line in with speach marks. Cheers!