Welcome Guest, Not a member yet? Register   Sign In
unable to open modal pop up window
#1

i want to open modal window using php codeigniter. but the error occured.
Code:
<td>

<button class="btn btn-warning" onclick="edit_book(<?php echo $book['appno'];?>)"><i class="glyphicon glyphicon-pencil"></i></button> </td>
Uncaught ReferenceError: app005 is not defined

   at HTMLButtonElement.onclick (v_dashboard:190
Reply
#2

@kvanaraj,

The error is straight forward. What value is $book['appno'] returning? Does your modal id have the same name?
Reply
#3

(03-16-2019, 06:03 PM)php_rocs Wrote: @kvanaraj,

The error is straight forward.  What value is $book['appno'] returning?  Does your modal id have the same name?

foreach($books as $book){
        
          ?>
     <tr>
              
             <?php   echo '<td align="center">'.$sno++.'</td>';?>
                <td><?php echo $book['dai'];?></td>
                <td><?php echo $book['appno'];?></td>
<td>
<button class="btn btn-warning" onclick="edit_book(<?php echo $book['appno'];?>)"><i class="glyphicon glyphicon-pencil"></i></button>



</td>
Reply
#4

What does the edit_book() javascript function look like in your code?
Reply
#5

(03-19-2019, 02:49 PM)Wouter60 Wrote: What does the edit_book() javascript function look like in your code?

Exactly, this is a JavaScript question. It has nothing to do with CodeIgniter or PHP.
CodeIgniter 4 tutorials (EN/FR) - https://includebeer.com
/*** NO support in private message - Use the forum! ***/
Reply




Theme © iAndrew 2016 - Forum software by © MyBB