开发者

jquery form dialog dissapears if i use effect

i am using JqueryUI and everything was fine until i tried to jazz it up and added an effect for showing and closing the dialog. Now the dialog appears and disappears in an instant.

I am using CAKEPHP, if that matter and still have cake.generic.css on and the debug option on, but i dont see how this could matter.

here is my output html code:

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="/js/jquery-1.4.2.min.js"></script>
<link type="text/css" href="/css/blitzer/jquery-ui-1.7.2.custom.css" rel="stylesheet" />    
<script type="text/javascript" src="/js/jquery-ui-1.7.2.custom.min.js"></script>
<script type="text/javascript" src="/js/unprocessed.js"></script>
<table>
    <tr> 
        <th><a href="/unprocessed/index/page:1/sort:id/direction:asc">ID</a></th> 
        <th><a href="/unprocessed/index/page:1/sort:artist/direction:asc">Artist</a></th> 
        <th><a href="/unprocessed/index/page:1/sort:title/direction:asc">Title</a>开发者_JAVA百科;</th> 
        <th><a href="/unprocessed/index/page:1/sort:path/direction:asc">Path</a></th> 
        <th><a href="/unprocessed/index/page:1/sort:filename/direction:asc">Filename</a></th> 
        <th>Actions</th>  
    </tr> 

    <tr id='row7'> 
        <td>7</td> 
        <td><div id='artistfield7'>Не в въведено</div> </td> 
        <td><div id='titlefield7'>Не е въведено</div> </td> 
        <td>e0aa1b15c9066822d2149664dd799f0b326.mp3 </td> 
        <td>110.Dimana&DJ Damjan - S teb shte prodylzha - remix.mp3 </td> 
        <td>

            <div class='actionscontainer' songid='7'>
                <div class="approve">Approve</div>
                <div class="edit">Edit</div>
                <div class="delete">Delete</div>
            </div>
        </td> 
    </tr> 

    <tr id='row6'> 
        <td>6</td> 
        <td><div id='artistfield6'>Не в въведено</div> </td> 
        <td><div id='titlefield6'>Не е въведено</div> </td> 
        <td>e0aa1b15c9066822d2149664dd799f0b192.mp3 </td> 
        <td>116.Ivana - Nedej - remix.mp3 </td> 
        <td>

            <div class='actionscontainer' songid='6'>
                <div class="approve">Approve</div>
                <div class="edit">Edit</div>
                <div class="delete">Delete</div>
            </div>
        </td> 
    </tr> 

    <tr id='row5'> 
        <td>5</td> 
        <td><div id='artistfield5'>Не в въведено</div> </td> 
        <td><div id='titlefield5'>Не е въведено</div> </td> 
        <td>e0aa1b15c9066822d2149664dd799f0b148.mp3 </td> 
        <td>105.Glorija - Hipnoza.mp3 </td> 
        <td>

            <div class='actionscontainer' songid='5'>
                <div class="approve">Approve</div>
                <div class="edit">Edit</div>
                <div class="delete">Delete</div>
            </div>
        </td> 
    </tr> 

    <tr id='row1'> 
        <td>1</td> 
        <td><div id='artistfield1'>Не в въведено12</div> </td> 
        <td><div id='titlefield1'>Не е въведено</div> </td> 
        <td>87f037741115ba77a8774f769b625f91716.mp3 </td> 
        <td>Cage The Elephant - Ain't No Rest For The Wicked.mp3 </td> 
        <td>

            <div class='actionscontainer' songid='1'>
                <div class="approve">Approve</div>
                <div class="edit">Edit</div>
                <div class="delete">Delete</div>
            </div>
        </td> 
    </tr> 

</table> 



<div class="disabled"></div><div class="disabled"></div> 

1 of 1
<div id="dialog">
</div>

<div id="editform">
<input id='editid' type='hidden' value=''/>
Artist
<input type="text" id='editartist' size="255" value=""><br>
Title
<input type="text" id='edittitle' size="255" value=""><br>
</div><!-- 0.1914s --><table class="cake-sql-log" id="cakeSqlLog_12707049104bbd6b0e4bf0b5_15761383" summary="Cake SQL Log" cellspacing="0" border = "0">
<caption>(default) 3 queries took 1 ms</caption>
<thead>
<tr><th>Nr</th><th>Query</th><th>Error</th><th>Affected</th><th>Num. rows</th><th>Took (ms)</th></tr>

</thead>
<tbody>
<tr><td>1</td><td>DESCRIBE `unprocesseds`</td><td></td><td style = "text-align: right">5</td><td style = "text-align: right">5</td><td style = "text-align: right">1</td></tr>
<tr><td>2</td><td>SELECT COUNT(*) AS `count` FROM `unprocesseds` AS `Unprocessed`   WHERE 1 = 1   </td><td></td><td style = "text-align: right">1</td><td style = "text-align: right">1</td><td style = "text-align: right">0</td></tr>
<tr><td>3</td><td>SELECT `Unprocessed`.`id`, `Unprocessed`.`artist`, `Unprocessed`.`title`, `Unprocessed`.`path`, `Unprocessed`.`filename` FROM `unprocesseds` AS `Unprocessed`   WHERE 1 = 1   ORDER BY `Unprocessed`.`id` desc  LIMIT 25</td><td></td><td style = "text-align: right">4</td><td style = "text-align: right">4</td><td style = "text-align: right">0</td></tr>

</tbody></table>

and the javascript for the dialog:

$("#editform").dialog({
                        autoOpen: false,
                        show:'blind',
                        hide:'explode',
                        buttons:{
                            "Save Edits": function (){

                                var edid= ($('#editid').val());
                                var edar=($('#editartist').val());
                                var edtl=($('#edittitle').val());
                                $.post("edit/"+edid, { artist: edar, title: edtl }, function(data){
                                                                                             $("#artistfield"+edid).html(edar);
                                                                                             $("#titlefield"+edid).html(edtl);
                                                                                             $("#editform").dialog('close');
                                                                                             }, "json");

                                }
                            }
        }); 


I suspect you don't have the effects in your UI.js file. I see you have a custom one. Create another custom one and make sure you have the needed effects - http://jqueryui.com/download

For more detailed answer add a link to a test case so we can see in browser.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜