How to create text fields dynamically?

What could i do using javascript &/or HTML to create something that compares words entered in text fields, and returns the number of similar words there are?

  • Answer:

    i konw, i fixed them, but it won't work right. i have IE though

jkb3614 at Answerbag.com Visit the source

Was this solution helpful to you?

Other answers

This might work. I haven't tested it.: First, create the two text areas: <textarea id="a"></textarea> <textarea id="b"></textarea> Now make a javascript function: function compareTextareas(a, b){    var aV = document.getElementById(a).value.split(" ");    var bV = document.getElementById(b).value.split(" ");    var results = {};    for(var a in aV){        for(var b in bV){           if(aV[a] == bV[b]){              results[aV[a]] = aV[a];           }        }    }    var words = "";    for(var word in results){        words += results[word] + " ";    }    alert(words); } Then simply call that function when you want to compare them.

EL1 2

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.