I want to open and dialog box on onclick of image.
for that , i had written below onclick code to call function and pass parameter to it.
this $skills_id is unique.
What I want next is,
using this $skills_id, I want open dialog box which fetches and shows details using taht perticular $skills_id

echo "<td><span>".CHtml::link('<input type="image"
                     title="Approve/Disapprove Skill" style="height:15px; width:15px" class="form-button1" value="VIEW" id="say_it">','#',

but how to open a dialog box?
i want it like

<div id='box2'>
<?$name= name($skill_id);
    Name: <? echo $name; ?>
    designation: <? echo $designation; ?>
    <!-- details like this. -->
    <div id='id_disapprove_note'>
 <span class='form_lable_'><?php echo CHtml::label('Comments','disapprove_comment').": "?></span>
        <?php echo CHtml::TextArea('disapprove_comment','',$htmlOptions=array('style'=>"width: 250px",'class'=>'required','rows' => 6, 
        'cols' => 28, 'maxlength'=>500,'id'=>'disapprove_note'.$skills_id ,'title'=>'Please provide comments for Disappoval')) ?>
    <? echo CHtml::button('approve', array('id'=>'approve','onclick'=>'approve(1,'.$skills_id.',"'.$EmployeeName.'","'.$EmployeeGSID.'")','style'=>'position:  absolute;margin-left:29%;',));?>
    <? echo CHtml::button('disapprove', array('id'=>'disapprove','onclick'=>'approve(2,'.$skills_id.',"'.$EmployeeName.'","'.$EmployeeGSID.'")','style'=>'position:  absolute;margin-left:45%;')); ?>

and on onclick, in approve ().
i want to take comments from box and close the dialog box.

Recommended Answers

All 2 Replies

Member Avatar

Hi Priti P,

There area number of ways to do that. You can write some custom javascript to display a dialogue pop up or you could use jquery ui like mentioned by AleMonteiro above or you can use simple window.open, a more better approach would be to use jquery based fancybox. It's super easy to use have a decent online documentation and very compatible accross various browsers.

Just to get you started here is the link to their site:



Hope this helps in resolving your query.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.