Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Page 1 of 2 12 LastLast
Results 1 to 15 of 18
  1. #1
    New Coder
    Join Date
    Dec 2010
    Posts
    99
    Thanks
    18
    Thanked 0 Times in 0 Posts

    Confirm follow link

    Hello programmer and coders!

    I´m just starting to learn about JavaScript. And Im trying to make a function were I can put all links that schould have an alert box coming up when they click the link. I have putted this function togheter (that dont work..yet!):

    Code:
    function init(){ // load the page
    
    function go_to() {
    	
            var link = new Array();
    
            //links that schould have this function:
            link[0] = "http://www.capoeiras.se/";
            link[1] = "http://www.koanuka.com";
            link[2] = "http://www.matochhushallning.blogspot.com";
    
            //ok or cancel: 
            new_url = link[num];
            if (!confirm ("You are leaving this site, do you want that?")){
                    window.location = new_url;
            } else {
    			return false
     
            }
    }
    
    
    
    //här avslutas init
    	
    }
    				
    
    }
    window.onload = init;
    Do I need to have onclick here? Im thankful for any help I can get!!!

  • #2
    New Coder
    Join Date
    Dec 2010
    Posts
    99
    Thanks
    18
    Thanked 0 Times in 0 Posts

    confirm follow extern link

    I changed my cod to this:

    Code:
    function init(){ // loading page
    
    document.getElementsByTagName("a").onclick = goTo;
    
    function goTo() {
    	var links=document.getElementsByTagName("a");
            if (links.className=="extern")	
      
      	    if (!confirm ("You are leaving this site. Do you want to follow the link?")){
            		
    			return false;
     
            }
    		return true;
    }
    
    						
    
    
    
    //här avslutas init
    	
    }
    				
    
    }
    window.onload = init;
    //slut på init
    I was thinking to make a simple cod like this (but working!). I have put the name "extern" on every link that I want this confirm box on. Can my code work? And if what do I need to ad/change?

  • #3
    Regular Coder
    Join Date
    Jul 2002
    Location
    Kansas, USA
    Posts
    477
    Thanks
    0
    Thanked 51 Times in 50 Posts
    The getElementsByTagName function returns an array of elements so you have loop through the array and assign the onclick handler to each anchor. Since you've already coded the extern class on all the links, you could apply the onclick handler only to those anchors with that class while going through the loop. Then you don't need any code in the goTo function to determine whether the link is external.

    Please examine the code below and let me know if you have any questions.

    Code:
    function goTo(){
    	return confirm("You are leaving this site. Do you want to follow the link?");
    }
    
    function init(){
    	var anchors = document.getElementsByTagName("a");
    	for(var i = 0; i < anchors.length; i++){
    		if(anchors[i].className == "extern")
    			anchors[i].onclick = goTo;
    	}
    }
    
    window.onload = init;

  • #4
    Kor
    Kor is offline
    Red Devil Mod Kor's Avatar
    Join Date
    Apr 2003
    Location
    Bucharest, ROMANIA
    Posts
    8,478
    Thanks
    58
    Thanked 379 Times in 375 Posts
    Quote Originally Posted by kansel View Post
    The getElementsByTagName function returns an array of elements
    Not exactly an Array. It is a DOM collection. A "live" collection, which means you can not perform upon its elements the same methods as upon on Array. You can not push(), concat(), pop(), sort(), shift(), splice()... etc.
    KOR
    Offshore programming
    -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

  • #5
    New Coder
    Join Date
    Dec 2010
    Posts
    99
    Thanks
    18
    Thanked 0 Times in 0 Posts

    Confirm anchors with DOM

    I´m so thankful for your feedback!
    Kansel, your code seamed to make sense but even so, I cant make it work.

    I have another function on my external file. Thats why I notice I couldent have two init function so I did like this:

    Code:
    function init(){ // loading page
    
    document.getElementById("myForm").onsubmit = validateForm;
    
    function validateForm(){
    
      var txtName=document.getElementById("txtName").value;
    
        if(txtName==null || txtName=="") {
        alert("Vänligen fyll i ditt namn");
        return false;
        }
       
      var email=document.getElementById("txtEmail").value;
      var atpos=email.indexOf("@");
      var dotpos=email.lastIndexOf(".");
    
        if (atpos<1 || dotpos<atpos+2 || dotpos+2>=txtEmail.length) {
        alert(document.getElementById("txtEmail").value + " är inte en giltlig e-postadress");
       
        return false;   // won't check the name if the email is wrong
        }
       
        return true;    // only happens if the email and name are correct
    
        }
    
    
    
    //validerings funktion slut
    
    				
    function goTo(){
    	return confirm("You are leaving this site. Do you want to follow the link?");
    }
    
    function goIf(){
    	var anchors = document.getElementsByTagName("a");
    	for(var i = 0; i < anchors.length; i++){
    		if(anchors[i].className == "extern")
    			anchors[i].onclick = goTo;
    	}
    }
    //här avslutas init
    
    				
    }
    window.onload = init;
    //slut på init
    And my links looks like this:

    Code:
    <a name="extern" href="http://www.capoeiras.se">Se hemsida om capoeira</a>
    <a name="extern" href="http://www.koanuka.com">Se hemsidan om koanuka</a>
    <a name="extern" href="http://www.matochhushallning.blogspot.com">Se hemsida om matlagning</a>
    Have I missed something?
    Kor, thanks for filling in with your knowledge! If you or somebody else have any book or site to recommend (on my knowledge level) Im open! I have already study the (w3c pages about javascript, and someother books like "JavaScript for dummies" And even so I still don´t get it all...

  • #6
    Regular Coder
    Join Date
    Jul 2002
    Location
    Kansas, USA
    Posts
    477
    Thanks
    0
    Thanked 51 Times in 50 Posts
    Function declarations should not appear in your init function. They should be defined external to any other functions. You can call or assign them from within the init.

    Code:
    function validateForm(){
      var txtName=document.getElementById("txtName").value;
    
      if(txtName==null || txtName=="") {
        alert("Vänligen fyll i ditt namn");
        return false;
      }
    
      var email=document.getElementById("txtEmail").value;
      var atpos=email.indexOf("@");
      var dotpos=email.lastIndexOf(".");
    
      if (atpos<1 || dotpos<atpos+2 || dotpos+2>=txtEmail.length) {
        alert(document.getElementById("txtEmail").value + " är inte en giltlig e-postadress");
        return false; // won't check the name if the email is wrong
      }
    
      return true; // only happens if the email and name are correct
    }
    
    function goTo(){
      return confirm("You are leaving this site. Do you want to follow the link?");
    }
    
    function goIf(){
      var anchors = document.getElementsByTagName("a");
      for(var i = 0; i < anchors.length; i++){
        if(anchors[i].className == "extern")
          anchors[i].onclick = goTo;
      }
    }
    
    function init(){ // loading page
      document.getElementById("myForm").onsubmit = validateForm;
      goIf();
    }
    
    window.onload = init;
    Alternatively, you can put all the code (except for the functions that will eventually be used as event handlers - validateForm() and goTo()) into an anonymous function and reduce the global namespace usage. Note that you no longer need init() and goIf() functions as their code is directly placed into the onload.

    Code:
    window.onload = function(){
      document.getElementById("myForm").onsubmit = validateForm;
    
      var anchors = document.getElementsByTagName("a");
      for(var i = 0; i < anchors.length; i++){
        if(anchors[i].className == "extern")
          anchors[i].onclick = goTo;
      }
    }
    There are more advanced ways of dealing with multiple window.onload handlers but if you know exactly what code needs to be run on window load, this approach is good enough.

  • #7
    New Coder
    Join Date
    Dec 2010
    Posts
    99
    Thanks
    18
    Thanked 0 Times in 0 Posts

    Multiples function & init

    Thanks for explaining more about init! I fought I could put in all my functiondeclarations within one init function. But I understood I could do one window.onload function whitch store all the parts that need to wait for the page to first load before execute the functions. However, I tried both of your option but only my validateForm function works. I also tried your code inside of W3C tryit editor without making it work. I putted the code like this:

    Code:
    <html>
    <head>
    <script type="text/javascript">
    
    window.onload = function(){
    
      var anchors = document.getElementsByTagName("a");
      for(var i = 0; i < anchors.length; i++){
        if(anchors[i].className == "extern")
          anchors[i].onclick = goTo;
      }
    }
    
    function goTo(){
      return confirm("You are leaving this site. Do you want to follow the link?");
    }
    
    
    </script>
    </head>
    <body>
    
    <a name="extern" href="http://www.capoeiras.se">Se hemsida om capoeira</a>
    <a name="extern" href="http://www.koanuka.com">Se hemsidan om koanuka</a>
    <a name="extern" href="http://www.matochhushallning.blogspot.com">Se hemsida om matlagning</a>
    
    
    </body>
    </html>
    And I tried diffrent ways. Like this for an example:

    Code:
    function validateForm(){
      var txtName=document.getElementById("txtName").value;
    
      if(txtName==null || txtName=="") {
        alert("Vänligen fyll i ditt namn");
        return false;
      }
    
      var email=document.getElementById("txtEmail").value;
      var atpos=email.indexOf("@");
      var dotpos=email.lastIndexOf(".");
    
      if (atpos<1 || dotpos<atpos+2 || dotpos+2>=txtEmail.length) {
        alert(document.getElementById("txtEmail").value + " är inte en giltlig e-postadress");
        return false; // won't check the name if the email is wrong
      }
    
      return true; // only happens if the email and name are correct
    }
    
    function goTo(){
    	  var anchors = document.getElementsByTagName("a");
      return confirm("You are leaving this site. Do you want to follow the link?");
    }
    
    /*function goIf(){
      var anchors = document.getElementsByTagName("a");
      for(var i = 0; i < anchors.length; i++){
        if(anchors[i].className == "extern")
          anchors[i].onclick = goTo;
      }
    }
    */
    
    window.onload = function(){
      document.getElementById("myForm").onsubmit = validateForm;
    
      var anchors = document.getElementsByTagName("a");
      for(var i = 0; i < anchors.length; i++){
        if(anchors[i].className == "extern")
          anchors[i].onclick = goTo;
      }
    }
    Is it still a window onload problem or is there something that should be added or changed inside of the code? Why do you think one of my function works but not the other?

    Great to have somebody to get advice from!

  • #8
    Kor
    Kor is offline
    Red Devil Mod Kor's Avatar
    Join Date
    Apr 2003
    Location
    Bucharest, ROMANIA
    Posts
    8,478
    Thanks
    58
    Thanked 379 Times in 375 Posts
    At a first glance:
    Code:
    document.getElementById("myForm").onsubmit = function(){return validateForm()};
    As you need to prevent (return false) or to allow (return true) the submit process.
    KOR
    Offshore programming
    -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

  • #9
    New Coder
    Join Date
    Dec 2010
    Posts
    99
    Thanks
    18
    Thanked 0 Times in 0 Posts

    Confirm box when onclick extren links

    Thank you, Kor for sharing your fought after your first glance.
    But if I change the cod to your suggestion it makes the form submit if the user is pressing ok on the alert "Pleas fill in the form before submit" the form will be sended. My formValidate function works but not the confirm box when a user is pressing an extern link. Do you think it has something to do with the window onload or is there somthing to be change on that function?

    Here is the function that Im not able to make work:
    Code:
    function goTo(){
    	  var anchors = document.getElementsByTagName("a");
      return confirm("You are leaving this site. Do you want to follow the link?");
    }
    
    window.onload = function(){
      document.getElementById("myForm").onsubmit = function(){validateForm()};
    
      var anchors = document.getElementsByTagName("a");
      for(var i = 0; i < anchors.length; i++){
        if(anchors[i].className == "extern")
          anchors[i].onclick = goTo;
      }
    }

  • #10
    Kor
    Kor is offline
    Red Devil Mod Kor's Avatar
    Join Date
    Apr 2003
    Location
    Bucharest, ROMANIA
    Posts
    8,478
    Thanks
    58
    Thanked 379 Times in 375 Posts
    Let's split the problems
    1.
    Quote Originally Posted by Energia
    But if I change the cod to your suggestion it makes the form submit if the user is pressing ok on the alert "Pleas fill in the form before submit" the form will be sended.
    I don't think so. have a look:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    <html>
    <head>
    <title>Untitled Document</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta http-equiv="Content-Style-Type" content="text/css">
    <meta http-equiv="Content-Script-Type" content="text/javascript">
    <script type="text/javascript">
    function validateForm(){
    var txt=document.getElementById("txtName").value;
    if(txt=="") {
    alert("Vänligen fyll i ditt namn");
    return false;
    }
    }
    onload=function(){
    document.getElementById("myForm").onsubmit = function(){return validateForm()};
    }
    </script>
    </head>
    <body>
    <form action="" id="myForm" onsubmit="">
    <input type="text" name="txtName" id="txtName"><br>
    <br>
    <input type="submit" value="Submit">
    </form>
    </body>
    </html>
    2. the links problem
    Quote Originally Posted by Energia
    <a name="extern" href="http://www.capoeiras.se">Se hemsida om capoeira</a>
    <a name="extern" href="http://www.koanuka.com">Se hemsidan om koanuka</a>
    <a name="extern" href="http://www.matochhushallning.blogspot.com">Se hemsida om matlagning</a>
    ...
    ...
    if(anchors[i].className == "extern")
    You confound name with class. Either you use name (in HTML) and name (in JS), or class (in HTML) and className (in JS).

    And, you should understand how the return false/true works in HTML actions
    To prevent following the link:
    Code:
    <a href="www.google.com" onclick="return false">
    To allow:
    Code:
    <a href="www.google.com" onclick="return true">
    Now your code could be:
    Code:
    function goTo(){
     return confirm("You are leaving this site. Do you want to follow the link?");
    }
    window.onload = function(){
    var anchors = document.getElementsByTagName("a");
      for(var i = 0; i < anchors.length; i++){
        if(anchors[i].className == "extern")
          anchors[i].onclick = function(){return goTo()};
      }
    }
    ...
    ...
    <a class="extern" href="http://www.capoeiras.se">Se hemsida om capoeira</a>
    <a class="extern" href="http://www.koanuka.com">Se hemsidan om koanuka</a>
    <a class="extern" href="http://www.matochhushallning.blogspot.com">Se hemsida om matlagning</a>
    KOR
    Offshore programming
    -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

  • #11
    New Coder
    Join Date
    Dec 2010
    Posts
    99
    Thanks
    18
    Thanked 0 Times in 0 Posts

    Two eventhandler that need onload

    THANKS Kor for your valuable javaScript lesson! I have been reading your post many times and think I understand a little bit more about javaScript. Great that you found out that I was mixing name with class!

    I made your code work perfect at W3C Tryit Editor but not in my own external file
    But the linkwarning is now working witch make me really happy and thankful for the help! But it seams like neither only one function works or none of them work. I cant make them work at the same time. Now the validateForm function is not working. I fought I understood how the onload works but maybe I missed something there? (I really want to learn and I´m sorry for being a little slow!)
    Heres what Im trying with:

    Code:
    // validering
    function validateForm(){
      var txt=document.getElementById("txtName").value;
    
      if(txtName==null || txtName=="") {
        alert("Vänligen fyll i ditt namn");
        return false;
      }
    
      var email=document.getElementById("txtEmail").value;
      var atpos=email.indexOf("@");
      var dotpos=email.lastIndexOf(".");
    
      if (atpos<1 || dotpos<atpos+2 || dotpos+2>=txtEmail.length) {
        alert(document.getElementById("txtEmail").value + " är inte en giltlig e-postadress");
        return false; // won't check the name if the email is wrong
      }
    
    //loading the page for the elements that need that
    
    }
    onload=function(){
    document.getElementById("myForm").onsubmit = function(){return validateForm()};
    }
    
    // validating finish
    
    //linkwarning begins
    function goTo(){
     return confirm("You are leaving this site. Do you want to follow the link?");
    }
    
    //linkwarning ends
    
    //loading the page for the element that need that
    window.onload = function(){
    
    var anchors = document.getElementsByTagName("a");
      for(var i = 0; i < anchors.length; i++){
        if(anchors[i].className == "extern")
          anchors[i].onclick = function(){return goTo()};
      }
    }
    
    //linkwarning finish
    And the HTML:
    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    
    <html>
    
      <head>
      <meta http-equiv="content-type" content="text/html; charset=iso-8859-1"> 
      
    <link rel="stylesheet" type="text/css" href="style.css">
    
    
    <!-- link to javascript -->
    
    <script type="text/javascript" src="java/java.js"></script>
    
        <title>Testar Javascript</title>
    
    <link rel="stylesheet" type="text/css" href="style.css">
    
    
      </head>
    
      <body>
    
    <a class="extern" href="http://www.capoeiras.se">Se hemsida om capoeira</a>
    <a class="extern" href="http://www.koanuka.com">Se hemsidan om koanuka</a>
    <a class="extern" href="http://www.matochhushallning.blogspot.com">Se hemsida om matlagning</a>
       <form id="myForm" method="POST" action="registrering.html">
     
       <p><input type="hidden" name="s_retur"></p>
    
    <p>Ditt namn:</p>
    
        <p><input type="text" size="20" id="txtName"> </p>
    
    <p>Din e-postadress:</p>
    
       <p> <input type="text" size="20" id="txtEmail"> </p>
    
       <p> <input type="submit" name="Submit"> </p>
    
    </form>
      </body>
    </html>

  • #12
    Regular Coder
    Join Date
    Jul 2002
    Location
    Kansas, USA
    Posts
    477
    Thanks
    0
    Thanked 51 Times in 50 Posts
    Quote Originally Posted by Kor View Post
    At a first glance:
    Code:
    document.getElementById("myForm").onsubmit = function(){return validateForm()};
    As you need to prevent (return false) or to allow (return true) the submit process.
    How is this different than setting the onsubmit to directly reference validateForm as in the original? The original function already returns true/false, all you are doing is adding an extra wrapper.

    I tested the code I supplied (below) and it worked correctly with regards to the return values. I assigned it the same way without wrapping in an anonymous function.

    Code:
    function goTo(){
      return confirm("You are leaving this site. Do you want to follow the link?");
    }
    
    window.onload = function(){
      var anchors = document.getElementsByTagName("a");
      for(var i = 0; i < anchors.length; i++){
        if(anchors[i].className == "extern")
          anchors[i].onclick = goTo; // no extra anonymous function wrapper
      }
    }

  • #13
    New Coder
    Join Date
    Dec 2010
    Posts
    99
    Thanks
    18
    Thanked 0 Times in 0 Posts

    Two function window onload

    The only thing is that my functions seams to work seperate but togheter the validation dosent work but the linkwarning does(great!). This is how my code looks like:

    Code:
    //loading page
    
    window.onload = function(){
    	document.getElementById("myForm").onsubmit = validateForm;
    	  var txt=document.getElementById("txtName");
    	  var email=document.getElementById("txtEmail");
    
     
    var anchors = document.getElementsByTagName("a");
      for(var i = 0; i < anchors.length; i++){
        if(anchors[i].className == "extern")
          anchors[i].onclick = goTo;
      }
      }
    
    // validating
    function validateForm(){
      var txt=document.getElementById("txtName").value; 
      var email=document.getElementById("txtEmail").value;
      var atpos=email.indexOf("@");
      var dotpos=email.lastIndexOf(".");
      
     if(txtName==null || txtName=="") {
        alert("Vänligen fyll i ditt namn");
        return false;
      }	
        if (atpos<1 || dotpos<atpos+2 || dotpos+2>=txtEmail.length) {
        alert(document.getElementById("txtEmail").value + " är inte en giltlig e-postadress");
        return false; // won't check the name if the email is wrong
      }
      return true;
     }
    //end of validating
    
    //extern linkwarning
    function goTo(){
    	var anchors = document.getElementsByTagName("a");
     return confirm("You are leaving this site. Do you want to follow the link?");
    }
    
    //extern linkwarning end
    The error console says "txtName is not defined" In my mind I have define txtName by getelementbyid. The linkwarning function works but not the formvalidator. Any idea whats missing?
    Kansel I think your code is great, but can you see why I cant get it work?

    Thanks for sharing your knowledge!

  • #14
    Kor
    Kor is offline
    Red Devil Mod Kor's Avatar
    Join Date
    Apr 2003
    Location
    Bucharest, ROMANIA
    Posts
    8,478
    Thanks
    58
    Thanked 379 Times in 375 Posts
    Quote Originally Posted by kansel View Post
    How is this different than setting the onsubmit to directly reference validateForm as in the original? The original function already returns true/false, all you are doing is adding an extra wrapper.
    No. You must ask also for a return within the handler.
    Compare this:
    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    <html>
    <head>
    <title>untitled</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta http-equiv="Content-Style-Type" content="text/css">
    <meta http-equiv="Content-Script-Type" content="text/javascript">
    <script type="text/javascript">
    function preventLinkAction(){
    return false
    }
    </script>
    </head>
    <body>
    <a href="http:www.google.com" onclick="preventLinkAction()">click</a>
    </body>
    </html>
    with this:
    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    <html>
    <head>
    <title>untitled</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta http-equiv="Content-Style-Type" content="text/css">
    <meta http-equiv="Content-Script-Type" content="text/javascript">
    <script type="text/javascript">
    function preventLinkAction(){
    return false
    }
    </script>
    </head>
    <body>
    <a href="http:www.google.com" onclick="return preventLinkAction()">click</a>
    </body>
    </html>
    Understood?
    KOR
    Offshore programming
    -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

  • #15
    Regular Coder
    Join Date
    Jul 2002
    Location
    Kansas, USA
    Posts
    477
    Thanks
    0
    Thanked 51 Times in 50 Posts
    Code:
    //loading page
    
    window.onload = function(){
    	document.getElementById("myForm").onsubmit = validateForm;
    	  var txt=document.getElementById("txtName");
    	  var email=document.getElementById("txtEmail");
    
     
    var anchors = document.getElementsByTagName("a");
      for(var i = 0; i < anchors.length; i++){
        if(anchors[i].className == "extern")
          anchors[i].onclick = goTo;
      }
      }
    
    // validating
    function validateForm(){
      var txt=document.getElementById("txtName").value; 
      var email=document.getElementById("txtEmail").value;
      var atpos=email.indexOf("@");
      var dotpos=email.lastIndexOf(".");
      
     if(txtName==null || txtName=="") {
        alert("Vänligen fyll i ditt namn");
        return false;
      }	
        if (atpos<1 || dotpos<atpos+2 || dotpos+2>=txtEmail.length) {
        alert(document.getElementById("txtEmail").value + " är inte en giltlig e-postadress");
        return false; // won't check the name if the email is wrong
      }
      return true;
     }
    //end of validating
    
    //extern linkwarning
    function goTo(){
    	var anchors = document.getElementsByTagName("a");
     return confirm("You are leaving this site. Do you want to follow the link?");
    }
    
    //extern linkwarning end
    Note the parts in red. Why are they there? They do nothing and should be removed. (Two lines in the onload function and one in the goTo function.)

    Note the parts in blue. You are defining new variables named txt and email to refer to your document elements identified as txtName and txtEmail. For the validateForm function, txtName and txtEmail are not valid identifiers (variable names). Either substitute with the names you've given (txt and email) or rename the variables.

    Code:
    function validateForm(){
      var txt=document.getElementById("txtName").value; 
      var email=document.getElementById("txtEmail").value;
      var atpos=email.indexOf("@");
      var dotpos=email.lastIndexOf(".");
      
     if(txt==null || txt=="") {
        alert("Vänligen fyll i ditt namn");
        return false;
      }	
        if (atpos<1 || dotpos<atpos+2 || dotpos+2>=email.length) {
        alert(document.getElementById("txtEmail").value + " är inte en giltlig e-postadress");
        return false; // won't check the name if the email is wrong
      }
      return true;
     }

  • Users who have thanked kansel for this post:

    Energia (05-13-2011)


  •  
    Page 1 of 2 12 LastLast

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •