Jump to content


data is saved in db, but form wont close itself and go to list view [shows 'Uncaught SyntaxError: Unexpected token g' on console]

Uncaught SyntaxError: Unexpe

  • Please log in to reply
1 reply to this topic

#1 Sam Stha

Sam Stha

    Newbie

  • Members
  • Pip
  • 4 posts

Posted 15 September 2014 - 02:16 AM

Firefox::

error on console:

SyntaxError: JSON.parse: expected ',' or '}' after property value in object at line 1 column 131 of the JSON data

POST Insert response:

{"success":true,"insert_primary_key":48,"success_message":"<p>Your data has been successfully stored into the database. <a class='go-to-edit-form' href='http:\/\/localhost\/outsource\/jenish\/explorer-travel-system.com\/admin\/packages\/index\/edit\/48'>Edit Packages<\/a> <\/p>","success_list_url":"http:\/\/localhost\/outsource\/jenish\/explorer-travel-system.com\/admin\/packages\/index\/success\/48"}
 
 
 
 
On chrome::
console:
Uncaught SyntaxError: Unexpected token g

Attached Thumbnails

  • Screen Shot 2014-09-15 at 7.48.54 AM.png


#2 karlochev

karlochev

    Newbie

  • Members
  • Pip
  • 2 posts
  • LocationDeath Star - (Some calls it "Ecuador")

Posted 21 June 2019 - 04:14 PM

Hi,

 

I solved it by changing or delete the chars "<" to "&lt;" and ">"... and other special characters, for their corresponding html character. 

 

 

 

Firefox::

error on console:

SyntaxError: JSON.parse: expected ',' or '}' after property value in object at line 1 column 131 of the JSON data

POST Insert response:

{"success":true,"insert_primary_key":48,"success_message":"<p>Your data has been successfully stored into the database. <a class='go-to-edit-form' href='http:\/\/localhost\/outsource\/jenish\/explorer-travel-system.com\/admin\/packages\/index\/edit\/48'>Edit Packages<\/a> <\/p>","success_list_url":"http:\/\/localhost\/outsource\/jenish\/explorer-travel-system.com\/admin\/packages\/index\/success\/48"}
 
 
 
 
On chrome::
console:
Uncaught SyntaxError: Unexpected token g

 






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users