Web Analytics Made Easy -
StatCounter looking for a unique sort of script - CodingForum

Announcement

Collapse
No announcement yet.

looking for a unique sort of script

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • looking for a unique sort of script

    This may be extremely silly, but I am looking for a script that allows the user to input information into 4 different fields and then takes specific letters from each of those fields to create 2 new words. It's similar in concept that the "find you porn star name" shenanigans, but it's not that. Can anyone help me?

  • #2
    sure. which letters do you want to be taken from which strings?
    bluemood | devedge | devmo | MS Dev Library | WebMonkey | the Guide

    i am a loser geek, crazy with an evil streak,
    yes i do believe there is a violent thing inside of me.

    Comment


    • #3
      4 entries:

      the first 3 letters of the first entry
      the first 2 letters of the second entry
      which forms the first new word

      the first 2 letters of the third entry
      the first 3 letters of the fourth entry
      which forms the second new word

      thanks for you help

      Comment


      • #4
        <script>
        function mixMish() {
        var theForm = document.FormName;

        var firstword, secondword;
        firstword = theForm.box1.value.slice(0, 3) + theForm.box2.value.slice(0, 2);
        secondword = theForm.box3.value.slice(0, 2) + theForm.box4.value.slice(0, 3);

        theForm.boxForResults.value = firstword + ' ' + secondword;
        }
        </script>

        <FORM NAME="FormName">
        ...
        ...
        <INPUT TYPE="BUTTON" VALUE="Submit" OnClick="mixMish();">
        </FORM>
        bluemood | devedge | devmo | MS Dev Library | WebMonkey | the Guide

        i am a loser geek, crazy with an evil streak,
        yes i do believe there is a violent thing inside of me.

        Comment


        • #5
          Wow! that was really fast. And it works great. Thanks so much! When I actually get it on my site I'll let you know and link to your homepage.

          Comment

          Working...
          X