Welcome Guest, Not a member yet? Register   Sign In
jquery help
#1

[eluser]jblack199[/eluser]
Well, as you all may know by now -- while I know prototype.js well I am just beginning my learning on jQuery and so far is very nice. Bit difficult since at the same time I am also learning CI at the exact same time. So I have a few questions...

#1 what i'm dealing with right now

Code:
$('#remind').click(function() {
         $("#forgotten")
         .dialog({
            autoOpen: false,
            bgiframe: true,
            resizable: false,
            width:500,
            modal: true,
            title: 'Forgotten Password Reset',
            overlay: {
                backgroundColor: '#000000',
                opacity: 1
            },
            buttons: {
                'Reset Password': function() {
                    // do something
                },
                Close: function() {
                    $(this).dialog('close');
                }
            }
        });
        $('#forgotten').dialog('open');

         return false;
     });

This is for my forgot password dialog that'll popup if the link is clicked which works. my form while is in a form tag, the buttons are not contained in that form tag. So, how to get the form variables (just one form field named email) to send to post since odds are I cant use $(this).serialize(); like normal.

#2

say I have a list of items being displayed but I add a new one (again will happen through a dialog window)... how do I get that to add to the bottom of my list and have it fade in?

#3.

Same list, but each will have an edit and a delete button next to them... now question is, how would I attribute the buttons to a specific id to pass that back to jquery to make it work?

#3a.
when I delete a certain item from the list, I want it to fadeout and then run the ajax query to actually delete it from the database... how would I tell jquery which row to remove? Trick to this would be, for larger lists say a list of 50 with 10 per page, when I delete one I'd want the next in the list to be displayed in the proper position.

#3b.
When I edit a certain item from the list, no visual effects should happen but upon saving the dialog box would close, and the specific row that was changed would need to be updated on the page with the new information so again I think this would tell which row on the page would need to be removed.

I am using the latest jquery 1.5.1 on this as well as the latest CI. I was planning on developing my lists similar to this but advice for a better output would be better...:

Code:
<div id="list">
<div id="list-title">name email password action whatever_else</div>
<div id="list-wrapper">
<div id="name"></div>
<div id="email"></div>
<div id="password"></div>
<div id="action"></div>
</div>
</div>

Any help would be appreciated on this.




Theme © iAndrew 2016 - Forum software by © MyBB