You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.
The reason is that IE7 doesn't allow trailing commas in object notations.
The following fixes the issue:
change:
var categoryData = {
animals: {
name: "Animals",
description: "All your favorites from aardvarks to zebras.",
items: [
{
name: "Pets",
},
{
name: "Farm Animals",
},
{
name: "Wild Animals",
}
]
...
to:
var categoryData = {
animals: {
name: "Animals",
description: "All your favorites from aardvarks to zebras.",
items: [
{
name: "Pets"
},
{
name: "Farm Animals"
},
{
name: "Wild Animals"
}
]
...
Even though JavaScript does allow trailing commas in objects and arrays (which makes the sample valid JavaScript code for non-IE7 browsers), the JSON specification to my knowledge does not.
The In-Memory dynamic page loading sample is broken in IE7.
it throws the following exception:
SCRIPT1028: Expected identifier, string or number
sample-reuse-page.html, line 22 character 4
link is on the following page:
http://jquerymobile.com/demos/1.0/docs/pages/page-dynamic.html
and points to:
http://jquerymobile.com/test/docs/pages/dynamic-samples/sample-reuse-page.html
The reason is that IE7 doesn't allow trailing commas in object notations.
The following fixes the issue:
change:
var categoryData = {
animals: {
name: "Animals",
description: "All your favorites from aardvarks to zebras.",
items: [
{
name: "Pets",
},
{
name: "Farm Animals",
},
{
name: "Wild Animals",
}
]
...
to:
var categoryData = {
animals: {
name: "Animals",
description: "All your favorites from aardvarks to zebras.",
items: [
{
name: "Pets"
},
{
name: "Farm Animals"
},
{
name: "Wild Animals"
}
]
...
Even though JavaScript does allow trailing commas in objects and arrays (which makes the sample valid JavaScript code for non-IE7 browsers), the JSON specification to my knowledge does not.
I would also fix the sample code on http://jquerymobile.com/demos/1.0/docs/pages/page-dynamic.html .
Daniel
The text was updated successfully, but these errors were encountered: