Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
 
 
//Formulaire où je fais appel à ma fonction javascript
<form action="search.php" name="itemForm" id="itemForm" method="get" onsubmit="return ap_showWaitMessage('waitDiv', 1);">
    <input name="do_search" type="hidden" value=$searchord  "Search" />
        <table cellspacing="3" border="0">
        <tr>
                <td><span style="text">{$smarty.const.LA_SEARCH}</span></td>
                <td><input id="searchword" name="searchword" size="25" class="txt" value="{$categories[0].SEARCHWORD}" /></td>
        </tr>
 
        <tr>
                <td colspan="2"><input type="submit" class="button" id="bouton" name="do_search" value="{$smarty.const.LA_SEARCH}" /></div></td>
        </tr>
</table>
</form>
 
//je fais appel à mon div
 
<div id="waitDiv" style="position:absolute; visibility:hidden; left:300; top:300; text-align: center">
         <table cellpadding="6" cellspacing="0" >
                <tr>
                        <td align="center">
                                Chargement...<br />
                                <img src="layout_images/chargement.gif" />
                                <br />Patientez...
                        </td>
                <tr>
        </table>
</div>
 
//Le javascript 
 
function ap_getObj(name)
{
                return document.getElementById(name).style;
}
 
function ap_showWaitMessage(div, flag)
{
        var x = ap_getObj(div);
        x.visibility = (flag) ? 'visible':'hidden'
        return true;
}