0

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.

<?php
	$paintingBack=$paintingNumber-1;
	$paintingNext=$paintingNumber+1;
	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>
2
Contributors
5
Replies
6
Views
6 Years
Discussion Span
Last Post by ksquared
0

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>
0

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.

0

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

0

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

0

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.