Question

I'm getting a javascript error when using coda slider in IE8:

"Expected ']'"

Weird thing is that it only triggers when I put it online. If I use the localhost version of the site, nothing happens.

The error occurs when using:

echo '<a href="javascript:void(null);" onclick="$.prettyPhoto.open(
 [\''.implode('\',\'',$pp['gallery']['link']).'\'],
 [\''.implode('\',\'',$pp['gallery']['title']).'\'],
 [\''.implode('\',\'',$pp['gallery']['description']).'\']
);">gallery</a>';

any ideas?

Was it helpful?

Solution

Is one of your variables having a simple quote ?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top