Jump to content

onblur hide the tr


scvinodkumar

Recommended Posts

i have the below form

 

<form name="tab_form" id="tab_form" action="javascript:tab_text(document.getElementById('tab_form'))">
  <table cellpadding="2" cellspacing="0" width="450" align="center" style="border:1px solid #CCCCCC;">
    <tr>
        <td align="center"><textarea name="test" id="test" onfocus="show_tabs();" cols="40" rows="1" style="width:435px;" /></textarea></td>
    </tr>    
    <tr>
        <td align="left" valign="top" style="padding:5px;">
            <table cellpadding="0" cellspacing="2" width="100%" id="tabs" style="display:none;">        
                <tr>
                    <td align="left" width="250">show tab1 | show tab2 | ...</td>
                </tr>
            </table>
            <table cellpadding="0" cellspacing="2" width="100%" id="tab1" style="display:none;border:1px solid #CCCCCC;">
                <tr><td align="left" width="250">tab1</td></tr>
            </table>
            <table cellpadding="0" cellspacing="2" width="100%" id="tab1" style="display:none;border:1px solid #CCCCCC;">
                <tr><td align="left" width="250">tab2</td></tr>
            </table>
            .
            .
            .
            .
        </td>
    </tr>
   </table>
</form>
<input type='text' name='rrr'>

 

By default, textarea only visible, when user clicks on the textarea, id='tabs' table shown.

 

If user clicks on tab1, it will show tab1 form below it.

 

I have done every thing so far correctly.

 

Now i want to close the tabs or any other form opened(tab1 or tab2,..) should be closed when the user is out the form. ie when the user tries to jump to last text box from textarea or form.

 

I hope u understand any problems. :)

 

Link to comment
https://forums.phpfreaks.com/topic/169776-onblur-hide-the-tr/
Share on other sites

No, actually i want to hide the tabs only when the form is out of focus.

 

since we dont have option to add the onblur on form tag or table tag.

 

could you please tell me where to add the onblur tag so that the tabs hide when the form lose focus.

 

Link to comment
https://forums.phpfreaks.com/topic/169776-onblur-hide-the-tr/#findComment-896203
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.