Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Radio Button

Status
Not open for further replies.

emuye

MIS
Aug 23, 2004
41
US
I have two selection Called American and Enghish System.under each of them i have more than one pdf and zip files.for example under American Sysetm i have Ameri01.pdf and Ameri02.pdf....etc and Ameri01.zip and Ameri02.zip...etc.The same applies to the Englisy system.my question is how could i approach this problem using Javascrip.My experience with Javascript is very limited and i really appreciate if someone walk me through by giving me an example.To me it is like climbing Moung Everest....I know it is a cake walk for some people.
thank you for the help
 
you haven't really explained what you want. how do you want it set up? what functionality do you want?

*cLFlaVA
----------------------------
[tt]insert funny quotation here.[/tt]
 
I just want a way for the user to select one of the two, American or british and then i want the user to pick a file the belongs to the right group. for instance if user selects english there are files belongs to english system.In addition to that the user download a zip file of englihs system by clicking a button.
To make my story simple, i would like for the user to select an American or english system from a menue and select the file that belongs to the right system.
 
Something like this?

Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "[URL unfurl="true"]http://www.w3.org/TR/html4/strict.dtd">[/URL]

<html>
<head>
<title>new document</title>

<script language="javascript" type="text/javascript">
<!--

function doSwitch(on, off) {
    document.getElementById(on).style.display = 'block';
    document.getElementById(off).style.display = 'none';
}

-->
</script>

</head>

<body>

<div style="width: 100%;">
<form name="f">
  <fieldset>
    <input type="radio" name="lang" value="amer" onclick="doSwitch('amerFiles', 'britFiles');" checked />American
    <input type="radio" name="lang" value="brit" onclick="doSwitch('britFiles', 'amerFiles');" />British
  </fieldset>
</form>
</div>

<div id="amerFiles" style="display: block;">
  <a href="#">american_file.zip</a>
</div>
<div id="britFiles" style="display: none;">
  <a href="#">british_file.zip</a>
</div>

</body>

</html>

*cLFlaVA
----------------------------
[tt]insert funny quotation here.[/tt]
 
There is more than one zip file and also i am just wondering if i could create another button that is only displays the pdf files.I have more than one pdf files for each catagory.
 
The code I gave you was an example. Obviously, if there were more than one file, you can add them yourself.

*cLFlaVA
----------------------------
[tt]insert funny quotation here.[/tt]
 
I Look at it but it does not give you an option to select whether a pdf or a zip file and also i have more than one pdf and zip file under each catagory.I do not really know how i can make it to work.I really need help..please
 
I really need help..please
That's exactly what cLFlaVA has supplied for you - help.

I think what you're really asking for is someone to do the whole thing for you, which is not within the scope of tek-tips.

Perhaps you could contract a professional to do it for you?

-kaht

banghead.gif
 
Gog it finally. kaht FYI,it was not my intention for someone to do my work but i did not know how i could make the code to work the way i wanted it.anyway, thank you for the help especially,cLFlaVA
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top