Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Why this does not work - what is wrong?
Message
 
 
À
Tous
Information générale
Forum:
Javascript
Catégorie:
Codage, syntaxe et commandes
Titre:
Why this does not work - what is wrong?
Divers
Thread ID:
01559584
Message ID:
01559584
Vues:
84
Hi everybody,

I have the following at the bottom of my Client.cschtml
<div id="editor">
     @*@Html.Partial("_ClientForm", Model)    *@
    <p id ="PlaceHolder"> </p>
</div>
And in the Edit button code I have this
function edit(com, grid)
{
        $('.trSelected', grid).each(function () {
          
                var id = $(this).attr('id');
                id = id.substring(id.lastIndexOf('row') + 3);
                currentId = id;
                $('#fntype').val('Edit');
               var url = '/Client/Edit/' + id;            
            //    var url = "/Home/About/";
           //     $("#sform").load(url).dialog({ modal: true, width: 1200, height: 750, resizable: true, close: function (event, ui) { alert('Closed'); } });
           //     var url = "~/Controllers/Test.html";
                $('#PlaceHolder').dialog({
                    autoOpen: false,
                    width: 1200,
                    height:750,
                    close: function (event, ui) { alert('Closed'); },
                    resizable: true,
                    modal: true,
                    open: function (event, ui) {
                        $(this).load(url);
                    },
                });

                $('#PlaceHolder').dialog('open');
        });

    }
However, nothing happens when I click the edit button and the dialog does not come up at all. If I uncomment that commented line in the Client page and use the form instead of the p, it works, but I have other issues.

The question is - why using a p or div does not work? In the samples I saw on jquery web site it works fine.

Thanks in advance.
If it's not broken, fix it until it is.


My Blog
Répondre
Fil
Voir

Click here to load this message in the networking platform