IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

JavaScript Discussion :

[AJAX] [Scriptaculous] redimensionner dynamiquement div


Sujet :

JavaScript

  1. #1
    Membre actif
    Profil pro
    Inscrit en
    Avril 2005
    Messages
    818
    Détails du profil
    Informations personnelles :
    Âge : 39
    Localisation : France, Drôme (Rhône Alpes)

    Informations forums :
    Inscription : Avril 2005
    Messages : 818
    Points : 288
    Points
    288
    Par défaut [AJAX] [Scriptaculous] redimensionner dynamiquement div
    Bonjour,

    Je cherche a donner a l'utilisateur la possibilité de redimensionner en ligne un div.

    En gros, je voudrais avoir le meme principe que celui qui s'applique aux images:
    Quand on passe la souris sur le coin ou sur un côté du div, l'icone de redimension apparait, et permet la redimension du div en déplacant la souris...

    J'ai compris le principe :
    Il faut savoir a quelles coordonnées on est quand on clique, puis en faisant la différence avec les coordonnées quand on lache la souris on sait le deplacement effectué, puis on met a jour la balise style="width:; height:;" en fonction de ce déplacement...

    Mais en pratique, je ne vois pas du tout comment m'y prendre!!

    Merci d'avance pour vos réponses

  2. #2
    Membre actif
    Profil pro
    Inscrit en
    Mai 2007
    Messages
    221
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mai 2007
    Messages : 221
    Points : 233
    Points
    233
    Par défaut
    oulaaa c'est beaucoup de chose.

    Je sais meme pas par ou commencer On va tenter
    Alors en premier lieu utilise onmousedown, onmousemove et onmouseup sur la window(global) en y associant une fonction (regarde addEventListener (firefox) et attachEvent(ie)).
    Puis sur la fonction down tu recuperes l'objet fraichement selectionné (avec les evenements et target).
    Puis apres c'est un travail assez complexe. Tout d'abord recuperer la position de la sourie puis de l'objet en cour (avec offset en javascript tu recuperes tout) et la tu fais tes calculs. Puis lors du onmousemove tu sets les valeurs de la sourie sur le div associé au coin voulu. Lors du on mouseup tu effaces toutes les valeurs globals eventuels
    Pour que ton objet en cour soi accessible partout met le en global. J'espere que tu as deja fais du js car ca va te demander pas mal de fil a retordre mais si tu le fais c'est la classe
    Voila tiens moi au courant si tu as d'autre question

  3. #3
    Membre habitué
    Profil pro
    Inscrit en
    Mars 2006
    Messages
    188
    Détails du profil
    Informations personnelles :
    Âge : 38
    Localisation : France, Bas Rhin (Alsace)

    Informations forums :
    Inscription : Mars 2006
    Messages : 188
    Points : 151
    Points
    151
    Par défaut
    n'y a t'il pas quelque choses du coté de scriptaculous ??
    Pierre : abusé, regarde par la fenêtre, les gosses ils passent leur vie à faire du vélo dehors ...
    tom : ils ont pas de pc ou quoi ?

  4. #4
    Membre actif
    Profil pro
    Inscrit en
    Mai 2007
    Messages
    221
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mai 2007
    Messages : 221
    Points : 233
    Points
    233
    Par défaut
    Moi je suis un peu foufou je le recode moi meme Apres script aculous c'est un truc genial ! mais bon On est sur developpez.com

  5. #5
    Membre actif
    Profil pro
    Inscrit en
    Avril 2005
    Messages
    818
    Détails du profil
    Informations personnelles :
    Âge : 39
    Localisation : France, Drôme (Rhône Alpes)

    Informations forums :
    Inscription : Avril 2005
    Messages : 818
    Points : 288
    Points
    288
    Par défaut
    Je viens de regarder du coté de scriptaculous, mais il n'y a que des scripts de deplacement et pas de redimensionnement...

  6. #6
    Membre actif
    Profil pro
    Inscrit en
    Mai 2007
    Messages
    221
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mai 2007
    Messages : 221
    Points : 233
    Points
    233
    Par défaut
    Franchement essait de le coder et puis je peux tenter de t'aider. Le desavantage de le coder soi meme c'est que c'est plutot long, la compatibilité entre navigateurs fait chier mais tu vas en sortir avec une excellente connaissance

  7. #7
    Membre actif
    Profil pro
    Inscrit en
    Avril 2005
    Messages
    818
    Détails du profil
    Informations personnelles :
    Âge : 39
    Localisation : France, Drôme (Rhône Alpes)

    Informations forums :
    Inscription : Avril 2005
    Messages : 818
    Points : 288
    Points
    288
    Par défaut
    J'ai trouvé ceci, mais je n'arrive pas à comprendre tout car je n'ai jamais utilisé les classes en javascript...
    Comment je peux utiliser ceci pour me permettre de resizer mon div (comment faire appel à la fonction?...)

    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
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
     
    Effect.ResizeWindow = Class.create();
    Object.extend(Object.extend(Effect.ResizeWindow.prototype, Effect.Base.prototype), {
      initialize: function(win, top, left, width, height) {
        this.window = win;
        this.window.resizing = true;
     
        var size = win.getSize();
        this.initWidth    = parseFloat(size.width);
        this.initHeight   = parseFloat(size.height);
     
        var location = win.getLocation();
        this.initTop    = parseFloat(location.top);
        this.initLeft   = parseFloat(location.left);
     
        this.width    = width != null  ? parseFloat(width)  : this.initWidth;
        this.height   = height != null ? parseFloat(height) : this.initHeight;
        this.top      = top != null    ? parseFloat(top)    : this.initTop;
        this.left     = left != null   ? parseFloat(left)   : this.initLeft;
     
        this.dx     = this.left   - this.initLeft;
        this.dy     = this.top    - this.initTop;
        this.dw     = this.width  - this.initWidth;
        this.dh     = this.height - this.initHeight;
     
        this.r2      = $(this.window.getId() + "_row2");
        this.content = $(this.window.getId() + "_content");
     
        this.contentOverflow = this.content.getStyle("overflow") || "auto";
        this.content.setStyle({overflow: "hidden"});
     
        // Wired mode
        if (this.window.options.wiredDrag) {
          this.window.currentDrag = win._createWiredElement();
          this.window.currentDrag.show();
          this.window.element.hide();
        }
     
        this.start(arguments[5]);
      },
     
      update: function(position) {
        var width  = Math.floor(this.initWidth  + this.dw * position);
        var height = Math.floor(this.initHeight + this.dh * position);
        var top    = Math.floor(this.initTop    + this.dy * position);
        var left   = Math.floor(this.initLeft   + this.dx * position);
     
        if (window.ie) {
          if (Math.floor(height) == 0)  
            this.r2.hide();
          else if (Math.floor(height) >1)  
            this.r2.show();
        }      
        this.r2.setStyle({height: height});
        this.window.setSize(width, height);
        this.window.setLocation(top, left);
      },
     
      finish: function(position) {
        // Wired mode
        if (this.window.options.wiredDrag) {
          this.window._hideWiredElement();
          this.window.element.show();
        }
     
        this.window.setSize(this.width, this.height);
        this.window.setLocation(this.top, this.left);
        this.r2.setStyle({height: null});
     
        this.content.setStyle({overflow: this.contentOverflow});
     
        this.window.resizing = false;
      }
    });
     
    Effect.ModalSlideDown = function(element) {
      var windowScroll = WindowUtilities.getWindowScroll();    
      var height = element.getStyle("height");  
      element.setStyle({top: - (parseFloat(height) - windowScroll.top) + "px"});
     
      element.show();
      return new Effect.Move(element, Object.extend({ x: 0, y: parseFloat(height) }, arguments[1] || {}));
    };
     
     
    Effect.ModalSlideUp = function(element) {
      var height = element.getStyle("height");
      return new Effect.Move(element, Object.extend({ x: 0, y: -parseFloat(height) }, arguments[1] || {}));
    };

  8. #8
    Membre actif
    Profil pro
    Inscrit en
    Mai 2007
    Messages
    221
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mai 2007
    Messages : 221
    Points : 233
    Points
    233
    Par défaut
    meme en ayant aucune idée de la fonctionnalité de cette source il manque les choses indispensables de la gestion de la sourie et des evenements associés a la sourie. Ce code n'est que la fin de ce que tu souhaites faire. Un conseil oriente toi d'abord sur la gestion des evenements (pourquoi pas drag and drop, c'est la meme mthode) et apres tu t'orienteras sur ce code. Mais honnetement apres cette pris la tete avec le drag and drop tu feras le code que tu a montrer tout seul si si je t'assure

  9. #9
    Membre actif
    Profil pro
    Inscrit en
    Avril 2005
    Messages
    818
    Détails du profil
    Informations personnelles :
    Âge : 39
    Localisation : France, Drôme (Rhône Alpes)

    Informations forums :
    Inscription : Avril 2005
    Messages : 818
    Points : 288
    Points
    288
    Par défaut
    Parce que le truc c'est que je pense ne pas maitriser suffisament le js pour faire ca...

    Voici le code qui crée un window où l'on peut mettre l'option resizable...

    J'aimerais bien pouvoir isoler la fonction de resize de ce code, car, si le contenu est plus gros que le div, il crée automatiquement un scroll pour faire défilé le contenu...

    Voici le code:
    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
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
    229
    230
    231
    232
    233
    234
    235
    236
    237
    238
    239
    240
    241
    242
    243
    244
    245
    246
    247
    248
    249
    250
    251
    252
    253
    254
    255
    256
    257
    258
    259
    260
    261
    262
    263
    264
    265
    266
    267
    268
    269
    270
    271
    272
    273
    274
    275
    276
    277
    278
    279
    280
    281
    282
    283
    284
    285
    286
    287
    288
    289
    290
    291
    292
    293
    294
    295
    296
    297
    298
    299
    300
    301
    302
    303
    304
    305
    306
    307
    308
    309
    310
    311
    312
    313
    314
    315
    316
    317
    318
    319
    320
    321
    322
    323
    324
    325
    326
    327
    328
    329
    330
    331
    332
    333
    334
    335
    336
    337
    338
    339
    340
    341
    342
    343
    344
    345
    346
    347
    348
    349
    350
    351
    352
    353
    354
    355
    356
    357
    358
    359
    360
    361
    362
    363
    364
    365
    366
    367
    368
    369
    370
    371
    372
    373
    374
    375
    376
    377
    378
    379
    380
    381
    382
    383
    384
    385
    386
    387
    388
    389
    390
    391
    392
    393
    394
    395
    396
    397
    398
    399
    400
    401
    402
    403
    404
    405
    406
    407
    408
    409
    410
    411
    412
    413
    414
    415
    416
    417
    418
    419
    420
    421
    422
    423
    424
    425
    426
    427
    428
    429
    430
    431
    432
    433
    434
    435
    436
    437
    438
    439
    440
    441
    442
    443
    444
    445
    446
    447
    448
    449
    450
    451
    452
    453
    454
    455
    456
    457
    458
    459
    460
    461
    462
    463
    464
    465
    466
    467
    468
    469
    470
    471
    472
    473
    474
    475
    476
    477
    478
    479
    480
    481
    482
    483
    484
    485
    486
    487
    488
    489
    490
    491
    492
    493
    494
    495
    496
    497
    498
    499
    500
    501
    502
    503
    504
    505
    506
    507
    508
    509
    510
    511
    512
    513
    514
    515
    516
    517
    518
    519
    520
    521
    522
    523
    524
    525
    526
    527
    528
    529
    530
    531
    532
    533
    534
    535
    536
    537
    538
    539
    540
    541
    542
    543
    544
    545
    546
    547
    548
    549
    550
    551
    552
    553
    554
    555
    556
    557
    558
    559
    560
    561
    562
    563
    564
    565
    566
    567
    568
    569
    570
    571
    572
    573
    574
    575
    576
    577
    578
    579
    580
    581
    582
    583
    584
    585
    586
    587
    588
    589
    590
    591
    592
    593
    594
    595
    596
    597
    598
    599
    600
    601
    602
    603
    604
    605
    606
    607
    608
    609
    610
    611
    612
    613
    614
    615
    616
    617
    618
    619
    620
    621
    622
    623
    624
    625
    626
    627
    628
    629
    630
    631
    632
    633
    634
    635
    636
    637
    638
    639
    640
    641
    642
    643
    644
    645
    646
    647
    648
    649
    650
    651
    652
    653
    654
    655
    656
    657
    658
    659
    660
    661
    662
    663
    664
    665
    666
    667
    668
    669
    670
    671
    672
    673
    674
    675
    676
    677
    678
    679
    680
    681
    682
    683
    684
    685
    686
    687
    688
    689
    690
    691
    692
    693
    694
    695
    696
    697
    698
    699
    700
    701
     
    var Window = Class.create();
     
    Window.keepMultiModalWindow = false;
    Window.hasEffectLib = String.prototype.parseColor != null;
    Window.resizeEffectDuration = 0.4;
     
    Window.prototype = {
      // Constructor
      // Available parameters : className, title, minWidth, minHeight, maxWidth, maxHeight, width, height, top, left, bottom, right, resizable, zIndex, opacity, recenterAuto, wiredDrag
      //                        hideEffect, showEffect, showEffectOptions, hideEffectOptions, effectOptions, url, draggable, closable, minimizable, maximizable, parent, onload
      //                        add all callbacks (if you do not use an observer)
      //                        onDestroy onStartResize onStartMove onResize onMove onEndResize onEndMove onFocus onBeforeShow onShow onHide onMinimize onMaximize onClose
     
      initialize: function() {
        var id;
        var optionIndex = 0;
        // For backward compatibility like win= new Window("id", {...}) instead of win = new Window({id: "id", ...})
        if (arguments.length > 0) {
          if (typeof arguments[0] == "string" ) {
            id = arguments[0];
            optionIndex = 1;
          }
          else
            id = arguments[0] ? arguments[0].id : null;
        }
     
        // Generate unique ID if not specified
        if (!id)
          id = "window_" + new Date().getTime();
     
        if ($(id))
          alert("Window " + id + " is already registered in the DOM! Make sure you use setDestroyOnClose() or destroyOnClose: true in the constructor");
     
        this.options = Object.extend({
          className:         "dialog",
          minWidth:          100, 
          minHeight:         20,
          resizable:         true,
          closable:          true,
          minimizable:       true,
          maximizable:       true,
          draggable:         true,
          userData:          null,
          showEffect:        (Window.hasEffectLib ? Effect.Appear : Element.show),
          hideEffect:        (Window.hasEffectLib ? Effect.Fade : Element.hide),
          showEffectOptions: {},
          hideEffectOptions: {},
          effectOptions:     null,
          parent:            document.body,
          title:             " ",
          url:               null,
          onload:            Prototype.emptyFunction,
          width:             200,
          height:            300,
          opacity:           1,
          recenterAuto:      true,
          wiredDrag:         false,
          closeCallback:     null,
          destroyOnClose:    false,
          gridX:             1, 
          gridY:             1
        }, arguments[optionIndex] || {});
     
        if (typeof this.options.top == "undefined" &&  typeof this.options.bottom ==  "undefined") 
          this.options.top = this._round(Math.random()*500, this.options.gridY);
        if (typeof this.options.left == "undefined" &&  typeof this.options.right ==  "undefined") 
          this.options.left = this._round(Math.random()*500, this.options.gridX);
     
        if (this.options.effectOptions) {
          Object.extend(this.options.hideEffectOptions, this.options.effectOptions);
          Object.extend(this.options.showEffectOptions, this.options.effectOptions);
          if (this.options.showEffect == Element.Appear)
            this.options.showEffectOptions.to = this.options.opacity;
        }
        if (Window.hasEffectLib) {
          if (this.options.showEffect == Effect.Appear)
            this.options.showEffectOptions.to = this.options.opacity;
     
          if (this.options.hideEffect == Effect.Fade)
            this.options.hideEffectOptions.from = this.options.opacity;
        }
        if (this.options.hideEffect == Element.hide)
          this.options.hideEffect = function(){ Element.hide(this.element); if (this.options.destroyOnClose) this.destroy(); }.bind(this)
     
        if (this.options.parent != document.body)  
          this.options.parent = $(this.options.parent);
     
        this.element = this._createWindow(id);
     
        // Bind event listener
        this.eventMouseDown = this._initDrag.bindAsEventListener(this);
        this.eventMouseUp   = this._endDrag.bindAsEventListener(this);
        this.eventMouseMove = this._updateDrag.bindAsEventListener(this);
        this.eventOnLoad    = this._getWindowBorderSize.bindAsEventListener(this);
        this.eventMouseDownContent = this.toFront.bindAsEventListener(this);
        this.eventResize = this._recenter.bindAsEventListener(this);
     
        this.topbar = $(this.element.id + "_top");
        this.bottombar = $(this.element.id + "_bottom");
        this.content = $(this.element.id + "_content");
     
        Event.observe(this.topbar, "mousedown", this.eventMouseDown);
        Event.observe(this.bottombar, "mousedown", this.eventMouseDown);
        Event.observe(this.content, "mousedown", this.eventMouseDownContent);
        Event.observe(window, "load", this.eventOnLoad);
        Event.observe(window, "resize", this.eventResize);
        Event.observe(window, "scroll", this.eventResize);
     
        if (this.options.draggable)  {
          var that = this;
          [this.topbar, this.topbar.up().previous(), this.topbar.up().next()].each(function(element) {
            element.observe("mousedown", that.eventMouseDown);
            element.addClassName("top_draggable");
          });
          [this.bottombar.up(), this.bottombar.up().previous(), this.bottombar.up().next()].each(function(element) {
            element.observe("mousedown", that.eventMouseDown);
            element.addClassName("bottom_draggable");
          });
     
        }    
     
        if (this.options.resizable) {
          this.sizer = $(this.element.id + "_sizer");
          Event.observe(this.sizer, "mousedown", this.eventMouseDown);
        }  
     
        this.useLeft = null;
        this.useTop = null;
        if (typeof this.options.left != "undefined") {
          this.element.setStyle({left: parseFloat(this.options.left) + 'px'});
          this.useLeft = true;
        }
        else {
          this.element.setStyle({right: parseFloat(this.options.right) + 'px'});
          this.useLeft = false;
        }
     
        if (typeof this.options.top != "undefined") {
          this.element.setStyle({top: parseFloat(this.options.top) + 'px'});
          this.useTop = true;
        }
        else {
          this.element.setStyle({bottom: parseFloat(this.options.bottom) + 'px'});      
          this.useTop = false;
        }
     
        this.storedLocation = null;
     
        this.setOpacity(this.options.opacity);
        if (this.options.zIndex)
          this.setZIndex(this.options.zIndex)
     
        if (this.options.destroyOnClose)
          this.setDestroyOnClose(true);
     
        this._getWindowBorderSize();
        this.width = this.options.width;
        this.height = this.options.height;
        this.visible = false;
     
        this.constraint = false;
        this.constraintPad = {top: 0, left:0, bottom:0, right:0};
     
        if (this.width && this.height)
          this.setSize(this.options.width, this.options.height);
        this.setTitle(this.options.title)
        Windows.register(this);      
      },
     
      // Destructor
      destroy: function() {
        this._notify("onDestroy");
        Event.stopObserving(this.topbar, "mousedown", this.eventMouseDown);
        Event.stopObserving(this.bottombar, "mousedown", this.eventMouseDown);
        Event.stopObserving(this.content, "mousedown", this.eventMouseDownContent);
     
        Event.stopObserving(window, "load", this.eventOnLoad);
        Event.stopObserving(window, "resize", this.eventResize);
        Event.stopObserving(window, "scroll", this.eventResize);
     
        Event.stopObserving(this.content, "load", this.options.onload);
     
        if (this._oldParent) {
          var content = this.getContent();
          var originalContent = null;
          for(var i = 0; i < content.childNodes.length; i++) {
            originalContent = content.childNodes[i];
            if (originalContent.nodeType == 1) 
              break;
            originalContent = null;
          }
          if (originalContent)
            this._oldParent.appendChild(originalContent);
          this._oldParent = null;
        }
     
        if (this.sizer)
            Event.stopObserving(this.sizer, "mousedown", this.eventMouseDown);
     
        if (this.options.url) 
          this.content.src = null
     
         if(this.iefix) 
          Element.remove(this.iefix);
     
        Element.remove(this.element);
        Windows.unregister(this);      
      },
     
      // Sets close callback, if it sets, it should return true to be able to close the window.
      setCloseCallback: function(callback) {
        this.options.closeCallback = callback;
      },
     
      // Gets window content
      getContent: function () {
        return this.content;
      },
     
      // Sets the content with an element id
      setContent: function(id, autoresize, autoposition) {
        var element = $(id);
        if (null == element) throw "Unable to find element '" + id + "' in DOM";
        this._oldParent = element.parentNode;
     
        var d = null;
        var p = null;
     
        if (autoresize) 
          d = Element.getDimensions(element);
        if (autoposition) 
          p = Position.cumulativeOffset(element);
     
        var content = this.getContent();
        // Clear HTML (and even iframe)
        this.setHTMLContent("");
        content = this.getContent();
     
        content.appendChild(element);
        element.show();
        if (autoresize) 
          this.setSize(d.width, d.height);
        if (autoposition) 
          this.setLocation(p[1] - this.heightN, p[0] - this.widthW);    
      },
     
      setHTMLContent: function(html) {
        // It was an url (iframe), recreate a div content instead of iframe content
        if (this.options.url) {
          this.content.src = null;
          this.options.url = null;
     
      	  var content ="<div id=\"" + this.getId() + "_content\" class=\"" + this.options.className + "_content\"> </div>";
          $(this.getId() +"_table_content").innerHTML = content;
     
          this.content = $(this.element.id + "_content");
        }
     
        this.getContent().innerHTML = html;
      },
     
      setAjaxContent: function(url, options, showCentered, showModal) {
        this.showFunction = showCentered ? "showCenter" : "show";
        this.showModal = showModal || false;
     
        options = options || {};
     
        // Clear HTML (and even iframe)
        this.setHTMLContent("");
     
        this.onComplete = options.onComplete;
        if (! this._onCompleteHandler)
          this._onCompleteHandler = this._setAjaxContent.bind(this);
        options.onComplete = this._onCompleteHandler;
     
        new Ajax.Request(url, options);    
        options.onComplete = this.onComplete;
      },
     
      _setAjaxContent: function(originalRequest) {
        Element.update(this.getContent(), originalRequest.responseText);
        if (this.onComplete)
          this.onComplete(originalRequest);
        this.onComplete = null;
        this[this.showFunction](this.showModal)
      },
     
      setURL: function(url) {
        // Not an url content, change div to iframe
        if (this.options.url) 
          this.content.src = null;
        this.options.url = url;
        var content= "<iframe frameborder='0' name='" + this.getId() + "_content'  id='" + this.getId() + "_content' src='" + url + "' width='" + this.width + "' height='" + this.height + "'> </iframe>";
        $(this.getId() +"_table_content").innerHTML = content;
     
        this.content = $(this.element.id + "_content");
      },
     
      getURL: function() {
      	return this.options.url ? this.options.url : null;
      },
     
      refresh: function() {
        if (this.options.url)
    	    $(this.element.getAttribute('id') + '_content').src = this.options.url;
      },
     
      // Stores position/size in a cookie, by default named with window id
      setCookie: function(name, expires, path, domain, secure) {
        name = name || this.element.id;
        this.cookie = [name, expires, path, domain, secure];
     
        // Get cookie
        var value = WindowUtilities.getCookie(name)
        // If exists
        if (value) {
          var values = value.split(',');
          var x = values[0].split(':');
          var y = values[1].split(':');
     
          var w = parseFloat(values[2]), h = parseFloat(values[3]);
          var mini = values[4];
          var maxi = values[5];
     
          this.setSize(w, h);
          if (mini == "true")
            this.doMinimize = true; // Minimize will be done at onload window event
          else if (maxi == "true")
            this.doMaximize = true; // Maximize will be done at onload window event
     
          this.useLeft = x[0] == "l";
          this.useTop = y[0] == "t";
     
          this.element.setStyle(this.useLeft ? {left: x[1]} : {right: x[1]});
          this.element.setStyle(this.useTop ? {top: y[1]} : {bottom: y[1]});
        }
      },
     
      // Gets window ID
      getId: function() {
        return this.element.id;
      },
     
      // Detroys itself when closing 
      setDestroyOnClose: function() {
        this.options.destroyOnClose = true;
      },
     
      setConstraint: function(bool, padding) {
        this.constraint = bool;
        this.constraintPad = Object.extend(this.constraintPad, padding || {});
        // Reset location to apply constraint
        if (this.useTop && this.useLeft)
          this.setLocation(parseFloat(this.element.style.top), parseFloat(this.element.style.left));
      },
     
      // initDrag event
     
      _initDrag: function(event) {
        // No resize on minimized window
        if (Event.element(event) == this.sizer && this.isMinimized())
          return;
     
        // No move on maximzed window
        if (Event.element(event) != this.sizer && this.isMaximized())
          return;
     
        if (window.ie && this.heightN == 0)
          this._getWindowBorderSize();
     
        // Get pointer X,Y
        this.pointer = [this._round(Event.pointerX(event), this.options.gridX), this._round(Event.pointerY(event), this.options.gridY)];
        if (this.options.wiredDrag) 
          this.currentDrag = this._createWiredElement();
        else
          this.currentDrag = this.element;
     
        // Resize
        if (Event.element(event) == this.sizer) {
          this.doResize = true;
          this.widthOrg = this.width;
          this.heightOrg = this.height;
          this.bottomOrg = parseFloat(this.element.getStyle('bottom'));
          this.rightOrg = parseFloat(this.element.getStyle('right'));
          this._notify("onStartResize");
        }
        else {
          this.doResize = false;
     
          // Check if click on close button, 
          var closeButton = $(this.getId() + '_close');
          if (closeButton && Position.within(closeButton, this.pointer[0], this.pointer[1])) {
            this.currentDrag = null;
            return;
          }
     
          this.toFront();
     
          if (! this.options.draggable) 
            return;
          this._notify("onStartMove");
        }    
        // Register global event to capture mouseUp and mouseMove
        Event.observe(document, "mouseup", this.eventMouseUp, false);
        Event.observe(document, "mousemove", this.eventMouseMove, false);
     
        // Add an invisible div to keep catching mouse event over iframes
        WindowUtilities.disableScreen('__invisible__', '__invisible__', this.overlayOpacity);
     
        // Stop selection while dragging
        document.body.ondrag = function () { return false; };
        document.body.onselectstart = function () { return false; };
     
        this.currentDrag.show();
        Event.stop(event);
      },
     
      _round: function(val, round) {
        return round == 1 ? val  : val = Math.floor(val / round) * round;
      },
     
      // updateDrag event
      _updateDrag: function(event) {
        var pointer =  [this._round(Event.pointerX(event), this.options.gridX), this._round(Event.pointerY(event), this.options.gridY)];  
        var dx = pointer[0] - this.pointer[0];
        var dy = pointer[1] - this.pointer[1];
     
        // Resize case, update width/height
        if (this.doResize) {
          var w = this.widthOrg + dx;
          var h = this.heightOrg + dy;
     
          dx = this.width - this.widthOrg
          dy = this.height - this.heightOrg
     
          // Check if it's a right position, update it to keep upper-left corner at the same position
          if (this.useLeft) 
            w = this._updateWidthConstraint(w)
          else 
            this.currentDrag.setStyle({right: (this.rightOrg -dx) + 'px'});
          // Check if it's a bottom position, update it to keep upper-left corner at the same position
          if (this.useTop) 
            h = this._updateHeightConstraint(h)
          else
            this.currentDrag.setStyle({bottom: (this.bottomOrg -dy) + 'px'});
     
          this.setSize(w , h);
          this._notify("onResize");
        }
        // Move case, update top/left
        else {
          this.pointer = pointer;
     
          if (this.useLeft) {
            var left =  parseFloat(this.currentDrag.getStyle('left')) + dx;
            var newLeft = this._updateLeftConstraint(left);
            // Keep mouse pointer correct
            this.pointer[0] += newLeft-left;
            this.currentDrag.setStyle({left: newLeft + 'px'});
          }
          else 
            this.currentDrag.setStyle({right: parseFloat(this.currentDrag.getStyle('right')) - dx + 'px'});
     
          if (this.useTop) {
            var top =  parseFloat(this.currentDrag.getStyle('top')) + dy;
            var newTop = this._updateTopConstraint(top);
            // Keep mouse pointer correct
            this.pointer[1] += newTop - top;
            this.currentDrag.setStyle({top: newTop + 'px'});
          }
          else 
            this.currentDrag.setStyle({bottom: parseFloat(this.currentDrag.getStyle('bottom')) - dy + 'px'});
     
          this._notify("onMove");
        }
        if (this.iefix) 
          this._fixIEOverlapping(); 
     
        this._removeStoreLocation();
        Event.stop(event);
      },
     
       // endDrag callback
       _endDrag: function(event) {
        // Remove temporary div over iframes
         WindowUtilities.enableScreen('__invisible__');
     
        if (this.doResize)
          this._notify("onEndResize");
        else
          this._notify("onEndMove");
     
        // Release event observing
        Event.stopObserving(document, "mouseup", this.eventMouseUp,false);
        Event.stopObserving(document, "mousemove", this.eventMouseMove, false);
     
        Event.stop(event);
     
        this._hideWiredElement();
     
        // Store new location/size if need be
        this._saveCookie()
     
        // Restore selection
        document.body.ondrag = null;
        document.body.onselectstart = null;
      },
     
      _updateLeftConstraint: function(left) {
        if (this.constraint && this.useLeft && this.useTop) {
          var width = this.options.parent == document.body ? WindowUtilities.getPageSize().windowWidth : this.options.parent.getDimensions().width;
     
          if (left < this.constraintPad.left)
            left = this.constraintPad.left;
          if (left + this.width + this.widthE + this.widthW > width - this.constraintPad.right) 
            left = width - this.constraintPad.right - this.width - this.widthE - this.widthW;
        }
        return left;
      },
     
      _updateTopConstraint: function(top) {
        if (this.constraint && this.useLeft && this.useTop) {        
          var height = this.options.parent == document.body ? WindowUtilities.getPageSize().windowHeight : this.options.parent.getDimensions().height;
     
          var h = this.height + this.heightN + this.heightS;
     
          if (top < this.constraintPad.top)
            top = this.constraintPad.top;
          if (top + h > height - this.constraintPad.bottom) 
            top = height - this.constraintPad.bottom - h;
        }
        return top;
      },
     
      _updateWidthConstraint: function(w) {
        if (this.constraint && this.useLeft && this.useTop) {
          var width = this.options.parent == document.body ? WindowUtilities.getPageSize().windowWidth : this.options.parent.getDimensions().width;
          var left =  parseFloat(this.element.getStyle("left"));
     
          if (left + w + this.widthE + this.widthW > width - this.constraintPad.right) 
            w = width - this.constraintPad.right - left - this.widthE - this.widthW;
        }
        return w;
      },
     
      _updateHeightConstraint: function(h) {
        if (this.constraint && this.useLeft && this.useTop) {
          var height = this.options.parent == document.body ? WindowUtilities.getPageSize().windowHeight : this.options.parent.getDimensions().height;
          var top =  parseFloat(this.element.getStyle("top"));
     
          if (top + h + this.heightN + this.heightS > height - this.constraintPad.bottom) 
            h = height - this.constraintPad.bottom - top - this.heightN - this.heightS;
        }
        return h;
      },
     
     
      // Creates HTML window code
      _createWindow: function(id) {
        var className = this.options.className;
        var win = document.createElement("div");
        win.setAttribute('id', id);
        win.className = "dialog"; 
     
        var content;
        if (this.options.url)
          content= "<iframe frameborder=\"0\" name=\"" + id + "_content\"  id=\"" + id + "_content\" src=\"" + this.options.url + "\"> </iframe>";
        else
          content ="<div id=\"" + id + "_content\" class=\"" +className + "_content\"> </div>";
     
        var closeDiv = this.options.closable ? "<div class='"+ className +"_close' id='"+ id +"_close' onclick='Windows.close(\""+ id +"\", event)'> </div>" : "";
        var minDiv = this.options.minimizable ? "<div class='"+ className + "_minimize' id='"+ id +"_minimize' onclick='Windows.minimize(\""+ id +"\", event)'> </div>" : "";
        var maxDiv = this.options.maximizable ? "<div class='"+ className + "_maximize' id='"+ id +"_maximize' onclick='Windows.maximize(\""+ id +"\", event)'> </div>" : "";
        var seAttributes = this.options.resizable ? "class='" + className + "_sizer' id='" + id + "_sizer'" : "class='"  + className + "_se'";
        var blank = "blank.gif";
     
        win.innerHTML = closeDiv + minDiv + maxDiv + "\
          <table id='"+ id +"_row1' class=\"top table_window\">\
            <tr>\
              <td class='"+ className +"_nw'></td>\
              <td class='"+ className +"_n'><div id='"+ id +"_top' class='"+ className +"_title title_window'>"+ this.options.title +"</div></td>\
              <td class='"+ className +"_ne'></td>\
            </tr>\
          </table>\
          <table id='"+ id +"_row2' class=\"mid table_window\">\
            <tr>\
              <td class='"+ className +"_w'></td>\
                <td id='"+ id +"_table_content' class='"+ className +"_content' valign='top'>" + content + "</td>\
              <td class='"+ className +"_e'></td>\
            </tr>\
          </table>\
            <table id='"+ id +"_row3' class=\"bot table_window\">\
            <tr>\
              <td class='"+ className +"_sw'></td>\
                <td class='"+ className +"_s'><div id='"+ id +"_bottom' class='status_bar'><span style='float:left; width:1px; height:1px'></span></div></td>\
                <td " + seAttributes + "></td>\
            </tr>\
          </table>\
        ";
        Element.hide(win);
        this.options.parent.insertBefore(win, this.options.parent.firstChild);
        Event.observe($(id + "_content"), "load", this.options.onload);
        return win;
      },
     
     
      changeClassName: function(newClassName) {
        var className = this.options.className;
        var id = this.getId();
        var win = this;
        $A(["_close","_minimize","_maximize","_sizer", "_content"]).each(function(value) { win._toggleClassName($(id + value), className + value, newClassName + value) });
        $$("#" + id + " td").each(function(td) {td.className = td.className.sub(className,newClassName) });
        this.options.className = newClassName;
      },
     
      _toggleClassName: function(element, oldClassName, newClassName) {
        if (element) {
          element.removeClassName(oldClassName);
          element.addClassName(newClassName);
        }
      },
     
      // Sets window location
      setLocation: function(top, left) {
        top = this._updateTopConstraint(top);
        left = this._updateLeftConstraint(left);
     
        var e = this.currentDrag || this.element;
        e.setStyle({top: top + 'px'});
        e.setStyle({left: left + 'px'});
     
        this.useLeft = true;
        this.useTop = true;
      },
     
      getLocation: function() {
        var location = {};
        if (this.useTop)
          location = Object.extend(location, {top: this.element.getStyle("top")});
        else
          location = Object.extend(location, {bottom: this.element.getStyle("bottom")});
        if (this.useLeft)
          location = Object.extend(location, {left: this.element.getStyle("left")});
        else
          location = Object.extend(location, {right: this.element.getStyle("right")});
     
        return location;
      },
     
      // Gets window size
      getSize: function() {
        return {width: this.width, height: this.height};
      },
     
      // Sets window size
      setSize: function(width, height, useEffect) {    
        width = parseFloat(width);
        height = parseFloat(height);
     
        // Check min and max size
        if (!this.minimized && width < this.options.minWidth)
          width = this.options.minWidth;
     
        if (!this.minimized && height < this.options.minHeight)
          height = this.options.minHeight;
     
        if (this.options. maxHeight && height > this.options. maxHeight)
          height = this.options. maxHeight;
     
        if (this.options. maxWidth && width > this.options. maxWidth)
          width = this.options. maxWidth;
     
     
        if (this.useTop && this.useLeft && Window.hasEffectLib && Effect.ResizeWindow && useEffect) {
          new Effect.ResizeWindow(this, null, null, width, height, {duration: Window.resizeEffectDuration});
        } else {
          this.width = width;
          this.height = height;
          var e = this.currentDrag ? this.currentDrag : this.element;
     
          e.setStyle({width: width + this.widthW + this.widthE + "px"})
          e.setStyle({height: height  + this.heightN + this.heightS + "px"})
     
          // Update content size
          if (!this.currentDrag || this.currentDrag == this.element) {
            var content = $(this.element.id + '_content');
            content.setStyle({height: height  + 'px'});
            content.setStyle({width: width  + 'px'});
          }
        }
      },
     
      updateHeight: function() {
        this.setSize(this.width, this.content.scrollHeight, true);
      },
     
      updateWidth: function() {
        this.setSize(this.content.scrollWidth, this.height, true);
      }, 
    ...

  10. #10
    Membre actif
    Profil pro
    Inscrit en
    Mai 2007
    Messages
    221
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mai 2007
    Messages : 221
    Points : 233
    Points
    233
    Par défaut
    ouaaa la tartine en effet meme moi la je suis paumé dans un truc pareille :S
    La je suis paumé. Je crois qu'il va falloir que tu chauffes une tasse a café et que tu te farcisses un bon tuto js

  11. #11
    Membre actif
    Profil pro
    Inscrit en
    Avril 2005
    Messages
    818
    Détails du profil
    Informations personnelles :
    Âge : 39
    Localisation : France, Drôme (Rhône Alpes)

    Informations forums :
    Inscription : Avril 2005
    Messages : 818
    Points : 288
    Points
    288
    Par défaut
    Je crois avoir trouvé un trux pas mal, plus a ma portée!!

    EN fait ce code fait le resize et le deplacement du div...
    Donc je voudrais réutiliser le code en enlevant la capacité de déplacement du div...

    Mais bon, il y a des lignes que je ne comprend pas

    Voici le code avec l'appel du div en dessous:
    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
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
     
    <html>
    <head>
    	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    	<link rel="stylesheet" href="styles.css"> 
     
    <SCRIPT LANGUAGE=JavaScript>
     
    var X_OTHER	= 1;
    var X_LEFT	= 2;
    var X_RIGHT = 3;
     
    var Y_OTHER	= 1;
    var Y_UP		= 2;
    var Y_DOWN	= 3;
     
    var vgCurrentElement = null;
    var vgCurrentPositionX = X_OTHER;
    var vgCurrentPositionY = Y_OTHER;
     
    var vgCurrentX 			= 0;
    var vgCurrentY 			= 0;
    var vgCurrentWidth 	= 0;
    var vgCurrentHeight = 0;
     
    var vgMouseX 			= 0;
    var vgMouseY 			= 0;
    var vgMouseDiffX 	= 0;
    var vgMouseDiffY 	= 0;
    var vgMouseDown 	= false;
     
    var vgTimerMouse;
    var vgTimerTime = 20;
     
     
    //----------------------------//
    function position(e)
    {
    	vgMouseX = (navigator.appName.substring(0,3) == "Net") ? e.pageX : event.x+document.body.scrollLeft;
    	vgMouseY = (navigator.appName.substring(0,3) == "Net") ? e.pageY : event.y+document.body.scrollTop;
    }
     
    //----------------------------//
    function fnResizeDiv()
    {
    	if(vgCurrentElement!=null && vgCurrentElement!=undefined)
    	{
    		document.getElementById(vgCurrentElement).style.left = vgCurrentX;
    		document.getElementById(vgCurrentElement).style.top = vgCurrentY;
    		document.getElementById(vgCurrentElement).style.width = vgCurrentWidth;
    		document.getElementById(vgCurrentElement).style.height = vgCurrentHeight;
    	}
    }
     
    //----------------------------//
    function fnOnMouseDown()
    {
    	vgMouseDown = true;
     
    	if(vgCurrentElement!=null && vgCurrentElement!=undefined)
    	{
    		//Init of size
    		vgCurrentX 				= document.getElementById(vgCurrentElement).offsetLeft;
    		vgCurrentY 				= document.getElementById(vgCurrentElement).offsetTop;
    		vgCurrentWidth 		= document.getElementById(vgCurrentElement).offsetWidth;
    		vgCurrentHeight 	= document.getElementById(vgCurrentElement).offsetHeight;
     
    		//Init of distance
    		vgMouseDiffX = vgMouseX-vgCurrentX;
    		vgMouseDiffY = vgMouseY-vgCurrentY;
     
    		//Init of position
    		if(vgMouseDiffX < 20 || (vgCurrentWidth-vgMouseDiffX) < 20)
    		{
    			if(vgMouseDiffX < vgCurrentWidth/2)
    				vgCurrentPositionX = X_LEFT;
    			else
    				vgCurrentPositionX = X_RIGHT;
    		}
    		else
    			vgCurrentPositionX = X_OTHER;
     
     
    		if(vgMouseDiffY < 20 || (vgCurrentHeight-vgMouseDiffY) < 20)
    		{
    			if(vgMouseDiffY > vgCurrentHeight/2)
    				vgCurrentPositionY = Y_DOWN;
    			else
    				vgCurrentPositionY = Y_UP;
    		}
    		else
    			vgCurrentPositionY = Y_OTHER;
     
     
    		vgTimerMouse = setInterval("fnOnMouseMove();", vgTimerTime);
    	}
    }
     
    function fnOnMouseUp()
    {
    	vgMouseDown = false;
    	clearInterval(vgTimerMouse);
    }
     
    function fnOnMouseMove()
    {
    	if(vgMouseDown && vgCurrentElement!=null && vgCurrentElement!=undefined)
    	{
    		switch(vgCurrentPositionX)
    		{
    			case X_LEFT:	vgCurrentWidth += vgCurrentX-vgMouseX;
    										if(vgCurrentWidth<0)
    											vgCurrentWidth = 0;
    										else
    											vgCurrentX = vgMouseX;
    										break;
    			case X_RIGHT:	vgCurrentWidth = vgMouseX-vgCurrentX;
    										if(vgCurrentWidth<0)
    											vgCurrentWidth = 0;
    										break;
    			default: break;
    		}
    		switch(vgCurrentPositionY)
    		{
    			case Y_UP:		vgCurrentHeight += vgCurrentY-vgMouseY;
    										if(vgCurrentHeight<0)
    											vgCurrentHeight = 0;
    										else
    											vgCurrentY = vgMouseY;
    										break;
    			case Y_DOWN:	vgCurrentHeight = vgMouseY-vgCurrentY;
    										if(vgCurrentHeight<0)
    											vgCurrentHeight = 0;
    										break;
    			default: break;
    		}
     
    		if(vgCurrentPositionX==X_OTHER && vgCurrentPositionY==Y_OTHER)
    		{
    			vgCurrentX = vgMouseX-vgMouseDiffX;
    			vgCurrentY = vgMouseY-vgMouseDiffY;
    		}
     
     
     
    		fnResizeDiv();
    	}
    }
     
    function fnOnMouseOver(sSelectedElementName)
    {
    	if(!vgMouseDown)
    	{
    		if(sSelectedElementName==null && sSelectedElementName!="undefined")
    		{
    			vgCurrentElement = null;
    		}
    		else
    		{
    			vgCurrentElement = sSelectedElementName;
    		}
    	}
    }
     
     
    //----------------------------//
    function fnOnLoad()
    {
    	if(navigator.appName.substring(0,3) == "Net")
    		document.captureEvents(Event.MOUSEMOVE);
    	document.onmousemove = position;
     
    	//fnResizeDiv();
    }
     
    </script>
     
    </head>
    <body onLoad="fnOnLoad();" onMouseDown="fnOnMouseDown();" onMouseUp="fnOnMouseUp();">
     
    <div id="divTest" name="divTest" onMouseOver="fnOnMouseOver('divTest');" onMouseOut="fnOnMouseOver();">
    </div>  
     
     
    <div id="divTest2" name="divTest2" onMouseOver="fnOnMouseOver('divTest2');" onMouseOut="fnOnMouseOver();">
    </div>  
     
    </body>
    </html>

  12. #12
    Membre actif
    Profil pro
    Inscrit en
    Mai 2007
    Messages
    221
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mai 2007
    Messages : 221
    Points : 233
    Points
    233
    Par défaut
    j'ai testé le script mais il est pas geniale geniale. Toi ce que tu veux faire c'est un resize du div sans le drag and drop ? juste redefinir a la sourie la taille en tirant un bord? Car si c'est ca je peux essayer de t'expliquer la demarche a suivre

  13. #13
    Membre actif
    Profil pro
    Inscrit en
    Avril 2005
    Messages
    818
    Détails du profil
    Informations personnelles :
    Âge : 39
    Localisation : France, Drôme (Rhône Alpes)

    Informations forums :
    Inscription : Avril 2005
    Messages : 818
    Points : 288
    Points
    288
    Par défaut
    Oui c'est ca, je souahiterais utiliser le script au dessus en enlevant la partie drag and drop pour n'utiliser que la partie resize avec les bords du div...

    Mais j'aurai besoin d'un coup de main, car je ne comprend pas tout de ce script...

  14. #14
    Membre actif
    Profil pro
    Inscrit en
    Mai 2007
    Messages
    221
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mai 2007
    Messages : 221
    Points : 233
    Points
    233
    Par défaut
    http://www.developpez.net/forums/sho...d.php?t=395965
    poster par tober, il est fonctionnel seulement quelque petit hic mais regarde le il vaut le coup d'oeil

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. [Prototype] [Ajax] Création dynamique div en utilisant le DOM
    Par nkordiko dans le forum Bibliothèques & Frameworks
    Réponses: 4
    Dernier message: 07/12/2009, 14h33
  2. Redimensionnement "dynamique" de div
    Par Pr0j3ktil dans le forum Général JavaScript
    Réponses: 5
    Dernier message: 02/11/2009, 09h37
  3. Redimensionner dynamiquement une div
    Par LeCogiteur dans le forum Général JavaScript
    Réponses: 2
    Dernier message: 31/03/2009, 08h03
  4. Réponses: 1
    Dernier message: 03/10/2007, 00h12
  5. Redimensionner dynamiquement div
    Par HaTnuX dans le forum Général JavaScript
    Réponses: 2
    Dernier message: 23/08/2007, 16h51

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo