• Jetzt anmelden. Es dauert nur 2 Minuten und ist kostenlos!

[ERLEDIGT] Kontaktformular - Zieladresse Definieren

Loerbs

Mitglied
Hallo und einen Schönen Samstag Abend wünsche ich :)

Ich habe ein "kleines" Problem.
Entweder habe ich Tomaten auf den Augen oder ..... nunja

Der unten beschriebene Code wurde von meinen Kollege auf unserer Website eingelegt. Jetzt dachte ich mir.. Kümmere ich mich mal um die Zeiladeresse im Kontaktformular...
Ziel von mir war es, einfach die Zieladresse zu Definieren ohne viel in seinen Code herum zu wurscheln.
Kann mir jemand sagen an welche stelle ich diese eintragen muss?

Vielen Dank in voraus!

Liebe Grüße

Code:
//slider
     jQuery(function() {

       //parallaax
       jQuery.stellar({
         horizontalScrolling: false,
         verticalOffset: 0
       });
       //fancybox
       jQuery(".fancybox").fancybox();
       jQuery(".various").fancybox({
         maxWidth   : 1100,
         maxHeight   : 600,
         fitToView   : false,
         width     : '70%',
         height     : '70%',
         autoSize   : false,
         closeClick   : false,
         openEffect   : 'none',
         closeEffect   : 'none'
       });
      
       jQuery('#mycarousel').jcarousel({
         vertical: true
       });
      
       //smooth scroll to href value
       jQuery(".tabs-btn ul li a, .navbar-nav li a, .navbar-brand").click(function(event){
          event.preventDefault();
          //calculate destination place
          var dest=0;
          if($(this.hash).offset().top > $(document).height()-$(window).height()){
            dest=$(document).height()-$(window).height();
          }else{
            dest=$(this.hash).offset().top;
          }
          //go to destination
          jQuery('html,body').animate({scrollTop:dest}, 1000,'swing');
        });
        //toggle map
        jQuery(".map-title h4 span").click(function(e) {
     jQuery(".map iframe").slideToggle(); 
         jQuery(".map-title h4 span i").toggleClass("fa-angle-up fa-angle-down");
  });
      
       jQuery(window).scroll(function(){
         if(jQuery(window).scrollTop() > 200){
           jQuery("#back-to-top").fadeIn(200);
         } else{
           jQuery("#back-to-top").fadeOut(200);
         }
       });
      
       jQuery('#back-to-top, .back-to-top').click(function() {
          jQuery('html, body').animate({ scrollTop:0 }, '800');
          return false;
       });
      
      
       //pie charts  
       jQuery('#pie-charts').waypoint(function(direction) {      
         jQuery('.chart').easyPieChart({
            barColor: "#5ecae6",
           onStep: function(from, to, percent) {
             jQuery(this.el).find('.percent').text(Math.round(percent));
           }
         });
         }, {
         offset: function() {
           return jQuery.waypoints('viewportHeight') - jQuery(this).height() + 100;
         }
       });
      
       jQuery('#pie-charts').waypoint(function(direction) {      
         jQuery('.green-circle').easyPieChart({
            barColor: "#bed431",
           onStep: function(from, to, percent) {
             jQuery(this.el).find('.percent').text(Math.round(percent));
           }
         });
         }, {
         offset: function() {
           return jQuery.waypoints('viewportHeight') - jQuery(this).height() + 100;
         }
        
       });
      
       jQuery('#pie-charts').waypoint(function(direction) {      
         jQuery('.red-circle').easyPieChart({
            barColor: "#e11e24",
           onStep: function(from, to, percent) {
             jQuery(this.el).find('.percent').text(Math.round(percent));
           }
         });
         }, {
         offset: function() {
           return jQuery.waypoints('viewportHeight') - jQuery(this).height() + 100;
         }
        
       });
      
       jQuery('#pie-charts').waypoint(function(direction) {      
         jQuery('.yellow-circle').easyPieChart({
            barColor: "#f6c715",
           onStep: function(from, to, percent) {
             jQuery(this.el).find('.percent').text(Math.round(percent));
           }
         });
         }, {
         offset: function() {
           return jQuery.waypoints('viewportHeight') - jQuery(this).height() + 100;
         }
        
       });
      
       jQuery('#pie-charts').waypoint(function(direction) {      
         jQuery('.purple-circle').easyPieChart({
            barColor: "#7251a2",
           onStep: function(from, to, percent) {
             jQuery(this.el).find('.percent').text(Math.round(percent));
           }
         });
         }, {
         offset: function() {
           return jQuery.waypoints('viewportHeight') - jQuery(this).height() + 100;
         }
        
       });
      
       });
       //form submit
       function checkmail(input)
        {
         var pattern1=/^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
         if(pattern1.test(input)){ return true; }else{ return false; }
        }  
        function proceed(){
          var name = document.getElementById("name");
          var email = document.getElementById("email");
          var company = document.getElementById("company");
          var web = document.getElementById("website");
          var msg = document.getElementById("message");
          var errors = "";
        
          if(name.value == "")
          {
          name.className = 'error';
           return false;
          }
          
          else if(email.value == "")
          {
           email.className = 'error';
           return false;
          }
          else if(checkmail(email.value)==false)
          {
           alert('Bitte geben Sie eine gültige E-Mail Adresse an.');
           return false;
      
          }
          else if(company.value == "")
          {
           company.className = 'error';
           return false;
          }
           else if(web.value == "")
          {
           web.className = 'error';
           return false;
          }
          else if(msg.value == "")
          {
           msg.className = 'error';
           return false;
          }
          else
           {
               $.ajax({
                 type: "POST",
                 url: "process.php",
                 data: $("#contact_form").serialize(),
                 success: function(msg)
                 {
                   //alert(msg);
                   if(msg){
                   $('#contact_form').fadeOut(1000);
                   $('#contact_message').fadeIn(2000);
                   document.getElementById("contact_message").innerHTML = "Ihre E-Mail wurde gesendet.";
                   return true;
                   }
                 }
               });
           }
        }
 
Zuletzt bearbeitet von einem Moderator:
Werbung:
Kümmere ich mich mal um die Zeiladeresse im Kontaktformular...
Ziel von mir war es, einfach die Zieladresse zu Definieren ohne viel in seinen Code herum zu wurscheln.
Kann mir jemand sagen an welche stelle ich diese eintragen muss?
Code:
$.ajax({
...
url: "process.php", // Zeile 181
...
});
Das nächste Mal Quellcode bitte in [code=option][/code] präsentieren.

Sieht mit [code=jQuery][/code] doch gleich viel schicker aus und schont die Augen beim Lesen :cool:
BBCodes [code=option] - Unterstützte Sprachen schrieb:
4cs, 6502acme, 6502kickass, 6502tasm, 68000devpac, abap, actionscript, actionscript3, ada, algol68, apache, applescript, apt_sources, arm, asm, asp, asymptote, autoconf, autohotkey, autoit, avisynth, awk, bascomavr, bash, basic4gl, bf, bibtex, blitzbasic, bnf, boo, c, c_loadrunner, c_mac, caddcl, cadlisp, cfdg, cfm, chaiscript, cil, clojure, cmake, cobol, coffeescript, cpp, cpp-qt, csharp, css, cuesheet, d, dcl, dcpu16, dcs, delphi, diff, div, dos, dot, e, ecmascript, eiffel, email, epc, erlang, euphoria, f1, falcon, fo, fortran, freebasic, freeswitch, fsharp, gambas, gdb, genero, genie, gettext, glsl, gml, gnuplot, go, groovy, gwbasic, haskell, haxe, hicest, hq9plus, html4strict, html5, icon, idl, ini, inno, intercal, io, j, java, java5, javascript, jquery, kixtart, klonec, klonecpp, latex, lb, ldif, lisp, llvm, locobasic, logtalk, lolcode, lotusformulas, lotusscript, lscript, lsl2, lua, m68k, magiksf, make, mapbasic, matlab, mirc, mmix, modula2, modula3, mpasm, mxml, mysql, nagios, netrexx, newlisp, nsis, oberon2, objc, objeck, ocaml, ocaml-brief, octave, oobas, oorexx, oracle11, oracle8, oxygene, oz, parasail, parigp, pascal, pcre, per, perl, perl6, pf, php, php-brief, pic16, pike, pixelbender, pli, plsql, postgresql, povray, powerbuilder, powershell, proftpd, progress, prolog, properties, providex, purebasic, pycon, pys60, python, q, qbasic, rails, rebol, reg, rexx, robots, rpmspec, rsplus, ruby, sas, scala, scheme, scilab, sdlbasic, smalltalk, smarty, spark, sparql, sql, stonescript, systemverilog, tcl, teraterm, text, thinbasic, tsql, typoscript, unicon, upc, urbi, uscript, vala, vb, vbnet, vedit, verilog, vhdl, vim, visualfoxpro, visualprolog, whitespace, whois, winbatch, xbasic, xml, xorg_conf, xpp, yaml, z80, zxbasic
 
Zuletzt bearbeitet:
Danke!

Den Code wollte ich eigentlich auch als "Code" präsentieren.
der Befehl
Code:
[code] ist wohl beim Kopieren verloren gegangen.
Sorry...

Vielen Dank nochmals für die schnelle Rückmeldung. 
Schönen Abend!
 
Werbung:
Zurück
Oben