The full error message is:

missing ) after argument list
[Break On This Error] change_content('imagediv', '<img src='images/painting_2.jpg'>');

Maybe I've been staring at this for too long, but I believe the parentheses are in the correct position. This code is contained in an include.

Thank you.

	if ($paintingBack < 1) {
	$paintingBack = $paintingBack + 1;
		<a href="" class='link' onFocus='if(this.blur)this.blur()' onclick="change_content('imagediv', '<img src='images/painting_<? echo $paintingBack; ?>.jpg'>');"><img src='images/braceL.gif' alt='brace' width='20' height='11' valign='text-bottom'/></a>
7 Years
Discussion Span
Last Post by ksquared

You need to escape the single quotes in function call.

<a href="#" class='link' onFocus='if(this.blur)this.blur()' onclick="change_content('imagediv', '<img src=\'images/painting_<? echo $paintingBack; ?>.jpg\'>');"><img src='images/braceL.gif' alt='brace' width='20' height='11' valign='text-bottom'/></a>

Hi, paulrajj, thank you!

Getting close. But, I think, because of the back slash after <img src= the upper level directories are listed:
The requested URL /meg/peek/<img src='images/painting_2.jpg'/> was not found on this server.

But without the forward slash there, the old missing ( pops up.


just replace your existing anchor part with my code. remove the backslash(/) from img tag. You need to use forward slashes to escape the quotes.

Edited by paulrajj: n/a


Oh, sorry, I was calling \ a backslash. I did use your code exactly and got the path problem.


Sorry it's taken me so long to get back here. I was up for days. I finally abandoned the change_content function. The escape character was never recognized.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.