views:

18

answers:

1

Hi there - I don't know that this is actually possible with my current setup. There are three fields: Current pass, new pass, and repeat new pass.

(By request) All I'm trying to get it to do is, when a user wants to update their password but enters identical info in the old and new pass fields, a lightbox pops up asking if they want to keep their old password or update it (both radio buttons). When the user makes a selection and hits "Select", I want to close the lightbox and clear out the appropriate password fields based on the user's input.

Currently, I can't even get the lightbox to close upon hitting the Select button, only the Close button inherent to the lightbox class. I'm just opening an html page with an iframe. Here's samples of the (hopefully) relevant code.

Original page:

<script language="JavaScript" type="text/javascript">
    $(document).ready(function()
    {
        $("#newPass").blur(function()
        {
            LB_show(t,"lightboxes/T13_Account_Password.htm",165,300,x,y);
            ...

Lightbox html body:

<body>
<div class="lb_sml">
    <div class="lb_sml_top">&nbsp;</div>
    <div class="cont">
        <div class="act_pass">
            <div class="title">Password Change</div>
            <div class="act_pass_cont">
                <div>
                    <p>You entered the same password. Do you want to update your password or keep your current password?</p>
                                                                   <form name="yesno">
                        <input type="radio" name="change" value="change" checked="checked" /> Update password<br/>
                        <input type="radio" name="change" value="keep" /> Keep current password
                                                                       </form>
                    <div>
                        <a href="" class="select_but"></a>
                    </div>
                </div>
            </div>
        </div> 
    </div>
    <div class="lb_sml_bot">
        &nbsp;
    </div>
</div>
</body>

Thanks for any help on this issue. I've been working on it for a couple days. It's so trivial and yet it eludes me.

A: 

Okay, I fixed it. It was pretty simple after all. Sorry to waste anyone's time.

I just called parent.LB_hide() from the lightbox on the Select button click event.

$("a.select_but").click(function()
    if(document.yesno.change[0].checked == true)
        parent.LB_hide();
Esememon