syntax error

driveflexfuel

New Member
Messages
159
Reaction score
0
Points
0
i am receiving a syntax error in this chunk of coding and for some reason I can not find it. I am hoping a second set of eyes or someone a little better at php could help me. If there is an easier way or better way of doing this please let me know.

Code:
<?php 
    include('cart_form.php');
    include('details/item_details.php');
    $page_id = "2VAB_EV1"; 
    include('comments/comments/comments_show.php');
    ?>

    <form method="POST" name="sample" action="leave_comment.php" onsubmit="return createTarget(this.target)" target="formtarget">
    <?php 
    echo "<input type='hidden' name='product_id' value='" . $page_id . "' />";
    ?>
    <input type='image' name='submit' src='../images/comment.jpg' onmouseover='this.src='../images/comment1.jpg';' onmouseout='this.src='../images/comment.jpg';' border='0' name='submit' alt='Leave a comment' />
    </form>
 

mephis

New Member
Messages
39
Reaction score
0
Points
0
Code:
(...)
onmouseover='this.src='../images/comment1.jpg';'
onmouseout='this.src='../images/comment.jpg';'
(...)

try this:
Code:
(...)
onmouseover='this.src="../images/comment1.jpg";'
onmouseout='this.src="../images/comment.jpg";'
(...)

using single quotes both in the html and the javascript is giving you the error, just use single quotes for one thing and double quotes for the other
 
Last edited:

driveflexfuel

New Member
Messages
159
Reaction score
0
Points
0
It is always the smallest things that drive me nuts.

Thanks the code is working without error.

You may close this thread
 
Top