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 8348093
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T07:35:08+00:00 2026-06-09T07:35:08+00:00

i have done something like that; <div id=bloc2 onDblClick=document.getElementById(‘bloc2’).style.height = 200px style=width: 350px; height:

  • 0

i have done something like that;

    <div id="bloc2" onDblClick="document.getElementById('bloc2').style.height = 200px" style="width: 350px; height: 150px; overflow: auto; border: 1px solid #000;background-color:#F2F2F2">
Uncaught SyntaxError: Unexpected token ILLEGAL

but it doesn not work
the div is generated using php, here is my code:

<?php 
$sql = "SELECT * FROM commentaire where n_doss='".mysql_real_escape_string($_GET['n_doss'])."' ORDER BY date DESC LIMIT 0,5";
$result = mysql_query($sql) or die(__LINE__.mysql_error().$sql); 
?>
    <?php
     $r=0;
     while($donnees2 = mysql_fetch_assoc($result)) {
      ?>
      <table cellspacing="10" cellpadding="10">
        <tr>
           <td width="128px">
           <?php if ($donnees2['etat']=="VR") {?>
                <img src="images/wallet.png" />
           <?php } else {?>
                <img src="images/newsletter.png" width="128" height="128" />
           <?php } ?>
           </td>
           <td>
             <div id="bloc<?php echo ++$r ;?>"                  
                  onDblClick="document.getElementById('bloc<?php echo $r ;?>').style.height = 200px" 
                  style="width: 350px; height: 150px; overflow: auto; border: 1px solid #000;background-color:#F2F2F2">
                <?php echo mb_strtoupper(html_entity_decode($donnees2['commentaire'])) ; ?>
            </div>

but nothing works, except mistakes in the console.

Kind regards.

  • 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-06-09T07:35:09+00:00Added an answer on June 9, 2026 at 7:35 am

    In the line

    <div id="bloc2" onDblClick="document.getElementById('bloc2').style.height = 200px" style="width: 350px; height: 150px; overflow: auto; border: 1px solid #000;background-color:#F2F2F2">
    

    you have Javascript error:

    document.getElementById('bloc2').style.height = 200px
    

    The 200px should be a string, YOU HAVE TO ADD QUOTES so use this line instead:

    document.getElementById('bloc2').style.height = '200px'
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've done enough Googling to know that if I have something like class SubObject
I have a div class that looks something like this: <div class=objects> X </div>
i have done something like this: <form action=validate.php method=get> Id :<input type=text name=pID/><br/><br/> Name
I am trying to create something like this as i have done it in
Hey guys, I have a UL like so: <ul id=list> <li class=something> <div class=btns
I have a div in fixed position that i like to make it center
I have some code on my page that looks like this: <div class=img-center> <img
I think I might have done something right, headByRating and headByName both refer to
I must have done something wrong. I have a C# project in Visual Studio
I have just done something without thinking it through. I have made a branch

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.