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

VBA Access Discussion :

Ouvrir un page web à partir d'un bouton access et insérer un texte dans le site web


Sujet :

VBA Access

  1. #1
    Membre à l'essai
    Homme Profil pro
    Étudiant
    Inscrit en
    Mars 2012
    Messages
    14
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Ardennes (Champagne Ardenne)

    Informations professionnelles :
    Activité : Étudiant
    Secteur : Industrie

    Informations forums :
    Inscription : Mars 2012
    Messages : 14
    Points : 14
    Points
    14
    Par défaut Ouvrir un page web à partir d'un bouton access et insérer un texte dans le site web
    Bonjour,

    Voici le premier code que j'ai réussi à faire fonctionner, insertion du texte dans le site web s'effectue parfaitement.

    Voici le code VBA(Vous pourrez récupérer le HTML sur le site directement):
    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
    Private Sub Commande115_Click()
    On Error GoTo Commande115_Click_Err
     
     
    'Déclaration de la variable
    Dim IE As New InternetExplorer
    Dim IEDoc As HTMLDocument
    Dim InputGBCZoneDeTexte As HTMLInputElement
    Dim InputGBCButtonSearch As HTMLInputElement
    Dim htmlSelectElem As HTMLSelectElement
     
     
     
    Dim valeur As String
    If Nz(Me.tbPartNumber, "") = "" Then
    valeur = ""
    Else
    valeur = Replace(Form_Part.tbPartNumber.Value, " ", "-")
    End If
     
     
    'Chargement d'une page web Google
    IE.navigate "http://www.abdc-informatique.com/contact.html"
     
    'Affichage de la fenêtre IE
    IE.Visible = True
     
    'On attend le chargement complet de la page
    WaitIE IE
     
    'On pointe le membre Document
    Set IEDoc = IE.Document
     
    'On Pointe notre zone de texte
    Set htmlSelectElem = IEDoc.getElementsByName("name").Item
     
     
    Set InputGBCZoneDeTexte = htmlSelectElem
     
     
    'On définit le texte que l'on soufaite placer à l'intérieur
    InputGBCZoneDeTexte.Value = valeur
     
    'On libère la variable IE
    Set IE = Nothing
     
    Commande115_Click_Exit:
        Exit Sub
     
    Commande115_Click_Err:
        MsgBox Error$
        Resume Commande115_Click_Exit
     
    End Sub
    Dans ce code VBA la ligne de code
    Set htmlSelectElem = IEDoc.getElementsByName("name").Item -->ligne35
    en rapport avec ce code HTML
    <input name="name" id="contact_name" size="30" value="" class="inputbox" type="text">
    <label for="contact_email" class="required">
    Fonctionne parfaitement

    Je vais maintenant vous mettre le code VBA suivi du code HTML et j'espère que vous allez pouvoir détecter mon erreur.

    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
    '------------------------------------------------------------
    ' Commande115_Click
    '
    '------------------------------------------------------------
    Private Sub Commande115_Click()
    On Error GoTo Commande115_Click_Err
     
     
    'Déclaration de la variable
    Dim IE As New InternetExplorer
    Dim IEDoc As HTMLDocument
    Dim InputGBCZoneDeTexte As HTMLInputElement
    Dim InputGBCButtonSearch As HTMLInputElement
    Dim htmlSelectElem As HTMLSelectElement
     
     
     
    Dim valeur As String
    If Nz(Me.tbPartNumber, "") = "" Then
    valeur = ""
    Else
    valeur = Replace(Form_Part.tbPartNumber.Value, " ", "-")
    End If
     
     
    'Chargement d'une page web Google
    IE.navigate "http://slv6954.stlouis.visteon.com:7778/gbclite/controller/home"
     
     
    'Affichage de la fenêtre IE
    IE.Visible = True
     
    'Je fais appel à une tempo car il ya auparavant un identification qui prend du temps
    Call Module1.temporise(150)
     
    'On attend le chargement complet de la page
    WaitIE IE
     
     
    'On pointe le membre Document
    Set IEDoc = IE.Document
     
    'On Pointe notre zone de texte
    Set htmlSelectElem = IEDoc.getElementByName("v1GBCPartNumL_v1GBCPartNumL_0").Item
     
     
    Set InputGBCZoneDeTexte = htmlSelectElem
     
    Set InputGBCZoneDeTexte = IEDoc.all("v1GBCPartNumL_v1GBCPartNumL_0")
     
    'On définit le texte que l'on soufaite placer à l'intérieur
    InputGBCZoneDeTexte.Value = valeur
     
    'On libère la variable IE
    Set IE = Nothing
     
    Commande115_Click_Exit:
        Exit Sub
     
    Commande115_Click_Err:
        MsgBox Error$
        Resume Commande115_Click_Exit
     
    End Sub
    IEDoc.getElementByName("v1GBCPartNumL_v1GBCPartNumL_0").Item -->Ligne44

    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
    702
    703
    704
    705
    706
    707
    708
    709
    710
    711
    712
    713
    714
    715
    716
    717
    718
    719
    720
    721
    722
    723
    724
    725
    726
    727
    728
    729
    730
    731
    732
    733
    734
    735
    736
    737
    738
    739
    740
    741
    742
    743
    744
    745
    746
    747
    748
    749
    750
    751
    752
    753
    754
    755
    756
    757
    758
    759
    760
    761
    762
    763
    764
    765
    766
    767
    768
    769
    770
    771
    772
    773
    774
    775
    776
    777
    778
    779
    780
    781
    782
    783
    784
    785
    786
    787
    788
    789
    790
    791
    792
    793
    794
    795
    796
    797
    798
    799
    800
    801
    802
    803
    804
    805
    806
    807
    808
    809
    810
    811
    812
    813
    814
    815
    816
    817
    818
    819
    820
    821
    822
    823
    824
    825
    826
    827
    828
    829
    830
    831
    832
    833
    834
    835
    836
    837
    838
    839
    840
    841
    842
    843
    844
    845
    846
    847
    848
    849
    850
    851
    852
    853
    854
    855
    856
    857
    858
    859
    860
    861
    862
    863
    864
    865
    866
    867
    868
    869
    870
    871
    872
    873
    874
    875
    876
    877
    878
    879
    880
    881
    882
    883
    884
    885
    886
    887
    888
    889
    890
    891
    892
    893
    894
    895
    896
    897
    898
    899
    900
    901
    902
    903
    904
    905
    906
    907
    908
    909
    910
    911
    912
    913
    914
    915
    916
    917
    918
    919
    920
    921
    922
    <!-- Start /edsplm/extsummary/IndexSearchAndAdd_TabPage.jsp -->
    <!--
    bcprt
    This software and related documentation are proprietary to UGS Corp.
    COPYRIGHT 2006 UGS CORP.  ALL RIGHTS RESERVED
    ecprt
    -->
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
    <HTML>
    <HEAD>
    <script language = "JavaScript1.3"> 
     
      if(window.opener)
      {
       document.writeln("<title> Advanced Search Criteria </title>");
      }
      else
      {
       top.setTitle('Advanced Search Criteria');
      }
     
     function formsubmitIndexSearch( scFormAction )
     {
         document.TemplateForm.target = "";
         document.TemplateForm.action = scFormAction;
         document.TemplateForm.submit();
     }
     
     function move_box(an, box) {
      var cleft = 0;
      var ctop = 0;
      var obj = an;
      while (obj.offsetParent) {
        cleft += obj.offsetLeft;
        ctop += obj.offsetTop;
        obj = obj.offsetParent;
      }
      box.style.left = cleft + 'px';
      ctop += an.offsetHeight + 50;
      if (document.body.currentStyle &&
        document.body.currentStyle['marginTop']) {
        ctop += parseInt(
          document.body.currentStyle['marginTop']);
      }
      box.style.top = ctop + 'px';
    }
     
    function show_hide_box(an, width, height, borderStyle) {
      var href = an.href;
      var boxdiv = document.getElementById(href);
     
      if (boxdiv != null) {
        if (boxdiv.style.display=='none') {
          move_box(an, boxdiv);
          boxdiv.style.display='block';
        } else
          boxdiv.style.display='none';
        return false;
      }
     
      boxdiv = document.createElement('div');
      boxdiv.setAttribute('id', href);
      boxdiv.style.display = 'block';
      boxdiv.style.position = 'absolute';
      boxdiv.style.width = width + 'px';
      boxdiv.style.height = height + 'px';
      boxdiv.style.border = borderStyle;
      boxdiv.style.backgroundColor = '#fff';
     
      var contents = document.createElement('iframe');
      contents.scrolling = 'yes';
      contents.frameBorder = '0';
      contents.style.width = width + 'px';
      contents.style.height = height + 'px';
      contents.src = href;
     
      boxdiv.appendChild(contents);
      document.body.appendChild(boxdiv);
      move_box(an, boxdiv);
     
      return false;
    }
    </script>
     
     
    <!-- start /edsplm/home/style_definitions.jsp   -->
     
     
    <!-- Start /edsplm/home/home_pref_read_util.jsp  -->
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
    <!-- End /edsplm/home/home_pref_read_util.jsp  -->
     
    <link REL='stylesheet' href='../edsplm/home/Styles/TeamCenter.css' >
     
    <!-- end /edsplm/home/style_definitions.jsp   -->
     
     
    <link REL='stylesheet' href='../visteon/home/gbc.css' >
     
    </HEAD>
    <BODY>
     
     
    <SCRIPT Language="JavaScript1.2" SRC="../edsplm/mwau/Scroll.js"></SCRIPT>
     
     
     
     
     
     
     
     
    <SCRIPT LANGUAGE="JavaScript1.2">
    <!--
     
        function enterKeySubmit(ev)
        {
    		var charCode;
     
    		if(ev && ev.which)
    		{
    			ev = ev;
    			charCode = ev.which; //for NN
    		}
    		else
    		{
    			ev = event;
    			charCode = ev.keyCode; //for IE
    		}
     
    		if(charCode == 13){ //if generated code is ascii 13
    		    formsubmit('vis_search_link_process_indexed_tab?destination=eds_search_link_complete_advanced_index_search');
    		}
    	}
     
          // -->
     
    </SCRIPT>
     
     
    <BR>
    <BR>
    <BR>
    <BR>
    <FORM  NAME="TemplateForm"  METHOD="Post" >
     
    <INPUT TYPE=hidden  NAME="sdrcAttributeName"  VALUE="">
    <INPUT TYPE=hidden  NAME="sdrcClassName"  VALUE="">
    <INPUT TYPE=hidden  NAME="prompt_name"  VALUE="">
    <INPUT TYPE=hidden  NAME="sdrcSystemFormParentFormIdOfPopup"  VALUE="">
    <INPUT TYPE=hidden  NAME="sdrcSystemFormFieldName"  VALUE="">
    <INPUT TYPE=hidden  NAME="sdrcSystemFormNameOfFullTable"  VALUE="">
    <INPUT TYPE=hidden  NAME="sdrcSystemFormValidValueSetName"  VALUE="">
    <INPUT TYPE=hidden  NAME="sdrcSystemFormRowNumber"  VALUE="">
    <INPUT TYPE=hidden  NAME="enable_valid_value_set_filter"  VALUE="">
    <INPUT TYPE=hidden  NAME="append_or_replace_valid_values"  VALUE="">
    <SCRIPT Language="JavaScript1.2"  SRC="../edsplm/mwau/form/FormUtility.js"></SCRIPT>
     
    <SCRIPT Language="JavaScript1.2"  SRC="../edsplm/mwau/form/CalendarUtility.js"></SCRIPT>
    <INPUT TYPE=hidden  NAME="sdrcSystemFormDialogClassName"  VALUE="DSdoQry"><INPUT TYPE=hidden  NAME="sdrcSystemFormPersistentClassName"  VALUE="StGenDoc">
     
           <table style="display:none">
                <tr>
                  <td>
                    <input type="checkbox"
                           name="eds_advanced_search_index_criteria_match_all_selected"
                   onKeyPress="enterKeySubmit(event)"
                           value="checked"
                           checked />Match all of the following
                  </td>
     
                </tr>
          </table>
    <!--      <table>
                <tr>
                  <td class="info-message"> Any/all fields may be left blank.</td> <td> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </td> <td class="info-message"> All fields on this page except the date fields support AND/OR/NOT operators. </td>
    		      </tr>
          </table>-->
          <table align="center" valign="middle">
     
    			<tr>
                   <INPUT TYPE=hidden  NAME="eds_advanced_search_index_criteria_attribute_selected"  VALUE="v1GBCPartNumL" >
                   <INPUT TYPE=hidden  NAME="v1GBCPartNumL"  VALUE="">
                   <td>Part Number:</td>
     
                   <INPUT TYPE=hidden  NAME="eds_search_operator_values_selected"  VALUE="ScoContains" >
     
                   <td>&nbsp;</TD>
    			   <TD><INPUT  TYPE= "TEXT" CLASS="input-body" NAME="v1GBCPartNumL_v1GBCPartNumL_0"  VALUE="" size="40" maxlength="300"  ONKEYPRESS="enterKeySubmit(event)"></td>
    			   	<INPUT TYPE=hidden  NAME="v1GBCPartNumLNumberOfRowsForList"  VALUE="1">
    				<INPUT TYPE=hidden  NAME="CompressFullTable"  VALUE="false">
    				<INPUT TYPE=hidden  NAME="v1GBCPartNumLContainedColumnsForList"  VALUE="v1GBCPartNumL">
                </tr>
     
    			<tr>
                   <INPUT TYPE=hidden  NAME="eds_advanced_search_index_criteria_attribute_selected"  VALUE="v1GBCNoticeNumL" >
                   <INPUT TYPE=hidden  NAME="v1GBCNoticeNumL"  VALUE="">
                   <td>CN or Legacy Notice Number:</td>
     
                   <INPUT TYPE=hidden  NAME="eds_search_operator_values_selected"  VALUE="ScoContains" >
     
                   <td>&nbsp;</TD>
    			   <TD><INPUT  TYPE= "TEXT" CLASS="input-body" NAME="v1GBCNoticeNumL_v1GBCNoticeNumL_0"  VALUE="" size="40" maxlength="300"  ONKEYPRESS="enterKeySubmit(event)"></td>
    			   	<INPUT TYPE=hidden  NAME="v1GBCNoticeNumLNumberOfRowsForList"  VALUE="1">
    				<INPUT TYPE=hidden  NAME="CompressFullTable"  VALUE="false">
    				<INPUT TYPE=hidden  NAME="v1GBCNoticeNumLContainedColumnsForList"  VALUE="v1GBCNoticeNumL">
                </tr>
    </table>
     
    <!-- Start /edsplm/mwau/AggregatedParams.jsp -->
     
                          <input type="hidden"
                                   name="MaxItemsToRetrieve"
                                   value="100" />
     
     
    <!-- End /edsplm/mwau/AggregatedParams.jsp -->
     
    <!-- Start /edsplm/mwau/DateFormatManipulation.jsp-->
    <!--
    bcprt
    This software and related documentation are proprietary to UGS Corp.
    COPYRIGHT 2006 UGS CORP.  ALL RIGHTS RESERVED
    ecprt
    -->
    <script language = "JavaScript1.2">
    var saved_picture;
    function setPV(pvalue)
    {
       saved_picture = pvalue;
    }
     
    var month_names = new Array(12);
    var smonth_names = new Array(12);
    var day_names = new Array(7);
    var sday_names = new Array(7);
     
       month_names[0] = 'January'; 
     
       month_names[1] = 'February'; 
     
       month_names[2] = 'March'; 
     
       month_names[3] = 'April'; 
     
       month_names[4] = 'May'; 
     
       month_names[5] = 'June'; 
     
       month_names[6] = 'July'; 
     
       month_names[7] = 'August'; 
     
       month_names[8] = 'September'; 
     
       month_names[9] = 'October'; 
     
       month_names[10] = 'November'; 
     
       month_names[11] = 'December'; 
     
     
     
       smonth_names[0] = 'Jan'; 
     
       smonth_names[1] = 'Feb'; 
     
       smonth_names[2] = 'Mar'; 
     
       smonth_names[3] = 'Apr'; 
     
       smonth_names[4] = 'May'; 
     
       smonth_names[5] = 'Jun'; 
     
       smonth_names[6] = 'Jul'; 
     
       smonth_names[7] = 'Aug'; 
     
       smonth_names[8] = 'Sep'; 
     
       smonth_names[9] = 'Oct'; 
     
       smonth_names[10] = 'Nov'; 
     
       smonth_names[11] = 'Dec'; 
     
     
     
       day_names[0] = 'Sunday'; 
     
       day_names[1] = 'Monday'; 
     
       day_names[2] = 'Tuesday'; 
     
       day_names[3] = 'Wednesday'; 
     
       day_names[4] = 'Thursday'; 
     
       day_names[5] = 'Friday'; 
     
       day_names[6] = 'Saturday'; 
     
     
     
       sday_names[0] = 'Sun'; 
     
       sday_names[1] = 'Mon'; 
     
       sday_names[2] = 'Tue'; 
     
       sday_names[3] = 'Wed'; 
     
       sday_names[4] = 'Thu'; 
     
       sday_names[5] = 'Fri'; 
     
       sday_names[6] = 'Sat'; 
     
     
    function createDate ( picture_value, year, month, day )
    {
       todayd = new Date(year, month, day);
       var sample = '';
       var size = picture_value.length;
       var ch;
     
       for (i=0; i < size; i++)
       {
          var value;
          switch (picture_value.charAt(i)) {
             case '[':
                var remaining = picture_value.substring(i, size);
                var j = remaining.indexOf(']');
                j = i + j;
                i++;
                value = picture_value.substring(i, j);
                i = j;
                break;
             case '%':
                i++;
                ch = picture_value.charAt(i);
                switch (ch)
                {
                   case 'a':
                      var d_ind = todayd.getDay();
                      value = sday_names[d_ind];
                      break;
                   case 'A':
                      var d_ind = todayd.getDay();
                      value = day_names[d_ind];
                      break;
                   case 'b':
                      value = smonth_names[month];
                      break;
                   case 'B':
                      value = month_names[month];
                      break;
                   case 'd':
                      value = padout(day);
                      break;
                   case 'm':
                      value = padout(month -0 + 1);
                      break;
                   case 'y':
                      var year_str = year.toString();
                      value = year_str.substring(2, 4);
                      break;
                   case 'Y':
                      value = year;
                      break;
                   case 'j':
                      var startday = new Date(todayd.getFullYear(), 0, 1);
                      var one_day = 1000*60*60*24;
                      value = Math.ceil(
                            (todayd.getTime()-startday.getTime())/(one_day)) + 1; 
                      break;
                }
                break;
          }
          if (value != null)
          {
             sample += value;
          }
       }
       return sample;
    }
    </script>
     
    <!-- End /edsplm/mwau/DateFormatManipulation.jsp-->
     
     
    </FORM>
     
     
     
     
     
     
     
     
    <form>
    <table class="buttonbar"
     styleclass="isbottombar" align="center">
    <tr>
       <td class="buttoncellforbottom">
          <table class="buttoncellforbottom" label="Examples">
    		  <tr>
    			 <td  NOWRAP><a  class="buttonbar-entry-href" title="Examples" href="../visteon/search/fd0001.htm" onClick="return show_hide_box(this,500,180,'2px dotted')"><img src="../edsplm/home/images/examples.png" border="0"/></a></td>
    		  </tr>
          </table>
       </td>
       <td class="buttoncellforbottom">
          <table class="buttoncellforbottom" label="Search">
          <tr>
             <td  NOWRAP><a  class="buttonbar-entry-href" href="javascript:formsubmit('vis_search_link_process_indexed_tab?destination=eds_search_link_complete_advanced_index_search');" title="Search for items matching the criteria" target="_self"><img src="../edsplm/home/images/search.png" /></a></td>
          </tr>
       </table>
       </td>
       <td class="buttoncellforbottom">
          <table class="buttoncellforbottom" label="Help">
          <tr>
             <td  NOWRAP><a  class="buttonbar-entry-href" href="http://hub.visteon.com/gbc/gbcdocsearch.htm" title="Help" target="_new"><img src="../edsplm/home/images/help.png"/></a></td>
          </tr>
       </table>
       </td>
    </tr>
    </table>
    </form>
     
    <table class="buttonbar" width="660px" align="center" border="1">
      <tr>
      <td id="topic" colspan="2" align="left" class="buttoncellforbottom">
      <FONT SIZE="3" COLOR="">Related Tools </FONT>
      </td>
      <tr>
      <td  align="center" >
        <p><strong>DIRECT CHECK-IN</strong></p>
     
      	     <a href="http://www.kbe.visteon.com/gbc_upload/" target="_new" ><img src="../edsplm/home/images/electronicrelease.png" /></a>
    	</td>
     
      </tr>
     
      </table>
    <!-- start edsplm/home/formsubmit.jsp -->
     
     
     
     
     
     
     
       <SCRIPT LANGUAGE="JavaScript1.2">
          var zPopupAddWindow = null;
          // default form name for submit function is TemplateForm;
     
          // default window name used for all submits in new window
          // if none is specified
          var popupWindowName = "ugsNewPopup";
     
          // various localized messages used by script below and submitsupport.js
          var couldNotFindFormMesg = "Could not find form: ";
          var contactMessage = "Contacting Server to perform action...";
          var closeMessage1  = "Close";
          var closeMessage2  = " this window to cancel request.";
          var waitMsg1 = "We are processing your request. Thank you for waiting.";
          var waitMsg2 = "Warning: Please wait until processing is complete before performing additional actions. This will prevent problems with completing your request.";
          var warningMsg1 = "Cannot perform action!";
          var warningMsg2 = "Item(s) is/are selected in the following detail section(s):";
     
     
     
          function formsubmit(formAction)
          {
             // Due to having a table that can filter out rows we need to walk through
             // each row, and if the rows check box is selected and visible set
             // the name of the checkbox equal to multi-select else set the name to
             // something else so that it doesn't get picked up
             // by the action handler as being selected
             //
             // TODO: This function needs to take in the checkbox name instead of
             //       assuming that the name is multi-select
             var arCheckBoxes = document.TemplateForm.elements;
             var treeDataDiv = document.getElementById("treedata-div");
     
             var arCheckBoxCount = arCheckBoxes.length;
             for( var i = 0; i < arCheckBoxCount; i++ )
             {
                if( arCheckBoxes[i].type == "checkbox" && arCheckBoxes[i].checked &&
                    arCheckBoxes[i].parentNode.parentNode.style.display != "none" &&
                    arCheckBoxes[i].name == "isnotsubmittable" )
                {
                   arCheckBoxes[i].name = "multi-select";
                }
                else if( arCheckBoxes[i].type == "checkbox" && arCheckBoxes[i].checked &&
                         arCheckBoxes[i].parentNode.parentNode.style.display == "none" &&
                         arCheckBoxes[i].name == "multi-select" )
                {
                   arCheckBoxes[i].name = "isnotsubmittable";
                }
             }
     
             /*
    	     Store the horizontal & vertical scroll bar position on the scrollx & scrolly text respectively
             */
     
     
     
             document.TemplateForm.target = "";
             document.TemplateForm.action = formAction;
             document.TemplateForm.submit();
          }
     
          //This function opens the action in the new window and passes the ext_summary_new_window
          //parameter along with the request to let further action know that new open window has
          //been opened to perform the task.
          function MISSING_PARAMETER(formAction, scWidth, scHeight)
          {
             scWindowName = 'ugsNewActionPopup';
     
             var x = 0, y = 0;
     
             x = window.screen.width/2 - 200;
             y = window.screen.height/2 - 300;
     
             var scWinWidth = "350";
             var scWinHeight = "10";
     
             var zPopupAddWindow = window.open( '', scWindowName,'width=' + scWinWidth +
                                                ', height=' + scWinHeight +
                                                ', resizable=yes, status=yes, scrollbars=yes, top=' +
                                                y + ',screenY=' + y + ',' + 'left=' + x + ',screenX=' + x + '');
     
     
             var scMessage = "Contacting Server to perform action...";
             var scCloseMessage1 = "Close";
             var scCloseMessage2 = " this window to cancel request.";
     
             buildHtmlPopup( zPopupAddWindow, scWidth, scHeight, scMessage,
                             scCloseMessage1, scCloseMessage2);
     
             if( formAction.indexOf( "?" ) > 0 )
             {
                formAction = formAction + "&ugs_global_dynamic_table_popup_window=true";
             }
             else
             {
                formAction = formAction + "?ugs_global_dynamic_table_popup_window=true";
             }
     
             document.TemplateForm.action = formAction;
             document.TemplateForm.target = scWindowName;
             document.TemplateForm.submit();
          }
          // This function opens the action in the new window and passes
          // parameter along with the request to let further action know
          // that new open window has been opened to perform the task.
          // It also passes funtion to be called when window is closed
          function MISSING_PARAMETER(formAction, closeFn)
          {
             scWindowName = 'ugsNewActionPopup';
             var scWinWidth  = 400;
             var scWinHeight = 120;
     
             var x = (screen.width - scWinWidth) / 2;
             var y = (screen.height - scWinHeight) / 2;
     
     
     
     
             var zPopupAddWindow = window.open( '', scWindowName,'width=' + scWinWidth +
                                                ', height=' + scWinHeight +
                                                ', resizable=yes, status=yes, scrollbars=yes, top=' +
                                                y + ',screenY=' + y + ',' + 'left=' + x + ',screenX=' + x + '');
     
             showWaitScreenInNewWindowWithClose(zPopupAddWindow, closeFn);
     
             if( formAction.indexOf( "?" ) > 0 )
             {
                formAction = formAction + "&ugs_global_dynamic_table_popup_window=true";
             }
             else
             {
                formAction = formAction + "?ugs_global_dynamic_table_popup_window=true";
             }
     
             document.TemplateForm.action = formAction;
             document.TemplateForm.target = scWindowName;
             document.TemplateForm.submit();
          }
          //This function opens the action in the new window and passes the ext_summary_new_window
          //parameter along with the request to let further action know that new open window has
          //been opened to perform the task. It also passes funtion to be
          //called when window is closed
          function MISSING_PARAMETER(formAction, closeFn, scWidth, scHeight)
          {
             scWindowName = 'ugsNewActionPopup';
     
             var x = 0, y = 0;
     
             x = window.screen.width/2 - 200;
             y = window.screen.height/2 - 300;
     
             var scWinWidth = "350";
             var scWinHeight = "10";
     
             var zPopupAddWindow = window.open( '', scWindowName,'width=' + scWinWidth +
                                                ', height=' + scWinHeight +
                                                ', resizable=yes, status=yes, scrollbars=yes, top=' +
                                                y + ',screenY=' + y + ',' + 'left=' + x + ',screenX=' + x + '');
     
     
             var scMessage = "Contacting Server to perform action...";
             var scCloseMessage1 = "Close";
             var scCloseMessage2 = " this window to cancel request.";
     
             buildHtmlPopupWithClose( zPopupAddWindow, scWidth, scHeight, scMessage,
                             scCloseMessage1, scCloseMessage2, closeFn);
     
             if( formAction.indexOf( "?" ) > 0 )
             {
                formAction = formAction + "&ugs_global_dynamic_table_popup_window=true";
             }
             else
             {
                formAction = formAction + "?ugs_global_dynamic_table_popup_window=true";
             }
             document.TemplateForm.action = formAction;
             document.TemplateForm.target = scWindowName;
             document.TemplateForm.submit();
          }
     
     
          function formsubmit_v1thumbnailpreviewpopup(formAction)
    	  {
    	         var width_value  = 600;
    	         var height_value = 600;
     
    	         var windowName = 'sdrcSystemFormPreviewPopup';
     
    	         mywindow = window.open('', windowName,"scrollbars=yes,resizable=yes,status=no,width="+width_value+",height="+height_value);
     
    	         	document.SummaryForm.target = windowName;
    	  			document.SummaryForm.action = formAction;
    	      		document.SummaryForm.submit();
          }
     
     
          // This function is used by multi tree widget
          function form_submit_in_new_window_multitree(formAction)
          {
     
             if(zPopupAddWindow==null)
             {
                scWindowName = 'ugsNewActionPopup';
     
                var x = 0, y = 0;
     
                x = window.screen.width/2 - 200;
                y = window.screen.height/2 - 300;
     
                var scWinWidth = "350";
                var scWinHeight = "10";
     
                zPopupAddWindow = window.open( '', scWindowName,'width=' + scWinWidth +
                                                   ', height=' + scWinHeight +
                                                   ', resizable=yes, status=yes, scrollbars=yes, top=' +
                                                   y + ',screenY=' + y + ',' + 'left=' + x + ',screenX=' + x + '');
     
     
                var scMessage = "Contacting Server to perform action...";
                var scCloseMessage1 = "Close";
                var scCloseMessage2 = " this window to cancel request.";
     
                buildHtmlPopup( zPopupAddWindow, 320, 150, scMessage,
                                scCloseMessage1, scCloseMessage2);
     
                ivCheck = setInterval( 'zCheck(zPopupAddWindow)',100);
     
                if( formAction.indexOf( "?" ) > 0 )
                {
                   formAction = formAction + "&ugs_global_dynamic_table_popup_window=true";
                }
                else
                {
                   formAction = formAction + "?ugs_global_dynamic_table_popup_window=true";
                }
     
                var treeDataDiv = document.getElementById("treedata-div");
                var treeDataDiv1 = document.getElementById("treedata-div1");
     
                if(treeDataDiv!=null)
                {
                    document.TemplateForm.scrolly.value = treeDataDiv.scrollLeft;
                    document.TemplateForm.scrollx.value = treeDataDiv.scrollTop;
                    document.TemplateForm.scrolly1.value = treeDataDiv1.scrollLeft;
                    document.TemplateForm.scrollx1.value = treeDataDiv1.scrollTop;
                }
     
                document.TemplateForm.action = formAction;
                document.TemplateForm.target = scWindowName;
                document.TemplateForm.submit();
             }
          }
     
          function zCheck( obj )
          {
     
            try
            {
                if( !obj || typeof(obj.closed)=='unknown' || obj.closed )
                {
                   clearInterval( ivCheck );
                   initMultiTreeScroll('true');
                   scrollToCoordinatesRestore();
                   zPopupAddWindow = null;
                }
             }
             catch (ex)
             {
     
                clearInterval( ivCheck );
                initMultiTreeScroll('true');
                scrollToCoordinatesRestore();
                zPopupAddWindow = null;
             }
          }
     
          function hideIt(object)
          {
             var browser_name = navigator.appName;
             var browser_version = parseInt(navigator.appVersion);
     
             if(document.all)
             {
                /* Check for existence of object */
                if(document.all[object])
                {
                   document.all[object].style.visibility = "hidden";
                   document.all[object].style.zIndex = 100;
                }
              }
              else if((browser_name == "Netscape")&&(browser_version < 5))
              {
                 /* Check for existence of object */
                 if(document.layers[object])
                    document.layers[object].visibility = "hidden";
              }
              else if ((browser_name == "Netscape")&&(browser_version >= 5))
              {
                 /* Check for existence of object */
                 if(document.getElementById(object))
                    document.getElementById(object).style.visibility ="hidden";
              }
          }
     
          function MISSING_PARAMETER(frmAction)
          {
             hideIt("BottomButtonBarDiv");
             if(!window.opener)
                showWaitScreen();
     
             formsubmit(frmAction);
          }
     
          function submitdocform(formAction)
          {
    	 document.TemplateForm.target = "";
    	 document.TemplateForm.action = formAction;
    	 document.TemplateForm.submit();
    	 window.opener.formsubmit('eds_bom_refresh_for_tmp_context');
          }
     
          function submiteditform(formAction)
          {
    	 document.TemplateForm.target = "";
    	 document.TemplateForm.action = formAction;
    	 document.TemplateForm.submit();
    	 window.opener.formsubmit('eds_bom_refresh_for_tmp_context');
          }
       </SCRIPT>
     
     
     
    <script language="JavaScript1.2" src="../edsplm/home/formsubmit_support.js">
    </script>
     
       <script language="JavaScript1.2" src="../edsplm/mwau/ChipUtility.js">
       </script>
     
     
    <!-- end edsplm/home/formsubmit.jsp -->
     
     
     
    <SCRIPT LANGUAGE="JavaScript">
          function formsubmit(formAction)
          {
             // Due to having a table that can filter out rows we need to walk through
             // each row, and if the rows check box is selected and visible set
             // the name of the checkbox equal to multi-select else set the name to
             // something else so that it doesn't get picked up
             // by the action handler as being selected
             //
             // TODO: This function needs to take in the checkbox name instead of
             //       assuming that the name is multi-select
     
             var arCheckBoxes = document.TemplateForm.elements;
     
             for( var i = 0; i < arCheckBoxes.length; i++ )
             {
                if( arCheckBoxes[i].type == "checkbox" && arCheckBoxes[i].checked &&
                    arCheckBoxes[i].parentNode.parentNode.style.display != "none" &&
                    arCheckBoxes[i].name == "isnotsubmittable" )
                {
                   arCheckBoxes[i].name = "multi-select";
                }
                else if( arCheckBoxes[i].type == "checkbox" && arCheckBoxes[i].checked &&
                         arCheckBoxes[i].parentNode.parentNode.style.display == "none" &&
                         arCheckBoxes[i].name == "multi-select" )
                {
                   arCheckBoxes[i].name = "isnotsubmittable";
                }
             }
     
             var elem1 = document.getElementsByName("v1GBCPartNumL_v1GBCPartNumL_0")[0];
    		 var elem2 = document.getElementsByName("v1GBCNoticeNumL_v1GBCNoticeNumL_0")[0];
     
    		 if( (elem1.value == "" || elem1.value == "*") && (elem2.value == "" || elem2.value == "*") )
    		 {
    			 alert("Please enter a more specific search criteria.");
    		 }else
    		 {
     
                document.TemplateForm.target = "";
                document.TemplateForm.action = formAction;
                document.TemplateForm.submit();
    		 }
          }
     
    </SCRIPT>
     
     
     
    <!-- start edsplm/home/back_page.jsp -->
     
     
     
          <SCRIPT LANGUAGE="JavaScript1.2">
          <!--
          function back(buttonAction)
          {
          history.back();
          }
          // -->
          </SCRIPT>
     
    <!-- end edsplm/home/back_page.jsp -->
     
    <!-- start edsplm/home/autodisplayfxn.jsp -->
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
    <!-- end edsplm/home/autodisplayfxn.jsp -->
     
    </BODY>
    </HTML>
    <!-- End /edsplm/extsummary/IndexSearchAndAdd_TabPage.jsp -->
    <TD><INPUT TYPE= "TEXT" CLASS="input-body" NAME="v1GBCPartNumL_v1GBCPartNumL_0" VALUE="" size="40" maxlength="300" ONKEYPRESS="enterKeySubmit(event)"></td> -->ligne226

    A la fin de la procédure je reçois un msgbox dont le texte est "Propriété ou méthode non gérée par cet objet".

    Merci d'avance.

  2. #2
    Rédacteur/Modérateur

    Avatar de Jean-Philippe André
    Homme Profil pro
    Architecte Power Platform, ex-Développeur VBA/C#/VB.Net
    Inscrit en
    Juillet 2007
    Messages
    14 642
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 40
    Localisation : Canada

    Informations professionnelles :
    Activité : Architecte Power Platform, ex-Développeur VBA/C#/VB.Net
    Secteur : Finance

    Informations forums :
    Inscription : Juillet 2007
    Messages : 14 642
    Points : 34 356
    Points
    34 356
    Par défaut
    salut,

    est-ce que l'excellent tuto de Qwazerty sur le sujet t'aide à trouver des pistes de résolution ?
    http://qwazerty.developpez.com/tutor...-et-vba-excel/

Discussions similaires

  1. [VB6]ouvrir une page Web à partir d'un bouton
    Par JEDTAR dans le forum VB 6 et antérieur
    Réponses: 13
    Dernier message: 08/06/2010, 21h17
  2. ouvrir un site web à partir d'un bouton
    Par mado18 dans le forum VB 6 et antérieur
    Réponses: 0
    Dernier message: 19/07/2009, 17h22
  3. Obliger un client a ouvrir une page a partir d'un lien
    Par jules_diedhiou dans le forum Langage
    Réponses: 2
    Dernier message: 12/12/2008, 12h56
  4. ouvrir un etat a partir d un bouton
    Par coson54 dans le forum IHM
    Réponses: 2
    Dernier message: 17/04/2008, 14h34
  5. Réponses: 1
    Dernier message: 10/10/2007, 14h05

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