1.3k Aufrufe
Gefragt in Webseiten HTML von
Hallo,

in der Rubrik «Kontakt», nachdem ich die notwendigen Informationen ausgefüllt und den Absenden-Button angeklickt habe, passiert nichts. Hier der Quellcode:

</ul>

</div>

<div style="display:none; visibility:hidden;">

  <input type="text" name="wsite_subject" />

</div>

<div style="text-align:left; margin-top:10px; margin-bottom:5px;">

  <input type="hidden" name="form_version" value="2" />

  <input type="hidden" name="wsite_approved" id="wsite-approved" value="approved" />

  <input type="hidden" name="ucfid" value="127500378183686844" />

<input type='submit' style='position:absolute;top:0;left:-9999px;width:1px;height:1px' /><a class='wsite-button' onclick="document.getElementById('form-127500378183686844').submit()"><span class='wsite-button-inner'>Senden</span>

              </a>

              </div>

</form>

Gruß

Roger

7 Antworten

0 Punkte
Beantwortet von computerschrat Profi (32.2k Punkte)
Hallo Roger,

hinter dem onclick= sollte doch ein Funktionsname stehen. Ist denn

document.getElementById('form-127500378183686844').submit()

der Name der Funktion? Und wenn, tut die Funktion das was sie soll?

Gruß computerschrat
0 Punkte
Beantwortet von
Ich kann deine Frage nicht beantworten, weil ich nicht weiß, was eine Funktion ist. Ich habe dies von einer anderen bestehenden Webseite kopiert.

Bitte sag mir, wie ich vorgehen soll.
0 Punkte
Beantwortet von
Kann ich eine E-Mail-Adresse hinterlegen?
0 Punkte
Beantwortet von computerschrat Profi (32.2k Punkte)

Wenn du nicht weißt, was eine Funktion ist, wird es schwierig zu erklären wie du vorgehen musst. Irgendwo im Quellcode muss ein Stück Programm sein, das die Aufgaben erledigt, die beim Klick auf den Button gewünscht sind. Dieses Stück Code ist die Funktion, die hinter Onclick benannt wird. Ich vermute mal, dass du nur einen Teil des Codes aus der bestehenden Webseite kopiert hast und dann fehlen wichtige Elemente, Eine Beschreibung, wie das Onclick-Ereignis formuliert wird, findest du hier: https://www.w3schools.com/jsref/event_onclick.asp

Gruß computerschrat

0 Punkte
Beantwortet von
Ich möchte, dass das Kontaktformular an eine E-Mail-Adresse gesendet wird. Kannst du mir sagen, wie ich das machen soll?
0 Punkte
Beantwortet von computerschrat Profi (32.2k Punkte)

Da bin ich leider nicht der Richtige, um das zu beantworten. Ich habe schon ein paar Webseiten gemacht, mich mit Formularen aber bisher nie auseinandergesetzt. Man müsste auch etwas mehr über deine Programmierumgebung wissen. Es gibt das Thema aber im Supportnet schon mal:

https://supportnet.de/fresh/2006/12/id1477995.asp

Oder auch hier: https://www.html.de/threads/formular-per-email-senden.42685/

Gruß computerschrat

0 Punkte
Beantwortet von

 Hier der vollständige Quellcode:

"<div>

<form enctype="multipart/form-data" action="http://www.weebly.com/weebly/apps/formSubmit.php" method="POST" id="form-127500378183686844">

<div id="127500378183686844-form-parent" class="wsite-form-container" style="margin-top:15px;">

  <ul class="formlist" id="127500378183686844-form-list">

    <h2 class="wsite-content-title" style="text-align:left;">Kontakt</h2>

                                                         <label class="wsite-form-label" for="input-256819660389498080">Name <

                                                                       <input id="input-256819660389498080" class="wsite-form-input wsite-input" type="text" name="_u256819660389498080[first]" />

                                                                       <label class="wsite-form-sublabel" for="input-256819660389498080">First</label>

                                                         </div>

                                                         <div class="wsite-form-input-container wsite-form-right wsite-form-input-last-name">

                                                                       <input id="input-256819660389498080-1" class="wsite-form-input wsite-input" type="text" name="_u256819660389498080[last]" />

                                                                       <label class="wsite-form-sublabel" for="input-256819660389498080-1">Last</label>

                                                         </div>

                                                         <div id="instructions-256819660389498080" class="wsite-form-instructions" style="display:none;"></div>

                                          </div>

                                          <div style="clear:both;"></div></div>

<div><div class="wsite-form-field" style="margin:5px 0px 5px 0px;">

                                                         <label class="wsite-form-label" for="input-598307925891005002">E-Mail Adresse  <span class="form-required">*</span></label>

                                                         <div class="wsite-form-input-container">

                                                                       <input id="input-598307925891005002" class="wsite-form-input wsite-input wsite-input-width-200px" type="text" name="_u598307925891005002" />

                                                         </div>

                                                         <div id="instructions-598307925891005002" class="wsite-form-instructions" style="display:none;"></div>

                                          </div></div>

<div><div class="wsite-form-field" style="margin:5px 0px 5px 0px;">

                                                         <label class="wsite-form-label" for="input-560392210716632875">Nachricht <span class="form-required">*</span></label>

                                                         <div class="wsite-form-input-container">

                                                                       <textarea id="input-560392210716632875" class="wsite-form-input wsite-input wsite-input-width-285px" name="_u560392210716632875" style="height: 50px"></textarea>

                                                         </div>

                                                         <div id="instructions-560392210716632875" class="wsite-form-instructions" style="display:none;"></div>

                                          </div></div>

  </ul>

</div>

<div style="display:none; visibility:hidden;">

  <input type="text" name="wsite_subject" />

</div>

<div style="text-align:left; margin-top:10px; margin-bottom:5px;">

  <input type="hidden" name="form_version" value="2" />

  <input type="hidden" name="wsite_approved" id="wsite-approved" value="approved" />

  <input type="hidden" name="ucfid" value="127500378183686844" />

<input type='submit' style='position:absolute;top:0;left:-9999px;width:1px;height:1px' /><a class='wsite-button' onclick="document.getElementById('form-127500378183686844').submit()"><span class='wsite-button-inner'>Senden</span>"

Gruß

Roger

             

...