Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 07-30-2010, 06:20 AM   PM User | #1
dangerouslydead
New to the CF scene

 
Join Date: Jul 2010
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
dangerouslydead is an unknown quantity at this point
Unhappy What seems to be wrong in the line?

I am trying to implement a javascript on a page and the error that I get is

Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /fullsize/image.php on line 131

On line 131 the code is

Code:
echo"<img id='thepic' onClick="scaleImg('thepic')" onLoad="scaleImg('thepic')" src='$image'>";
dangerouslydead is offline   Reply With Quote
Old 07-30-2010, 07:19 AM   PM User | #2
Old Pedant
Supreme Master coder!

 
Old Pedant's Avatar
 
Join Date: Feb 2009
Posts: 23,556
Thanks: 62
Thanked 4,056 Times in 4,025 Posts
Old Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to all
That's a PHP error.

Ask the question in the PHP forum.

Oh, w.t.h. I don't code in PHP, but even I can see that obvious error:

You are using a " *INSIDE* of a "..." delimited string!

Either change to using apostrophes inside the "..." string or use \" to escape them.
__________________
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.
Old Pedant is offline   Reply With Quote
Reply

Bookmarks

Tags
error, image resizing

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 05:59 PM.


Advertisement
Log in to turn off these ads.