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
adreameradreamer 

API version 22 changes affect Javascript ?

Hi All,

 

Does the API version: 22 include new rules (strictness ?) when generating the pages that might affect the Javascript code ?

 

Using API version:19 I have a Visualforce page that has a button and when the user clicks on it:

- it calls a Javascript function. Whithin the function, it collects some data from the page (DOM) and creates a string wich is basically XML, and assigns this to a controller member (apex:inputText)

- goes back to the controller. In the controller it takes the XML in the momber updated in the page, and parses it.

 

This works fine with API version 19.

 

However, today I've changed the API version of all classes/components/pages via Eclipse from version 19 to version 22, the latest.

 

The same page know generates an exception which corresponds to a parsing exception within the controller. Looking closely, I've noticed that the XML generated in the Javascript  with API version 22 has the wrong mix of upper/lower cases.

 

For instance, if my XML is something like (just an empty element):

 

<MyXml></MyXml>

 

then when the page is with API version 22, the console shows the following:

 

<MyXml></myxml>

 

and this creates a parsing error in Apex and says that <MyXml> must be terminated by a </MyXml>.

 

I reverted back to API version 19 and it is all fine again.

 

Any ideas ?

 

Thanks,

Fernando