What's the alert box cannot be displayed?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • phpuser123
    New Member
    • Dec 2009
    • 108

    #1

    What's the alert box cannot be displayed?

    I have a function that takes a base url and appends values dynamically from a form.However, the success alert box is not displayed.. What's wrong with these codes and How to sort this?

    Code:
     function validateEncode(url,frm,id){
                   alert(url.toString().length)
                   Form = document.forms[frm].elements;
                        var URL="";
                        var encodedurl;
                        alert(url);
                       for (i=0;i<=Form.length;i++)
                            {
                                URL+="test"+Form[i].name;
                            }
    
                       //urlObject.setAttribute('href', url+encodedurl)
                      alert("success");
                   
                 return false;
                }
  • Dormilich
    Recognized Expert Expert
    • Aug 2008
    • 8694

    #2
    line #7: the last cycle causes an error. change to for (i=0;i<Form.len gth;i++)

    Comment

    Working...