PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
nadya.fd
Forum Newbie
Posts: 4 Joined: Mon Sep 08, 2014 11:57 am
Post
by nadya.fd » Mon Sep 08, 2014 12:19 pm
Hello,
I always had "Error parsing" message in "--" brackets, example:
Code: Select all
<!-- <button
...
onclick="cancelOrder({productId:'-- Error parsing: Core.data.productId --', imgPath:'-- Error parsing: Core.data.imgPath --', action:'cancelOrder'});">
Cancel </button> -->
Now I have it in different brackets "<--" on some pages, which cause problems parsing HTML, example:
Code: Select all
<!-- <button
...
onclick="cancelOrder({productId:'<!-- Error parsing: Core.data.productId-->', imgPath:'<!-- Error parsing: Core.data.imgPath-->', action:'cancelOrder'});">Cancel-->
-->
Any ideas why???
Thank you!
Weirdan
Moderator
Posts: 5978 Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine
Post
by Weirdan » Mon Sep 08, 2014 12:28 pm
Because you can't have less-than (<) or greater-than (>) sign in attribute values. You need to use their html entity equivalents instead, < and > respectively.
nadya.fd
Forum Newbie
Posts: 4 Joined: Mon Sep 08, 2014 11:57 am
Post
by nadya.fd » Mon Sep 08, 2014 12:53 pm
Where do I have (<) or (>) as attribute value ?
There is no value by now, because Core.data array is empty.
donny
Forum Contributor
Posts: 179 Joined: Mon Aug 11, 2014 11:18 am
Post
by donny » Mon Sep 08, 2014 7:30 pm
Code: Select all
<button onclick="cancelOrder({productId:'<!-- Error parsing: Core.data.productId --!>', imgPath:'<!-- Error parsing: Core.data.imgPath --!>', action:'cancelOrder'});">
Cancel</button>
the brackets you had in your error message comments out your code when parsed. you need to replace the brackets with their correct entities
--abreadupandmytopdown--
nadya.fd
Forum Newbie
Posts: 4 Joined: Mon Sep 08, 2014 11:57 am
Post
by nadya.fd » Tue Sep 09, 2014 8:58 am
Absolutely, donny!!!
The question is "Where do they come from?"
It is a part of the "Error parsing" message. Why?
message suppose to be like " --Error parsing--" and now it is like"<!--Error parsing-->"