Radio Name Maker

Ok Im wanting a script or how to make the script so that it will have like 3 options and you select one then you select from a list or 3 other options and then it will show the name at the bottom
for example

first part
()Car
()Lar
()Nar

last part
()Ley
()Gor
()Her

so if

first part
(X)Car
()Lar
()Nar

last part
(X)Ley
()Gor
()Her

then under it, it would show

Carley

but if you change Ley to Her then it would be

Carher

so i know it has to do with variables and storage and writing but i dont know how to get the radio button things or how to set them up to do what I want. Also the text on the button wont nessarely mean that is the part to be output but make it so something else like if Car where selected it would output Frog or something else.

Thanks for any help you give me.

C:Dos
C:Dos Run
Run Dos Run

Comments

  • A quick example:








    Car
    Ley


    Lar
    Gor


    Nar
    Her








    function getSelectedRadio()
    {
    var f = document.form1;
    var n = ""; //name string
    var o= null; //selected radio object

    o=f.r1;
    for(var i=0;i




    HTH,



    : Ok Im wanting a script or how to make the script so that it will have like 3 options and you select one then you select from a list or 3 other options and then it will show the name at the bottom
    : for example
    :
    : first part
    : ()Car
    : ()Lar
    : ()Nar
    :
    : last part
    : ()Ley
    : ()Gor
    : ()Her
    :
    : so if
    :
    : first part
    : (X)Car
    : ()Lar
    : ()Nar
    :
    : last part
    : (X)Ley
    : ()Gor
    : ()Her
    :
    : then under it, it would show
    :
    : Carley
    :
    : but if you change Ley to Her then it would be
    :
    : Carher
    :
    : so i know it has to do with variables and storage and writing but i dont know how to get the radio button things or how to set them up to do what I want. Also the text on the button wont nessarely mean that is the part to be output but make it so something else like if Car where selected it would output Frog or something else.
    :
    : Thanks for any help you give me.
    :
    : C:Dos
    : C:Dos Run
    : Run Dos Run
    :
    :

    [hr][grey]To err is human, but to really foul things up requires a computer. (Farmers Almanac)[/grey] :-)

  • To get it to write the output to the page, the easiest way would probably be to have two s and innerHTML them with whatever you want.
  • Uh, How do i go about that? I dont Know Java Script much so how could i do that? (Also I want it to be desplayed below or above the actual area where you choose the name parts from. And i want it to be updated or changed as they change the names, so they dont have to click a button or anything.

    Another thing i would like, if possiable is to be shown how to get it so you click to parts and click a button and then it will desplay the result at the end of the text box, so it would have carley then you select larley and it would put ", Larley" or something so thats there commas between the names.

    Also so i could understand it a little better could you explane a little about the different parts so I might get to understand them when needed.

    Thanks for your help.

    : To get it to write the output to the page, the easiest way would probably be to have two s and innerHTML them with whatever you want.
    :

    C:Dos
    C:Dos Run
    Run Dos Run









  • Car
    Ley


    Lar
    Gor


    Nar
    Her










    function getSelectedRadio()
    {
    var f = document.form1;
    var n = ""; //name string
    var o= null; //selected radio object

    o=f.r1; // o now = the first radio group
    for(var i=0;i




    That should work.
  • [b][red]This message was edited by CrazzyWarrior at 2004-1-17 14:11:55[/red][/b][hr]
    Nope it doesent gets an error when you press the button(which i dident want in the first place) on line 42 char 1, something about 'document.names' is null or not an object. Code 0

    ALSO ATENTION

    +-----------------------------------------------------------+
    !I DONT WANT IT TO BE AN ALLERT OR ANYTHING LIKE THAT I WANT!
    !IT TO BE TEXT RIGHT UNDER THE AREA WHERE THE OPTIONS ARE...!
    !AND HAVE IT BE REFRESED KINDA THING ONCLICK OR A NEW OPTION!
    !SO IT WILL DESPLAY IT AND YOU COULD HIGHLIGHT IT OR SOME-..!
    !THING LIKE THAT...................................THANK YOU!
    +-----------------------------------------------------------+



    :
    :
    :
    :
    :
    :
    :
    : Car
    : Ley

    :
    : Lar
    : Gor

    :
    : Nar
    : Her

    :
    :

    :
    :
    :
    :
    :
    :
    : function getSelectedRadio()
    : {
    : var f = document.form1;
    : var n = ""; //name string
    : var o= null; //selected radio object
    :
    : o=f.r1; // o now = the first radio group
    : for(var i=0;i
    :
    :
    :
    :
    : That should work.
    :

    C:Dos
    C:Dos Run
    Run Dos Run




  • Y'know, I'm trying to help here. You could have just asked nicely instead of shouting.








    Car
    Ley


    Lar
    Gor



    Nar
    Her







    function getSelectedRadio()
    {
    var f = document.form1;
    var n = ""; //name string
    var o= null; //selected radio object

    o=f.r1; // o now = the first radio group
    for(var i=0;i




    That ought to do it, but it'll go to the wrong place if you have other spans in the page before that one.
  • Sorry I was just trying to get it noticed dident mean for it to be taken as yelling. And also Thanls for that, it works perfectly, Thanks for your Help.

    : Y'know, I'm trying to help here. You could have just asked nicely instead of shouting.
    :
    :
    :
    :
    :
    :
    :
    :
    : Car
    : Ley

    :
    : Lar
    : Gor
    :

    :
    : Nar
    : Her
    :

    :
    :
    :
    :
    :
    : function getSelectedRadio()
    : {
    : var f = document.form1;
    : var n = ""; //name string
    : var o= null; //selected radio object
    :
    : o=f.r1; // o now = the first radio group
    : for(var i=0;i
    :
    :
    :
    :
    : That ought to do it, but it'll go to the wrong place if you have other spans in the page before that one.
    :

    C:Dos
    C:Dos Run
    Run Dos Run


Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories