Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7009097
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T21:49:09+00:00 2026-05-27T21:49:09+00:00

I keep getting a missing ) after argument list (on line 1) when debugging

  • 0

I keep getting a “missing ) after argument list” (on line 1) when debugging my javascript with firebug. I don’t know what is wrong as it seems all parentheses are there.

The function is supposed to place an image that can be clicked to open a lightbox in the div with id “bigPic”.

Here’s the relevant code:

<script type="text/javascript">
function addContent(divId,filePath,comment) {
document.getElementById(divId).innerHTML = "<div align=\"center\"><a href="+filePath+" title="+comment+" rel=\"lightbox\"><img src="+filePath+" alt="+comment+" style=\"max-height:270px;max-width:410px;\"/></a></div><div id="+comment+" align=\"center\"  style=\"font-family:Verdana;margin-top:-13px;color:white;background-color:#07396B;\"><p>"+comment+"</p></div>&nbsp;";
}
</script>
...
<div width="420px" height="320px" id="bigPic" name="bigPic">
<img src="http://www.villa-gloria-katouna.com/Pool%20viewsmall.JPG" />
</div>
...
echo "<div align=\"center\" style=\"display:inline; overflow:hidden;\"><img src=\"pics/$file\" style=\"cursor:pointer;cursor:hand;\" alt=\"$file\" height=\"30px\" width=\"30px\" onclick=\"addContent('bigPic', $file, $comment);\"/></a></div>&nbsp;";
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T21:49:09+00:00Added an answer on May 27, 2026 at 9:49 pm

    I think you forgot quote characters around “$file” and “$comment” in the “onclick” handler code.

         ... onclick=\"addContent('bigPic', '$file', '$comment');\" ...
    

    I don’t know PHP so that may or may not be the way to get quotes in the “onclick” string, but they need to be there. Otherwise if the comment is “hello world” that’ll expand to

         ... onclick="addContent('bigPic', whatever-$file-is, hello world)" ...
    

    which is clearly incorrect.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I keep getting an error, missing { after property for the following code. <script
I keep getting that my javascript is missing ) in parenthetical [Break On This
I'm not sure if I'm missing something really obvious, but I keep getting a
Keep getting this error after inserting a subdatasheet into a query and trying to
I keep getting this : DeprecationWarning: integer argument expected, got float How do I
I keep getting a 'List does not exist' error whenever I try and use
I keep getting the following error after I put the required files in my
I keep getting the same error: Missing Operator. I have looked over this code
Not sure what my problem is. On line 4 I keep getting an error.
I am trying to use 'GetModuleFileNameA' but I keep getting the error 'c4430: missing

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.