473,396 Members | 2,154 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Javascript Replace()

risk32
98
Hello all. As I am just a sapling according to the world of programming, I've come across what I thought would have been sufficient at the task I needed. Only problem... inter-twining Javascript and HTML.

Here's what I've got:
3 drop down boxes, each according to day, month, and year
1 hyperlink that needs to be updated depending on what option value is selected in each box (may sound confusing but I'll explain)

Example hyperlink:
[HTML]<a href="..\Electronic Boards Info\Schedule Slides\2008\"
If, let's say, January was selected in the drop down box, the hyperlink would need to be changed to:
<a href="..\Electronic Boards Info\Schedule Slides\2008\January\"
If day 03 was selected, as well as January:
<a href="..\Electronic Boards Info\Schedule Slides\2008\January\03 January"
Next comes the year (2008):
<a href="..\Electronic Boards Info\Schedule Slides\2008\January\03 January 08"
[/HTML]
This is all I need the Javascript to do. Nothing to fancy. Just simple text replacements.

I used HTML for the <select><option> parameters, but if anyone has an idea to transfer this into JS, could you let me know? I appreciate any help. I come from a VB background so all of this is fairly new and confusing to me.

Thanks,
Adam
Sep 10 '08 #1
44 3815
r035198x
13,262 8TB
Basically you call a Javassript function onChange of the select. The Javascript function would be passed the select itself. It (the function) would then
1.) Inspect the the select to find out which value is selected
2.) Make the href values replacements depending on the select's selected value.

There are lots of examples of similar things all over the internet.
Sep 10 '08 #2
risk32
98
I thought something of the like would work, but do you have any examples on how to do that? I'm not sure the correct terminology when using a search for the functions.
Sep 11 '08 #3
acoder
16,027 Expert Mod 8TB
If you're new to JavaScript, you'll find some of the tutorial links in the Offsite Links sticky thread useful, especially W3Schools.

You need to update the href property of the link with linkRef.href = ... where linkRef is a reference to the link. To get the values of the drop down boxes: selObj.value where selObj is a ref. to a select element.

If you get stuck, post your code.
Sep 11 '08 #4
risk32
98
If you're new to JavaScript, you'll find some of the tutorial links in the Offsite Links sticky thread useful, especially W3Schools.

You need to update the href property of the link with linkRef.href = ... where linkRef is a reference to the link. To get the values of the drop down boxes: selObj.value where selObj is a ref. to a select element.

If you get stuck, post your code.
With what I have so far (which I know isn't the entirety of the coding), I need to replace the \..\ portion of the href with an option (month) then add the option (day) plus an abbreviated month (JAN,FEB...) and a year (2008) with a file extension of ".ppt"

The final href should read at final replacement \\yofs13\374OG\36AS\Asgard_data\data\Duty Desk\Electronic Boards Info\Schedule Slides\2008\01 JAN 08.ppt

Then, I need it to shell out to PowerPoint with the href. I've made this work with Excel VBA with absolutely NO problems. Alas, our servers at work restrict .exe file extensions and Excel VBA won't compile anyways. :( Gotta go it the long way...
Expand|Select|Wrap|Line Numbers
  1. <html>
  2. <script type="text/javascript">
  3. var linkstring="\\yofs13\374OG\36AS\Asgard_data\data\Duty Desk\Electronic Boards Info\Schedule Slides\2008\"
  4. document.write
  5. <center>
  6. <form>
  7. <select>
  8. <option value="\\yofs13\374OG\36AS\Asgard_data\data\Duty Desk\Electronic Boards Info\Schedule Slides\2008\..\01">01</option>
  9. <option value="\\yofs13\374OG\36AS\Asgard_data\data\Duty Desk\Electronic Boards Info\Schedule Slides\2008\..\02">02</option>
  10. <option value="\\yofs13\374OG\36AS\Asgard_data\data\Duty Desk\Electronic Boards Info\Schedule Slides\2008\..\03">03</option>
  11. <option value="\\yofs13\374OG\36AS\Asgard_data\data\Duty Desk\Electronic Boards Info\Schedule Slides\2008\..\04">04</option>
  12. <option value="\\yofs13\374OG\36AS\Asgard_data\data\Duty Desk\Electronic Boards Info\Schedule Slides\2008\..\05">05</option>
  13. <option value="\\yofs13\374OG\36AS\Asgard_data\data\Duty Desk\Electronic Boards Info\Schedule Slides\2008\..\06">06</option>
  14. <option value="\\yofs13\374OG\36AS\Asgard_data\data\Duty Desk\Electronic Boards Info\Schedule Slides\2008\..\07">07</option>
  15. <option value="\\yofs13\374OG\36AS\Asgard_data\data\Duty Desk\Electronic Boards Info\Schedule Slides\2008\..\08">08</option>
  16. <option value="\\yofs13\374OG\36AS\Asgard_data\data\Duty Desk\Electronic Boards Info\Schedule Slides\2008\..\09">09</option>
  17. <option value="\\yofs13\374OG\36AS\Asgard_data\data\Duty Desk\Electronic Boards Info\Schedule Slides\2008\..\10">10</option>
  18. <option value="\\yofs13\374OG\36AS\Asgard_data\data\Duty Desk\Electronic Boards Info\Schedule Slides\2008\..\11">11</option>
  19. <option value="\\yofs13\374OG\36AS\Asgard_data\data\Duty Desk\Electronic Boards Info\Schedule Slides\2008\..\12">12</option>
  20. <option value="\\yofs13\374OG\36AS\Asgard_data\data\Duty Desk\Electronic Boards Info\Schedule Slides\2008\..\13">13</option>
  21. <option value="\\yofs13\374OG\36AS\Asgard_data\data\Duty Desk\Electronic Boards Info\Schedule Slides\2008\..\14">14</option>
  22. <option value="\\yofs13\374OG\36AS\Asgard_data\data\Duty Desk\Electronic Boards Info\Schedule Slides\2008\..\15">15</option>
  23. <option value="\\yofs13\374OG\36AS\Asgard_data\data\Duty Desk\Electronic Boards Info\Schedule Slides\2008\..\16">16</option>
  24. <option value="\\yofs13\374OG\36AS\Asgard_data\data\Duty Desk\Electronic Boards Info\Schedule Slides\2008\..\17">17</option>
  25. <option value="\\yofs13\374OG\36AS\Asgard_data\data\Duty Desk\Electronic Boards Info\Schedule Slides\2008\..\18">18</option>
  26. <option value="\\yofs13\374OG\36AS\Asgard_data\data\Duty Desk\Electronic Boards Info\Schedule Slides\2008\..\19">19</option>
  27. <option value="\\yofs13\374OG\36AS\Asgard_data\data\Duty Desk\Electronic Boards Info\Schedule Slides\2008\..\20">20</option>
  28. <option value="\\yofs13\374OG\36AS\Asgard_data\data\Duty Desk\Electronic Boards Info\Schedule Slides\2008\..\21">21</option>
  29. <option value="\\yofs13\374OG\36AS\Asgard_data\data\Duty Desk\Electronic Boards Info\Schedule Slides\2008\..\22">22</option>
  30. <option value="\\yofs13\374OG\36AS\Asgard_data\data\Duty Desk\Electronic Boards Info\Schedule Slides\2008\..\23">23</option>
  31. <option value="\\yofs13\374OG\36AS\Asgard_data\data\Duty Desk\Electronic Boards Info\Schedule Slides\2008\..\24">24</option>
  32. <option value="\\yofs13\374OG\36AS\Asgard_data\data\Duty Desk\Electronic Boards Info\Schedule Slides\2008\..\25">25</option>
  33. <option value="\\yofs13\374OG\36AS\Asgard_data\data\Duty Desk\Electronic Boards Info\Schedule Slides\2008\..\26">26</option>
  34. <option value="\\yofs13\374OG\36AS\Asgard_data\data\Duty Desk\Electronic Boards Info\Schedule Slides\2008\..\27">27</option>
  35. <option value="\\yofs13\374OG\36AS\Asgard_data\data\Duty Desk\Electronic Boards Info\Schedule Slides\2008\..\28">28</option>
  36. <option value="\\yofs13\374OG\36AS\Asgard_data\data\Duty Desk\Electronic Boards Info\Schedule Slides\2008\..\29">29</option>
  37. <option value="\\yofs13\374OG\36AS\Asgard_data\data\Duty Desk\Electronic Boards Info\Schedule Slides\2008\..\30">30</option>
  38. <option value="\\yofs13\374OG\36AS\Asgard_data\data\Duty Desk\Electronic Boards Info\Schedule Slides\2008\..\31">31</option>
  39. </select>
  40. </form>
  41. </center>
  42. <center>
  43. <form>
  44. <select>
  45. <option value="January">January</option>
  46. <option value="February">February</option>
  47. <option value="March">March</option>
  48. <option value="April">April</option>
  49. <option value="May">May</option>
  50. <option value="June">June</option>
  51. <option value="July">July</option>
  52. <option value="August">August</option>
  53. <option value="September">September</option>
  54. <option value="October">October</option>
  55. <option value="November">November</option>
  56. <option value="December">December</option>
  57. </select>
  58. </form>
  59. </center>
  60. <center>
  61. <form>
  62. <select>
  63. <option value="2008">2008</option>
  64.  
  65.  
  66. <a href="\\yofs13\374OG\36AS\Asgard_data\data\Duty Desk\Electronic Boards Info\Schedule slides\2008\">\\yofs13\374OG\36AS\Asgard_data\data\Duty Desk\Electronic Boards Info\Schedule slides\2008\</a>
  67. </html>
  68.  
Sep 12 '08 #5
risk32
98
Could I create an array to help with this issue? Maybe like...
arrayDay = ["01","02","03","04",5".....]
arrayMonth Abb= ["JAN", "FEB"...]
arrayMonth = ["January", "February"...]
string(something) = valueOf(array (not sure what to put here.. I'm confusing myself with JS))

Instead of having options values that would completely change the href, I was also thinking doing something that included the array as options, like the option select.
Sep 12 '08 #6
acoder
16,027 Expert Mod 8TB
There's no need to make it more complicated than it needs to be.

Give each select a unique ID so you can access them with document.getElementById(). Construct a string from the values and append it to the link string, e.g.
Expand|Select|Wrap|Line Numbers
  1. var str = "";
  2. var selDay = document.getElementById("selDay");
  3. // same for selMonth/selYear
  4. str = selDay + " " + selMonth + " " + selYear;
  5. // now append to the link string and then set the href of the link.
Sep 12 '08 #7
risk32
98
I know you might be a little "agitated" by my inexperience acoder, but I found a pre-written code that will help me, just need to figure out what to change in the code to make it work for my uses.

This is what I have for the FORM:
Expand|Select|Wrap|Line Numbers
  1. <form name="formAirfield" id="formAirfieldLinks" action="">
  2. <table bgcolor="#0000A0" border="1">
  3. <tr>
  4. <td colspan="3" width="528">
  5. <strong>
  6. <font size="2" color="#FFFFFF">
  7. Please Select a DAY/MONTH/YEAR for the slide
  8. </font>
  9. </strong>
  10. </td>
  11. </tr>
  12. <tr>
  13. <td valign="top" align="center" width="171">
  14. <div align="center">
  15. <center>
  16. <p>
  17. <small>
  18. <strong>
  19. <font color="#ffffff">
  20. Select a Month
  21. </font>
  22. </strong>
  23. </small>
  24. </td>
  25. <td valign="top" align="center" width="176">
  26. <small>
  27. <strong>
  28. <font color="#FFFFFF">
  29. Day
  30. </font>
  31. </strong>
  32. </small>
  33. </td>
  34. <td valign="top" align="center" width="169">
  35. <small>
  36. <strong>
  37. <font color="#FFFFFF">
  38. Year
  39. </font>
  40. </strong>
  41. </small>
  42. </td>
  43. </tr>
  44. <tr align="center">
  45. <td width="171" valign="top" align="center">
  46. <!-- ## start of select containing topics ## -->
  47. <select name="menuMonth" id="menuMonth" onchange="changeDay()" size="1">
  48. <option value="none">
  49. Select Month
  50. </option>
  51. <option value="none">
  52. January
  53. </option>
  54. <option value="none">
  55. February
  56. </option>
  57. <option value="none">
  58. March
  59. </option>
  60. <option value="none">
  61. April
  62. </option>
  63. <option value="none">
  64. May
  65. </option>
  66. <option value="none">
  67. June
  68. </option>
  69. <option value="none">
  70. July
  71. </option>
  72. <option value="none">
  73. August
  74. </option>
  75. <option value="none">
  76. September
  77. </option>
  78. <option value="none">
  79. October
  80. </option>
  81. <option value="none">
  82. November
  83. </option>
  84. <option value="none">
  85. December
  86. </option>
  87. </select>
  88. </td>
  89. <td width="176" valign="top" align="center">
  90. <!-- ## start of select contaning subjects ## -->
  91. <select name="menuDay" id="menuDay" onchange="changeYear()" size="1">
  92. <option value="none">
  93. Select Month
  94. </option>
  95. </select>
  96. </td>
  97. <td width="169" valign="top" align="center">
  98. <!-- ## start of select containing Year ## -->
  99. <select name="menuYear" id="menuYear" onchange="go(this)" size="1">
  100. <option value="none">
  101. Select Year
  102. </option>
  103. </select>
  104. </td>
  105. </tr>
  106. </table>
  107. </form>
  108.  
Next... coding for the JS portion of it (not changed completely to reflect what I need... but the idea is exactly what I need) Found the code from http://www.trans4mind.com/personal_d...leMenuCode.htm

Expand|Select|Wrap|Line Numbers
  1. //new Option("text","value")
  2. //this code changes menus
  3. function nullOptions(aMenu){
  4. var tot=aMenu.options.length
  5. for (i=0;i<tot;i++)
  6. {
  7. aMenu.options[i]=null
  8. }
  9. aMenu.options.length=0;
  10. }
  11.  /* ####################### start of files for main option 1 computer stuff
  12. ####################### */
  13.  function MySubject1(aMenu){
  14. nullOptions(aMenu)
  15.  with (aMenu){
  16.  //Rewrites the text and values
  17. options[0]=new Option("Select a page","none");
  18. options[1]=new Option("Menus with Text Descriptions","MenuDescriptions.htm");
  19. options[2]=new Option("JavaScript triple drop down menu","tripleMenu.htm");
  20. options[3]=new Option("How to do JavaScript - contents","index.html");
  21. options[4]=new Option("Double Drop Down Menu","Doublemenu.htm");
  22. options[5]=new Option("Writing to a new pager after loading and keeping the original","docWrite3.htm");
  23. options[6]=new Option("Confirm Message Boxes","alertConfirm.htm");
  24. options[7]=new Option("A confirm box with two locations","alertConfirm2Locs.htm");
  25. options[8]=new Option("Onload and OnUnload Alerts","alertOnLoad.htm");
  26. options[9]=new Option("Prompts for Input","alertPrompts.htm");
  27. options[10]=new Option("Alerts","alerts.htm");
  28. options[11]=new Option("Creating image buttons","alertsImages.htm");
  29. options[12]=new Option("Text Alerts","alertsText.htm");
  30. options[13]=new Option("Menus with Text Descriptions","ArrayText.htm");
  31. options[14]=new Option("Menus with Text Descriptions","ArrayText2.htm");
  32. options[15]=new Option("Image Descriptions","ArrayTextImage.htm");
  33. options[16]=new Option("Using an array to write your table of contents","ArrayToContents.htm");
  34. options[17]=new Option("Back and Forward Buttons","BackForward.htm");
  35. options[18]=new Option("Back Forward Buttons 2","BackForwardNew.htm");
  36. options[19]=new Option("Back and forward using simple code","BackForwardSimple.htm");
  37. options[20]=new Option("Table of Contents - produced on the fly by JavaScript","contentsByJavaScript.htm");
  38. options[21]=new Option("How to use cookies in JavaScript","cookie1.htm");
  39. options[22]=new Option("More on setting JavaScript cookies","cookie2.htm");
  40. options[23]=new Option("Getting information from JavaScript cookies","cookie3.htm");
  41. options[24]=new Option("Using cookies to remember the user's name","cookie4.htm");
  42. options[25]=new Option("Allowing the user to change the name stored in cookies","cookie5.htm");
  43. options[26]=new Option("Telling users how many times they have visited the page.","cookie6.htm");
  44. options[27]=new Option("Writing with Java Script","documentWrite.htm");
  45. options[28]=new Option("Writing where you like","documentWrite2.htm");
  46. options[29]=new Option("Writing new text to a page when it loads","docWrite1.htm");
  47. options[30]=new Option("Writing to a new pager after loading (Document.write 2)","docWrite2.htm");
  48. options[31]=new Option("Adding text to a new pager and keeping the original","docWrite3.htm");
  49. options[32]=new Option("Adding the contents of a scrolling text box to the page","docWrite4.htm");
  50. options[33]=new Option("Writing to a page with a drop-down menu using document.write","docWrite5.htm");
  51. options[34]=new Option("Text Alerts","doing_it_without_a_button.htm");
  52. options[35]=new Option("Hyperlinks in Frames","frameHyperlinks.htm");
  53. options[36]=new Option("Loading orphan frames in their proper parent.","frames_onLoad.htm");
  54. options[37]=new Option("Hyperlinks in Frames - More","FramesHyperlinks2.htm");
  55. options[38]=new Option("free java script editor to help create code.","freeEditor.htm");
  56. options[39]=new Option("Forward and Backwards, using history buttons","history.htm");
  57. options[40]=new Option("Hover Buttons","HoverButtons.htm");
  58. options[41]=new Option("Image Slide Show using JavaScriptImage","imageSlideShow.htm");
  59. options[42]=new Option("Welcome to TCJM","info.htm");
  60. options[43]=new Option("Table of Contents and JavaScript Menu Builder TCJM","intro.htm");
  61. options[44]=new Option("Javascript Tutorial - Ken Ward's Guide","javascript_tutorial.htm");
  62. options[45]=new Option("Javascript Tutorial - Ken Ward's Guide","javascript_tutorial2.htm");
  63. options[46]=new Option("Download the JavaScript Tutorial now ...","jsDownload.htm");
  64. options[47]=new Option("Frames in Java Script","jsFrames.htm");
  65. options[48]=new Option("Welcome to the JavaScript Editor","jshelpLight.htm");
  66. options[49]=new Option("Code Page","jsView.htm");
  67. options[50]=new Option("Jump Function","jumpfunction.htm");
  68. options[51]=new Option("Ken Double-menu","kenDoubleMenu.htm");
  69. options[52]=new Option("Drop-Down Menu usings iffs","menu_iffs.htm");
  70. options[53]=new Option("A Simple Drop Down Menu","menu1.htm");
  71. options[54]=new Option("Menus from Arrays","menuArray.htm");
  72. options[55]=new Option("Menus with Text Descriptions 2","MenuDescriptions.htm");
  73. options[56]=new Option("New Image Every Time You Visit the Page - nearly!","newImage.htm");
  74. options[57]=new Option("Recommended books and software","recommended_books_and_software.htm");
  75. options[58]=new Option("A JavaScript Search Engine","searchEngine.htm");
  76. options[59]=new Option("The Slide Show - Introduction","slide_show_intro.htm");
  77. options[60]=new Option("A JavaScript slide show using frames","slideShow.htm");
  78. options[61]=new Option("Arrays and HTML Code Slide Show using Frames - 1","slideshow1.htm");
  79. options[62]=new Option("Slide Show using Frames - 2","slideshow2.htm");
  80. options[63]=new Option("Slide Show using Frames - 3","slideshow3.htm");
  81. options[64]=new Option("Slide Show using Frames - 4","slideshow4.htm");
  82. options[65]=new Option("The mystery of time","time1.htm");
  83. options[66]=new Option("javascript: Time: the days of the week","time2.htm");
  84. options[67]=new Option("javascript: Time: the months","time3.htm");
  85. options[68]=new Option("javascript: Time: Days to Christmas","time4.htm");
  86. options[69]=new Option("User Information","userInfo.htm");
  87. options[70]=new Option("Simple Window Example","win0.htm");
  88. options[71]=new Option("Creating New Windows","WindowNew.htm");
  89. options[72]=new Option("How to create new windows","WindowNew2.htm");
  90. options[73]=new Option("Creating Windows in Java Script","WindowNewControl.htm");
  91. options[74]=new Option("Creating Windows in Java Script","WindowNewEx1.htm");
  92. options[75]=new Option("How to use hyperlinks in new windows","WindowNewHyperlinks.htm");
  93. options[76]=new Option("Windows closing automatically on exit","WindowOnLoadEx.htm");
  94. options[77]=new Option("How to do Java Script - javascript tutorial","index.html");
  95. options[0].selected=true
  96.  }
  97. //Netscape likes a refresh, but Microsoft doesn't
  98. /*if (navigator.appName.indexOf("Netscape")>-1)
  99. history.go(0)*/
  100. }
  101.  function MySubject2(aMenu){
  102. nullOptions(aMenu)
  103. with (aMenu){
  104.  //Rewrites the text and values
  105. options[0]=new Option("Select a page","none");
  106. options[1]=new Option("What's in a name - Anchors","../HTMLGuide/anchors.htm");
  107. options[2]=new Option("Background Images - Ken Ward's HTML Tutorial","../HTMLGuide/background_images.htm");
  108. options[3]=new Option("Formatting - HTML Tutorial","../HTMLGuide/Bold.htm");
  109. options[4]=new Option("Forms: Buttons, Text Area, Action, etc","../HTMLGuide/buttons.htm");
  110. options[5]=new Option("Aligning Table Cells","../HTMLGuide/CellProperties.htm");
  111. options[6]=new Option("HTML Colour names","../HTMLGuide/ColChart.htm");
  112. options[7]=new Option("HTML Colour names","../HTMLGuide/ColChartBeingWorkedOn.htm");
  113. options[8]=new Option("HTML Comments","../HTMLGuide/Comments.htm");
  114. options[9]=new Option("Contents of HTML Tutorial.","../HTMLGuide/Contents.htm");
  115. options[10]=new Option("Example Page (Part of Frame)","../HTMLGuide/DefaultTarget.htm");
  116. options[11]=new Option("{Part of Frame}","../HTMLGuide/DefaultTargetArea.htm");
  117. options[12]=new Option("Second Page (Part of Frame)","../HTMLGuide/DefaultTargetArea2.htm");
  118. options[13]=new Option("Default Target Code","../HTMLGuide/DefaultTargetCode.htm");
  119. options[14]=new Option("Example Targets in Frames","../HTMLGuide/DefaultTargetFrame.htm");
  120. options[15]=new Option("My Home Page","../HTMLGuide/Ex1.htm");
  121. options[16]=new Option("My Home Page with a heading","../HTMLGuide/Ex2.htm");
  122. options[17]=new Option("Headings Examples","../HTMLGuide/ExHeadings1.htm");
  123. options[18]=new Option("Example of Page Colour","../HTMLGuide/ExPageColour.htm");
  124. options[19]=new Option("Paragraphs - the P Tag!","../HTMLGuide/ExParagraph.htm");
  125. options[20]=new Option("The Font Tag","../HTMLGuide/font.htm");
  126. options[21]=new Option("Foreground Colour (Example Page)","../HTMLGuide/forground_colour.htm");
  127. options[22]=new Option("Posting a form","../HTMLGuide/form-post.htm");
  128. options[23]=new Option("Forms","../HTMLGuide/forms.htm");
  129. options[24]=new Option("Menus in Forms","../HTMLGuide/FormSelect.htm");
  130. options[25]=new Option("Many Frames Example","../HTMLGuide/frameComplex.htm");
  131. options[26]=new Option("Page Testing Special Targets","../HTMLGuide/frameIndx.htm");
  132. options[27]=new Option("Frame Header Page for Special Targets","../HTMLGuide/FrameParentTest.htm");
  133. options[28]=new Option("Frame Testing Special Targets","../HTMLGuide/FrameParenttype.htm");
  134. options[29]=new Option("Let's Get Framed HTML Tutorial","../HTMLGuide/frames1.htm");
  135. options[30]=new Option("HTML Tutorial - Frames Code","../HTMLGuide/frames2.htm");
  136. options[31]=new Option("Frame Page Split in Two Columns","../HTMLGuide/frames2colls.htm");
  137. options[32]=new Option("HTML Code for 2 Columns","../HTMLGuide/frames2collsCode.htm");
  138. options[33]=new Option("2 Columns Example","../HTMLGuide/frames2colTop.htm");
  139. options[34]=new Option("Basic HTML Frames Code","../HTMLGuide/frames2frameCode.htm");
  140. options[35]=new Option("2 Rows Example","../HTMLGuide/frames2Frames.htm");
  141. options[36]=new Option("Frame Split in Two Rows","../HTMLGuide/frames2rows.htm");
  142. options[37]=new Option("Caught in frames","../HTMLGuide/framesCaught.htm");
  143. options[38]=new Option("Frames Dividing into Columns First","../HTMLGuide/framesColFirst.htm");
  144. options[39]=new Option("Rows and Columns Frame Page","../HTMLGuide/framesFColsRows.htm");
  145. options[40]=new Option("No Frames Frame Page","../HTMLGuide/framesFNoFrames.htm");
  146. options[41]=new Option("HTML Tutorial Frames - Intro","../HTMLGuide/framesFrame.htm");
  147. options[42]=new Option("Frames The Columns First","../HTMLGuide/framesFrame1.htm");
  148. options[43]=new Option("Frames Hyperlinks","../HTMLGuide/framesHyperlinks.htm");
  149. options[44]=new Option("Frameset","../HTMLGuide/frames-simple1.htm");
  150. options[45]=new Option("The frames in a frameset","../HTMLGuide/frames-simple2.htm");
  151. options[46]=new Option("HTML Frames: Columns in Rows","../HTMLGuide/frames-simple3.htm");
  152. options[47]=new Option("My Page","../HTMLGuide/GoldBlack.htm");
  153. options[48]=new Option("Headings","../HTMLGuide/Headings.htm");
  154. options[49]=new Option("Horizontal Rules","../HTMLGuide/horizontal_rules.htm");
  155. options[50]=new Option("Hypertext Links","../HTMLGuide/hypertext_links.htm");
  156. options[51]=new Option("Iframes","../HTMLGuide/iframes.htm");
  157. options[52]=new Option("Image Alignment","../HTMLGuide/ImageAlignment.htm");
  158. options[53]=new Option("Image Maps","../HTMLGuide/imageArea.htm");
  159. options[54]=new Option("Images with Links","../HTMLGuide/ImageHyperlink.htm");
  160. options[55]=new Option("HTML Tutorial In-line Images","../HTMLGuide/images.htm");
  161. options[56]=new Option("HTML Tutorial Contents - many pages!","../HTMLGuide/index.html");
  162. options[57]=new Option("How to Make Web Pages Using HTML","../HTMLGuide/introHTML.htm");
  163. options[58]=new Option("Lists in HTML","../HTMLGuide/Lists.htm");
  164. options[59]=new Option("Page to Return you to Meta Tags","../HTMLGuide/metaRefresh.htm");
  165. options[60]=new Option("Meta Tags","../HTMLGuide/metaTags.htm");
  166. options[61]=new Option("MyMenuPage","../HTMLGuide/MyMenuPage.htm");
  167. options[62]=new Option("Navigation in HTML Pages","../HTMLGuide/navigation.htm");
  168. options[63]=new Option("No Frames Code for Basic Frame Page","../HTMLGuide/noframes.htm");
  169. options[64]=new Option("No Frames Tag","../HTMLGuide/noframesSeen.htm");
  170. options[65]=new Option("Page Colour","../HTMLGuide/PageColour.htm");
  171. options[66]=new Option("Useful Resources","../HTMLGuide/resources.htm");
  172. options[67]=new Option("Table Illustrating Colspan and Rowspan","../HTMLGuide/RowAnd ColSpans.htm");
  173. options[68]=new Option("Table Illustrating Colspan and Rowspan","../HTMLGuide/RowAndColSpans.htm");
  174. options[69]=new Option("Search Engine Problems","../HTMLGuide/SearchEngines.htm");
  175. options[70]=new Option("Tables as seen by Search Engines","../HTMLGuide/SearchEngineSees.htm");
  176. options[71]=new Option("Special Characters","../HTMLGuide/specialCharacters.htm");
  177. options[72]=new Option("Special Characters 2","../HTMLGuide/specialCharacters2.htm");
  178. options[73]=new Option("Special Characters 3","../HTMLGuide/specialcharacters3.htm");
  179. options[74]=new Option("Special Characters 8000 numbers","../HTMLGuide/specialcharacters8000.htm");
  180. options[75]=new Option("Doing it with Style!&gt;","../HTMLGuide/Style.htm");
  181. options[76]=new Option("Table Code","../HTMLGuide/table_code.htm");
  182. options[77]=new Option("Table Cell Padding","../HTMLGuide/TableCellPadding.htm");
  183. options[78]=new Option("HTML Tables","../HTMLGuide/tables.htm");
  184. options[79]=new Option("More HTML Table Properties","../HTMLGuide/tables2.htm");
  185. options[80]=new Option("Uniform Resource Locators, URLs","../HTMLGuide/urls.htm");
  186. options[81]=new Option("Making Headings, Titles, and Subheads clear","../HTMLGuide/Writing.htm");
  187. options[0].selected=true
  188. }
  189. //Netscape likes a refresh, but Microsoft doesn't
  190.  /* if (navigator.appName.indexOf("Netscape")>-1)
  191. history.go(0) */
  192. }
  193. function MySubject3(aMenu){
  194. nullOptions(aMenu)
  195. with (aMenu){
  196.  //Rewrites the text and values
  197. options[0]=new Option("Select a page","none");
  198. options[1]=new Option("Alignment in Cascading Style Sheets","../StyleSheets/alignment.htm");
  199. options[2]=new Option("Anchors in Cascading Style Sheets","../StyleSheets/anchors.htm");
  200. options[3]=new Option("Bullets","../StyleSheets/bullets.htm");
  201. options[4]=new Option("Class Selectors","../StyleSheets/class.htm");
  202. options[5]=new Option("Creating Style Sheet Files","../StyleSheets/CreatingStyleSheetFiles.htm");
  203. options[6]=new Option("Declarations","../StyleSheets/declarations.htm");
  204. options[7]=new Option("FONT selector","../StyleSheets/fonts.htm");
  205. options[8]=new Option("Copy of the style sheet","../StyleSheets/h1.htm");
  206. options[9]=new Option("Headings","../StyleSheets/headings.htm");
  207. options[10]=new Option("index","../StyleSheets/index.html");
  208. options[11]=new Option("Inheritance","../StyleSheets/inheritance.htm");
  209. options[12]=new Option("More on Selectors","../StyleSheets/more_on_selectors.htm");
  210. options[13]=new Option("Selectors","../StyleSheets/selectors.htm");
  211. options[14]=new Option("What's the use of style sheets?","../StyleSheets/WhatUse.htm");
  212. options[0].selected=true
  213.  }
  214. /*//Netscape likes a refresh, but Microsoft doesn't
  215. if (navigator.appName.indexOf("Netscape")>-1)
  216. history.go(0)*/
  217. }
  218.  /* ####################### ####################### */
  219.  function MySubject4(aMenu){
  220.  aMenu.options.length=0;
  221. with (aMenu){
  222.  //Rewrites the text and values
  223. options[0]=new Option("Select a page","none");
  224. options[1]=new Option("Search engine positioning","../search-engine-positioning/index.html");
  225. options[2]=new Option("Analysis","../search-engine-positioning/analysis.htm");
  226. options[3]=new Option("Analysis of an anomaly","../search-engine-positioning/anomaly197.htm");
  227. options[4]=new Option("Find Special: search engine software","../search-engine-positioning/findSpecial.htm");
  228. options[5]=new Option("Screen Shot of Find Special","../search-engine-positioning/FindSpecialScreenShot.htm");
  229. options[6]=new Option("Important parts for search engine positioning","../search-engine-positioning/important-parts-search-engine-positioning.htm");
  230. options[7]=new Option("Keyword Density and Search Engine Positioning","../search-engine-positioning/keywordDensity.htm");
  231. options[8]=new Option("More Data","../search-engine-positioning/moreData.htm");
  232. options[9]=new Option("The numbers game","../search-engine-positioning/numbers.htm");
  233. options[10]=new Option("screenshot","../search-engine-positioning/search-engine-software.htm");
  234. options[11]=new Option("Register Find Special","../search-engine-positioning/sell.htm");
  235. options[12]=new Option("Spreadsheet","../search-engine-positioning/tableAltaVista.htm");
  236.  options[0].selected=true
  237. }
  238. /*//Netscape likes a refresh, but Microsoft doesn't
  239. if (navigator.appName.indexOf("Netscape")>-1)
  240. history.go(0)*/
  241. }
  242.  /* ####################### end of files for option 1 computer stuff
  243. ####################### */
  244.  
  245.  /* ####################### start of list of files for option 2 self development
  246. ####################### */
  247. function MySubject1a(aMenu){
  248. nullOptions(aMenu)
  249.  with (aMenu){
  250.  //Rewrites the text and values
  251. options[0]=new Option("Select a page","none");
  252. options[1]=new Option("Personal Development Site Contents","../Contents.htm");
  253. options[2]=new Option("1st Free the Mind: Self Development Contents","../index.html");
  254. options[3]=new Option("General Semantics - notes on the system","../KenGenSemantics.htm");
  255. options[4]=new Option("Philosophy and personal development","../philosContents.htm");
  256. options[5]=new Option("Self development books","../self_development_books.htm");
  257. options[6]=new Option("Importance","../1stSelfDevelopment/000107.htm");
  258. options[7]=new Option("Intuition","../1stSelfDevelopment/000114.htm");
  259. options[8]=new Option("What Karma are you creating now?","../1stSelfDevelopment/000120.htm");
  260. options[9]=new Option("Learning from negative reactions","../1stSelfDevelopment/000201.htm");
  261. options[10]=new Option("Retrieving that which was lost.","../1stSelfDevelopment/990506.htm");
  262. options[11]=new Option("Being at cause","../1stSelfDevelopment/990611.htm");
  263. options[12]=new Option("Pure Action","../1stSelfDevelopment/990618.htm");
  264. options[13]=new Option("Emotional Mr Men and Ms Ladies","../1stSelfDevelopment/990626.htm");
  265. options[14]=new Option("Disagreement","../1stSelfDevelopment/990817.htm");
  266. options[15]=new Option("Soul Mates","../1stSelfDevelopment/990820.htm");
  267. options[16]=new Option("Responsibility","../1stSelfDevelopment/990827.htm");
  268. options[17]=new Option("Rumpelstiltskin and Synchronicity","../1stSelfDevelopment/990830.htm");
  269. options[18]=new Option("You can have anything but not everything!","../1stSelfDevelopment/990906.htm");
  270. options[19]=new Option("Words, words, and more words","../1stSelfDevelopment/990913.htm");
  271. options[20]=new Option("Our Four Selves","../1stSelfDevelopment/990930.htm");
  272. options[21]=new Option("Being Honest for a Change","../1stSelfDevelopment/991003.htm");
  273. options[22]=new Option("Musing on Mind-Body Healing","../1stSelfDevelopment/991004.htm");
  274. options[23]=new Option("Mirroring, Etc","../1stSelfDevelopment/991011.htm");
  275. options[24]=new Option("Strong Emotions","../1stSelfDevelopment/991012.htm");
  276. options[25]=new Option("Rapport and Truth","../1stSelfDevelopment/991020.htm");
  277. options[26]=new Option("It's so unfair!","../1stSelfDevelopment/991026.htm");
  278. options[27]=new Option("I believe in the God Power!","../1stSelfDevelopment/991108.htm");
  279. options[28]=new Option("Monkey Tricks","../1stSelfDevelopment/991109.htm");
  280. options[29]=new Option("Stages of Learning -","../1stSelfDevelopment/991109comments.htm");
  281. options[30]=new Option("How we are programmed","../1stSelfDevelopment/991121.htm");
  282. options[31]=new Option("How Much Choice do We Really Have?","../1stSelfDevelopment/991130.htm");
  283. options[32]=new Option("Games","../1stSelfDevelopment/991215.htm");
  284. options[33]=new Option("Good Games","../1stSelfDevelopment/991215_2.htm");
  285. options[34]=new Option("A bit of alchemy","../1stSelfDevelopment/A bit of alchemy.htm");
  286. options[35]=new Option("Are you open-minded","../1stSelfDevelopment/Are you open minded.htm");
  287. options[36]=new Option("Are you open-minded?","../1stSelfDevelopment/Are you open mindedComments.htm");
  288. options[37]=new Option("Being agreeable","../1stSelfDevelopment/BeingAgreeable.htm");
  289. options[38]=new Option("NoTitleFound","../1stSelfDevelopment/bullets.htm");
  290. options[39]=new Option("Creating Demons","../1stSelfDevelopment/Creating demons!.htm");
  291. options[40]=new Option("Dark Night of the Soul","../1stSelfDevelopment/DarkNight.htm");
  292. options[41]=new Option("Fly into a good mood!","../1stSelfDevelopment/Fly.htm");
  293. options[42]=new Option("See-saw Thinking","../1stSelfDevelopment/grandiosity.htm");
  294. options[43]=new Option("How does my problem help me?","../1stSelfDevelopment/HowDoesMyProblemHelpMe.htm");
  295. options[44]=new Option("I feel so guilty","../1stSelfDevelopment/I feel so guilty.htm");
  296. options[45]=new Option("1stSelfDevelopment","../1stSelfDevelopment/index.html");
  297. options[46]=new Option("Learning from negative reactions","../1stSelfDevelopment/learning_from_phobia.htm");
  298. options[47]=new Option("Let's read some minds","../1stSelfDevelopment/Let's read some minds..htm");
  299. options[48]=new Option("Are we limited by success?","../1stSelfDevelopment/limitations.htm");
  300. options[49]=new Option("What is love?","../1stSelfDevelopment/love.htm");
  301. options[50]=new Option("Is true knowledge valuable?","../1stSelfDevelopment/Magic.htm");
  302. options[51]=new Option("What really gets us going?","../1stSelfDevelopment/Motives.htm");
  303. options[52]=new Option("Self Development articles and techniques","../1stSelfDevelopment/PastMail.htm");
  304. options[53]=new Option("Polarity","../1stSelfDevelopment/Polarity.htm");
  305. options[54]=new Option("Polarity Integration","../1stSelfDevelopment/PolarityIntegration.htm");
  306. options[55]=new Option("Would you like to know a secret","../1stSelfDevelopment/secret.htm");
  307. options[56]=new Option("Six Step Reframing","../1stSelfDevelopment/SixStepReframing.html");
  308. options[57]=new Option("NoTitleFound","../1stSelfDevelopment/SixStepReframingLadyOfLove.htm");
  309. options[58]=new Option("NoTitleFound","../1stSelfDevelopment/SixStepReframingMonika.htm");
  310. options[59]=new Option("Something Strange is Happening","../1stSelfDevelopment/Something Strange is happening.htm");
  311. options[60]=new Option("What's Your Viewpoint?","../1stSelfDevelopment/Viewpoints.htm");
  312. options[61]=new Option("Wake up","../1stSelfDevelopment/Wake up.htm");
  313. options[62]=new Option("Welcome to 1stSelfDevelopment","../1stSelfDevelopment/welcome.htm");
  314. options[63]=new Option("What is really real?","../1stSelfDevelopment/What is really real!.htm");
  315. options[64]=new Option("What is 1stSelfDevelopment?","../1stSelfDevelopment/WhatIs.htm");
  316. options[65]=new Option("What might have been","../1stSelfDevelopment/WhatMightHaveBeen.htm");
  317. options[0].selected=true
  318.  }
  319. //Netscape likes a refresh, but Microsoft doesn't
  320. /*if (navigator.appName.indexOf("Netscape")>-1)
  321. history.go(0)*/
  322. }
  323. function MySubject2a(aMenu){
  324. nullOptions(aMenu)
  325.  with (aMenu){
  326.  //Rewrites the text and values
  327. options[0]=new Option("Select a page","none");
  328. options[1]=new Option("Persuasion through enlightenment 2","../1stCommunicationSkil/000101.htm");
  329. options[2]=new Option("Persuasion through enlightenment 3","../1stCommunicationSkil/000107.htm");
  330. options[3]=new Option("Secret Art of Listening","../1stCommunicationSkil/000229.htm");
  331. options[4]=new Option("Persuasion through enlightenment 1","../1stCommunicationSkil/1temp.htm");
  332. options[5]=new Option("The Process of Believing","../1stCommunicationSkil/990611.htm");
  333. options[6]=new Option("Meaning, Significance and things ...","../1stCommunicationSkil/990913.htm");
  334. options[7]=new Option("Personal Equality","../1stCommunicationSkil/990917.htm");
  335. options[8]=new Option("Redefining Motives","../1stCommunicationSkil/990929.htm");
  336. options[9]=new Option("Redefining Motives - Comments","../1stCommunicationSkil/990930comments.htm");
  337. options[10]=new Option("The Situation is Hopeless, but not important","../1stCommunicationSkil/991108.htm");
  338. options[11]=new Option("Building Rapport","../1stCommunicationSkil/991113.htm");
  339. options[12]=new Option("Using voice patterns to build rapport","../1stCommunicationSkil/991215.htm");
  340. options[13]=new Option("Persuasion through enlightenment 1","../1stCommunicationSkil/991223.htm");
  341. options[14]=new Option("About what?","../1stCommunicationSkil/About what.htm");
  342. options[15]=new Option("Comments on reframing","../1stCommunicationSkil/An example of consequent reframes.htm");
  343. options[16]=new Option("Body Rapport","../1stCommunicationSkil/bodyRapport.htm");
  344. options[17]=new Option("Conversational Hypnosis","../1stCommunicationSkil/Conversational Hypnosis.htm");
  345. options[18]=new Option("Embedded Commands","../1stCommunicationSkil/EmbeddedCommands.htm");
  346. options[19]=new Option("Everybody's Doing it!","../1stCommunicationSkil/Everbody'sDoingIt.htm");
  347. options[20]=new Option("Folks Usually do it","../1stCommunicationSkil/Folks usually do it, you know!.htm");
  348. options[21]=new Option("Folks Usually do it Comments","../1stCommunicationSkil/Folks usually do it, you know!Comments.htm");
  349. options[22]=new Option("Forbidden Fruit","../1stCommunicationSkil/Forbidden Fruit.htm");
  350. options[23]=new Option("How exactly did he hurt you?","../1stCommunicationSkil/How exactly did he hurt you.htm");
  351. options[24]=new Option("How to X","../1stCommunicationSkil/HowToX.htm");
  352. options[25]=new Option("Postings to 1stCommunicationSkil","../1stCommunicationSkil/index.html");
  353. options[26]=new Option("Is someone reading your mind?","../1stCommunicationSkil/Mind Reading.htm");
  354. options[27]=new Option("Pacing Belief","../1stCommunicationSkil/pacing.htm");
  355. options[28]=new Option("Everything has a positive intention","../1stCommunicationSkil/PositiveIntentions.htm");
  356. options[29]=new Option("Postings to 1stCommunicationSkil","../1stCommunicationSkil/Postings.htm");
  357. options[30]=new Option("How to persuade","../1stCommunicationSkil/Process of Believing.htm");
  358. options[31]=new Option("Discovering Value","../1stCommunicationSkil/Quantity.htm");
  359. options[32]=new Option("To be or not to be?","../1stCommunicationSkil/ToBe.htm");
  360. options[33]=new Option("What does it mean? Redefining meaning.","../1stCommunicationSkil/whatDoesItMean.htm");
  361. options[34]=new Option("Which doctors, specifically?","../1stCommunicationSkil/Which doctors, specifically.htm");
  362. options[35]=new Option("Why the Being Specific Model is So Powerful","../1stCommunicationSkil/WhyItIsSoPowerful.htm");
  363. options[36]=new Option("How does your saying that make it a fact?","../1stCommunicationSkil/Words that Act.htm");
  364. options[0].selected=true
  365.  }
  366. //Netscape likes a refresh, but Microsoft doesn't
  367. /*if (navigator.appName.indexOf("Netscape")>-1)
  368. history.go(0)*/
  369. }
  370. function MySubject3a(aMenu){
  371. nullOptions(aMenu)
  372.  with (aMenu){
  373.  //Rewrites the text and values
  374. options[0]=new Option("Select a page","none");
  375. options[1]=new Option("Dealing with emotion calm your eyes.","../FeelingGood/CalmEyes.html");
  376. options[2]=new Option("How to feel good.","../FeelingGood/FeelingGood.html");
  377. options[3]=new Option("How to feel good.","../FeelingGood/index.html");
  378. options[4]=new Option("Laughing at it all in the future now!","../FeelingGood/larfindx.html");
  379. options[5]=new Option("The rules of successful living","../FeelingGood/Rules.html");
  380. options[6]=new Option("Six Step Reframing","../FeelingGood/SixStepReframing.html");
  381. options[7]=new Option("The soap opera - feeling good","../FeelingGood/SoapOpera.html");
  382. options[0].selected=true
  383.  }
  384. /*//Netscape likes a refresh, but Microsoft doesn't
  385. if (navigator.appName.indexOf("Netscape")>-1)
  386. history.go(0)*/
  387. }
  388. function MySubject5a(aMenu){
  389. nullOptions(aMenu)
  390.  with (aMenu){
  391.  //Rewrites the text and values
  392. options[0]=new Option("Select a page","none");
  393. options[1]=new Option("Voyage from Flatland","../Flatland/voyage_from_flatland.htm");
  394. options[0].selected=true
  395.  }
  396. //Netscape likes a refresh, but Microsoft doesn't
  397.  /* if (navigator.appName.indexOf("Netscape")>-1)
  398. history.go(0) */
  399. }
  400. function MySubject6a(aMenu){
  401. nullOptions(aMenu)
  402.  with (aMenu){
  403.  //Rewrites the text and values
  404. options[0]=new Option("Select a page","none");
  405. options[1]=new Option("General Semantics","../GeneralSemantics/index.html");
  406. options[2]=new Option("E Prime - English without the verb to be","../GeneralSemantics/KensEPrime.htm");
  407. options[0].selected=true
  408.  }
  409.  
  410. /* //Netscape likes a refresh, but Microsoft doesn't
  411. if (navigator.appName.indexOf("Netscape")>-1)
  412. history.go(0) */
  413. }
  414. function MySubject7a(aMenu){
  415. nullOptions(aMenu)
  416.  with (aMenu){
  417.  //Rewrites the text and values
  418. options[0]=new Option("Select a page","none");
  419. options[1]=new Option("Courses: develop mind and spirit","http://www.trans4mind.com/new_life_course/index.html");
  420. options[2]=new Option("Solve your problems, feel good, and master communication?","http://www.trans4mind.com/new_life_course/index.html");
  421. options[3]=new Option("Present Timing","http://www.trans4mind.com/new_life_course/index.html");
  422. options[0].selected=true
  423. }
  424. /* //Netscape likes a refresh, but Microsoft doesn't
  425. if (navigator.appName.indexOf("Netscape")>-1)
  426. history.go(0) */
  427. }
  428. function MySubject8a(aMenu){
  429. nullOptions(aMenu)
  430.  with (aMenu){
  431.  //Rewrites the text and values
  432. options[0]=new Option("Select a page","none");
  433. options[1]=new Option("Do we have extrasensory knowledge?","../Philos/apriori.htm");
  434. options[2]=new Option("Basic Phil Template","../Philos/BasicPhil.htm");
  435. options[3]=new Option("Aristotle's Categories","../Philos/catAristotle.htm");
  436. options[4]=new Option("Categories","../Philos/categories.htm");
  437. options[5]=new Option("Indian Categories","../Philos/catIndian.htm");
  438. options[6]=new Option("Knowledge","../Philos/HowCanWeKnow.htm");
  439. options[7]=new Option("Home Page","../Philos/Idealism.htm");
  440. options[8]=new Option("That's Impossible!","../Philos/impossible.htm");
  441. options[9]=new Option("It's against my principles!","../Philos/ImpossPrinciple.htm");
  442. options[10]=new Option("Philosophy","../Philos/index.html");
  443. options[11]=new Option("Philosophy","../Philos/indexPhilos.html");
  444. options[12]=new Option("Home Page","../Philos/indexReality.html");
  445. options[13]=new Option("Materialism","../Philos/Materialism.htm");
  446. options[14]=new Option("Mind and Matter","../Philos/MindMatter.htm");
  447. options[15]=new Option("What's in a name?","../Philos/nominalism.htm");
  448. options[16]=new Option("Why is my world the way it is?","../Philos/QuestionsAboutIdealism.htm");
  449. options[17]=new Option("Subjective and Objective","../Philos/subjective.htm");
  450. options[18]=new Option("What is true?","../Philos/True.htm");
  451. options[19]=new Option("What is Knowledge?","../Philos/WhatIsKnowledge.htm");
  452. options[0].selected=true
  453. }
  454.  /* //Netscape likes a refresh, but Microsoft doesn't
  455. if (navigator.appName.indexOf("Netscape")>-1)
  456. history.go(0) */
  457. }
  458. function MySubject9a(aMenu){
  459. nullOptions(aMenu)
  460.  with (aMenu){
  461.  //Rewrites the text and values
  462. options[0]=new Option("Select a page","none");
  463. options[1]=new Option("Sales Index","../sales/IndxSell.html");
  464. options[0].selected=true
  465.  }
  466.  /* //Netscape likes a refresh, but Microsoft doesn't
  467. if (navigator.appName.indexOf("Netscape")>-1)
  468. history.go(0) */
  469. }
  470. function MySubject10a(aMenu){
  471. nullOptions(aMenu)
  472.  with (aMenu){
  473.  //Rewrites the text and values
  474. options[0]=new Option("Select a page","none");
  475. options[1]=new Option("After Death States - what happens?","../Spiritual/afterDeathStates.htm");
  476. options[2]=new Option("Chakras","../Spiritual/chakras.htm");
  477. options[3]=new Option("Extra sensory phenomenon","../Spiritual/extra-sensory-perception.htm");
  478. options[4]=new Option("Free your mind and free your life","../Spiritual/FreeYourMind.htm");
  479. options[5]=new Option("Spiritual - contents page","../Spiritual/index.html");
  480. options[6]=new Option("What is Kama?","../Spiritual/karma.htm");
  481. options[7]=new Option("Life is a video game","../Spiritual/life_is_a_video_game.htm");
  482. options[8]=new Option("Meditation to contact spirits","../Spiritual/meditation_to_contact_spirits.htm");
  483. options[9]=new Option("Out-of-the-body experiences (OOBEs)","../Spiritual/obe.htm");
  484. options[10]=new Option("What is spiritual?","../Spiritual/spiritual.htm");
  485. options[11]=new Option("template","../Spiritual/template.htm");
  486. options[12]=new Option("Types of Spiritual Experience","../Spiritual/Types Of Spiritual Experience.htm");
  487. options[13]=new Option("What happens when we die","../Spiritual/When_we_die.htm");
  488. options[0].selected=true
  489.  }
  490.  /* //Netscape likes a refresh, but Microsoft doesn't
  491. if (navigator.appName.indexOf("Netscape")>-1)
  492. history.go(0) */
  493. }
  494. function MySubject11a(aMenu){
  495. nullOptions(aMenu)
  496.  with (aMenu){
  497.  //Rewrites the text and values
  498. options[0]=new Option("Select a page","none");
  499. options[1]=new Option("The refusal to accept Barker the Bone","../Theory/Barker.htm");
  500. options[2]=new Option("Darwin's Despondency","../Theory/darwin.htm");
  501. options[3]=new Option("Effectiveness","../Theory/Effectiveness.htm");
  502. options[4]=new Option("Excommunication in Science","../Theory/excommunication.htm");
  503. options[5]=new Option("Grants are stopped","../Theory/grants_are_stopped.htm");
  504. options[6]=new Option("Homeopathy","../Theory/homeopathy.htm");
  505. options[7]=new Option("Theory of Personal Development","../Theory/index.html");
  506. options[8]=new Option("Theory of Personal Development","../Theory/indexTheory.html");
  507. options[9]=new Option("Wellbeing, Ability and Effectiveness","../Theory/Interrelationships.htm");
  508. options[10]=new Option("Locke","../Theory/lockePractical.htm");
  509. options[11]=new Option("What does Locke Mean by Reason","../Theory/LockeReason.htm");
  510. options[12]=new Option("Modern Man","../Theory/modernMan'sReligion.htm");
  511. options[13]=new Option("Morals","../Theory/morals.htm");
  512. options[14]=new Option("Nazrudin's Lost Key","../Theory/Nazrudin.htm");
  513. options[15]=new Option("Personal Development","../Theory/PersonalDevelopment.htm");
  514. options[16]=new Option("Irrational Science?","../Theory/ScienceAndReligion.htm");
  515. options[17]=new Option("Introduction to PD articles","../Theory/TheoryIntro.htm");
  516. options[18]=new Option("The three parts","../Theory/TheThreeParts.htm");
  517. options[19]=new Option("Understanding","../Theory/Understanding.htm");
  518. options[20]=new Option("Personal Wellbeing","../Theory/WellBeing.htm");
  519. options[0].selected=true
  520.  }
  521.  /* //Netscape likes a refresh, but Microsoft doesn't
  522. if (navigator.appName.indexOf("Netscape")>-1)
  523. history.go(0) */
  524. }
  525. function MySubject12a(aMenu){
  526. nullOptions(aMenu)
  527.  with (aMenu){
  528.  //Rewrites the text and values
  529. options[0]=new Option("Select a page","none");
  530. options[1]=new Option("Anchoring thoughts emotions and states","../Vignettes/Anchoring.htm");
  531. options[2]=new Option("The Magical Authority Voice","../Vignettes/AuthorityVoice.htm");
  532. options[3]=new Option("Can I Really be Lucky?","../Vignettes/BeingLucky.htm");
  533. options[4]=new Option("How to talk so people listen","../Vignettes/Beneficial.htm");
  534. options[5]=new Option("Breath and Develop Power","../Vignettes/Breath.htm");
  535. options[6]=new Option("How to be calm and stress free","../Vignettes/calmConditions.htm");
  536. options[7]=new Option("Tips on beating stress and feeling good","../Vignettes/Contents.htm");
  537. options[8]=new Option("Find their magic words of influence","../Vignettes/criteria.htm");
  538. options[9]=new Option("How to deal with criticism","../Vignettes/Criticism1.htm");
  539. options[10]=new Option("You must become a Cybernaut","../Vignettes/Cybernaut.htm");
  540. options[11]=new Option("How to know if a technique has worked.","../Vignettes/EndPoints.htm");
  541. options[12]=new Option("How to Set Your Goals -","../Vignettes/Goals1.htm");
  542. options[13]=new Option("How to attain your goals","../Vignettes/Goals2.htm");
  543. options[14]=new Option("Motivate yourself within 24 seconds!","../Vignettes/Goals3.htm");
  544. options[15]=new Option("Influence Unknowingly","../Vignettes/HiddenEmphasis.htm");
  545. options[16]=new Option("30 + techniques - contents","../Vignettes/index.html");
  546. options[17]=new Option("Instant replay to win every time!","../Vignettes/InstantReplay.htm");
  547. options[18]=new Option("Learn new ideas to make a difference","../Vignettes/Learning.htm");
  548. options[19]=new Option("The secret of the magic touch","../Vignettes/MagicTouch.htm");
  549. options[20]=new Option("Have the Universe in Your Hand!","../Vignettes/MasterOfUniverse.htm");
  550. options[21]=new Option("Metaphors that wreck lives!","../Vignettes/Metaphors.htm");
  551. options[22]=new Option("Getting into Rapport Quickly","../Vignettes/Mirroring1.htm");
  552. options[23]=new Option("Open and Closed Questions","../Vignettes/OpenAndClosed.htm");
  553. options[24]=new Option("How to get 100% agreement","../Vignettes/pacing.htm");
  554. options[25]=new Option("100% Agreement Every Time","../Vignettes/PacingStatement.htm");
  555. options[26]=new Option("Personal Development - achieving what?","../Vignettes/PersonalDevelopment.htm");
  556. options[27]=new Option("Solve your concerns","../Vignettes/PictureFrame.htm");
  557. options[28]=new Option("The Picture Swop Way to feel Good","../Vignettes/PictureSwop.htm");
  558. options[29]=new Option("Bored? Not me! Never!","../Vignettes/PresentTime.htm");
  559. options[30]=new Option("Pretending your way to Mastery","../Vignettes/pretending.htm");
  560. options[31]=new Option("How to gain mastery of a new skill","../Vignettes/Repetition.htm");
  561. options[32]=new Option("rightbar","../Vignettes/rightbar.htm");
  562. options[33]=new Option("Find the other's secret place","../Vignettes/SecretPlace.htm");
  563. options[34]=new Option("Seven More Powerful Motivators","../Vignettes/SevenMoreMotivators.htm");
  564. options[35]=new Option("Seven Powerful Motivators","../Vignettes/SevenPowerfulMotivators.htm");
  565. options[36]=new Option("Smile With Your Eyes!","../Vignettes/SmilingEyes.htm");
  566. options[37]=new Option("Drawing straight lines with your mind","../Vignettes/StraightLine.htm");
  567. options[38]=new Option("Suggestions that instantly change.","../Vignettes/suggestion.htm");
  568. options[39]=new Option("Multiply your power with critical mass!","../Vignettes/synergy.htm");
  569. options[40]=new Option("Solve Your Problems Now","../Vignettes/ThinkingAboutFuture.htm");
  570. options[41]=new Option("Eliminate anxiety","../Vignettes/TimeMachine1.htm");
  571. options[42]=new Option("Eliminate Regret","../Vignettes/TimeMachine2.htm");
  572. options[43]=new Option("Something you should Know about ability","../Vignettes/UnconsciousAbility.htm");
  573. options[44]=new Option("Using what you have to get what you want!","../Vignettes/Utilisation.htm");
  574. options[45]=new Option("Who am I","../Vignettes/WhoAmI.htm");
  575. options[0].selected=true
  576.  }
  577.  /* //Netscape likes a refresh, but Microsoft doesn't
  578. if (navigator.appName.indexOf("Netscape")>-1)
  579. history.go(0) */
  580. }
  581.  function MySubject13a(aMenu){
  582. nullOptions(aMenu)
  583.  with (aMenu){
  584.  //Rewrites the text and values
  585. options[0]=new Option("Select a page","none");
  586. options[1]=new Option("Awareness of awareness","../kabbalah/awarenessofAwareness.htm");
  587. options[2]=new Option("Psychological aspects of awreness","../kabbalah/awarenessPsych.htm");
  588. options[3]=new Option("Creation and Destruction","../kabbalah/creationAndDestruction.htm");
  589. options[4]=new Option("Form and Energy-Matter","../kabbalah/formAndenergy.htm");
  590. options[5]=new Option("Kabbala Contents","../kabbalah/index.html");
  591. options[6]=new Option("Lightning Flash","../kabbalah/intro.htm");
  592. options[7]=new Option("The Kabbala","../kabbalah/kabbala.htm");
  593. options[8]=new Option("How to remember the quabbalah","../kabbalah/kabbalahRemember.htm");
  594. options[9]=new Option("Lightning Flash","../kabbalah/lightning.htm");
  595. options[10]=new Option("Three Pillars","../kabbalah/threePillars.htm");
  596. options[0].selected=true
  597.  }
  598.  
  599. /* //Netscape likes a refresh, but Microsoft doesn't
  600. if (navigator.appName.indexOf("Netscape")>-1)
  601. history.go(0) */
  602. }
  603.  /* ####################### lists of files for option 3 computer software
  604. ####################### */
  605. function MySubject1b(aMenu){
  606. nullOptions(aMenu)
  607.  with (aMenu){
  608.  //Rewrites the text and values
  609. options[0]=new Option("Select a page","none");
  610. options[1]=new Option("Alerts Wizard","../jsEditorTutorial/alertWiz.htm");
  611. options[2]=new Option("jsEditor - Alerts wizard","../jsEditorTutorial/alertwizpopup.htm");
  612. options[3]=new Option("jsEditor - cookie message wizard","../jsEditorTutorial/cookiemessagewizard.htm");
  613. options[4]=new Option("jsEditor - dummy link wizard","../jsEditorTutorial/dummylinkwizardpopup.htm");
  614. options[5]=new Option("Frequently asked questions","../jsEditorTutorial/faq.htm");
  615. options[6]=new Option("Find Titles Keywords and Descriptions","../jsEditorTutorial/findTitle.htm");
  616. options[7]=new Option("Doing frames - an example of using the Editor","../jsEditorTutorial/framesExample.htm");
  617. options[8]=new Option("A more complex frame","../jsEditorTutorial/framesExampleComplex.htm");
  618. options[9]=new Option("A simple frame","../jsEditorTutorial/frameSimpleExample.htm");
  619. options[10]=new Option("jsEditor - function wizard","../jsEditorTutorial/functionpopup.htm");
  620. options[11]=new Option("HTML Menu of the Editor","../jsEditorTutorial/HTML.htm");
  621. options[12]=new Option("JavaScript Editor full of features and utilities","../jsEditorTutorial/index.html");
  622. options[13]=new Option("JavaScript Menu","../jsEditorTutorial/javascript.htm");
  623. options[14]=new Option("jsEditor Knowledge Base","../jsEditorTutorial/jseditor_knowledge_base.htm");
  624. options[15]=new Option("jsEditorPreview2","../jsEditorTutorial/jsEditorPreview2.htm");
  625. options[16]=new Option("jsEditor Questionnaire","../jsEditorTutorial/jsEditorQuestionnaire.htm");
  626. options[17]=new Option("jsEditor - Screen Shot","../jsEditorTutorial/jseditorSC.htm");
  627. options[18]=new Option("Welcome to the JavaScript Editor","../jsEditorTutorial/jshelp.htm");
  628. options[19]=new Option("Preview Mode","../jsEditorTutorial/preview.htm");
  629. options[20]=new Option("Search Generator","../jsEditorTutorial/searchGenerator.htm");
  630. options[21]=new Option("Register jsEditor","../jsEditorTutorial/sell.htm");
  631. options[22]=new Option("The side bar","../jsEditorTutorial/sideMenu.htm");
  632. options[23]=new Option("jsEditor - table wizard","../jsEditorTutorial/tablepopupwiz.htm");
  633. options[24]=new Option("Ken Ward's jsEditor Tutorial - top Menu","../jsEditorTutorial/topmenu.htm");
  634. options[25]=new Option("Why the jsEditor","../jsEditorTutorial/why.htm");
  635. options[26]=new Option("jsEditor - New Windows wizard","../jsEditorTutorial/winwizpopup.htm");
  636. options[27]=new Option("Writing with the jsEditor","../jsEditorTutorial/writingScript.htm");
  637. options[0].selected=true
  638.  }
  639.  /* //Netscape likes a refresh, but Microsoft doesn't
  640. if (navigator.appName.indexOf("Netscape")>-1)
  641. history.go(0) */
  642. }
  643. function MySubject2b(aMenu){
  644. nullOptions(aMenu)
  645.  with (aMenu){
  646.  //Rewrites the text and values
  647. options[0]=new Option("Select a page","none");
  648. options[1]=new Option("Add a text link","../jsNewWindows/addLink.htm");
  649. options[2]=new Option("Register jsNewWindows online and download it immediately","../jsNewWindows/buy.htm");
  650. options[3]=new Option("jsNewWindows Demo","../jsNewWindows/demonew.htm");
  651. options[4]=new Option("Welcome to the New Window Wizard","../jsNewWindows/index.html");
  652. options[5]=new Option("Code screen in editor","../jsNewWindows/newcode.htm");
  653. options[6]=new Option("Screen Shot of Editor on Load","../jsNewWindows/newopen.htm");
  654. options[7]=new Option("Preview of the code","../jsNewWindows/newpreview.htm");
  655. options[8]=new Option("Welcome screen of the new windows wizard","../jsNewWindows/welcomenew.htm");
  656. options[0].selected=true
  657.  }
  658.  /* //Netscape likes a refresh, but Microsoft doesn't
  659. if (navigator.appName.indexOf("Netscape")>-1)
  660. history.go(0) */
  661. }
  662. function MySubject3b(aMenu){
  663. nullOptions(aMenu)
  664.  with (aMenu){
  665.  //Rewrites the text and values
  666. options[0]=new Option("Select a page","none");
  667. options[1]=new Option("Accesssing and applying the data","../search-engine-positioning/accessing.htm");
  668. options[2]=new Option("Analysis","../search-engine-positioning/analysis.htm");
  669. options[3]=new Option("Analysis of an anomaly","../search-engine-positioning/anomaly197.htm");
  670. options[4]=new Option("Find Special: search engine software","../search-engine-positioning/findSpecial.htm");
  671. options[5]=new Option("Screen Shot of Find Special","../search-engine-positioning/FindSpecialScreenShot.htm");
  672. options[6]=new Option("The most important parts of the page for search engine positioning","../search-engine-positioning/important-parts-search-engine-positioning.htm");
  673. options[7]=new Option("Search engine positioning/ ranking - optimise your pages with Find Special","../search-engine-positioning/index.html");
  674. options[8]=new Option("Keyword Density and Search Engine Positioning","../search-engine-positioning/keywordDensity.htm");
  675. options[9]=new Option("More Data","../search-engine-positioning/moreData.htm");
  676. options[10]=new Option("The numbers game","../search-engine-positioning/numbers.htm");
  677. options[11]=new Option("screenshot","../search-engine-positioning/screenshot.htm");
  678. options[12]=new Option("Register Find Special","../search-engine-positioning/sell.htm");
  679. options[13]=new Option("Spreadsheet","../search-engine-positioning/tableAltaVista.htm");
  680. options[0].selected=true
  681.  }
  682.  /* //Netscape likes a refresh, but Microsoft doesn't
  683. if (navigator.appName.indexOf("Netscape")>-1)
  684. history.go(0) */
  685. }
  686.  function MySubject4b(aMenu){
  687. nullOptions(aMenu)
  688.  with (aMenu){
  689.  //Rewrites the text and values
  690. options[0]=new Option("Select a page","none");
  691. options[1]=new Option("How to create a TOC (or menu) with 1 click!","TOC/index.html");
  692. options[2]=new Option("My Drop-Down Menu","../TOC/1menu.htm");
  693. options[3]=new Option("3 step wizard -tcjm","../TOC/3stepWizard.htm");
  694. options[4]=new Option("Contents of the TCJM Tutorial","../TOC/contents.htm");
  695. options[5]=new Option("Open Directory Page for TCJM Screen Shot","../TOC/directory.htm");
  696. options[6]=new Option("Create a JavaScript Drop-Down Menu","../TOC/drop-down-menu1.htm");
  697. options[7]=new Option("Organising your files with the TCJM","../TOC/drop-down-menu2.htm");
  698. options[8]=new Option("The bottom editor in the TCJM","../TOC/drop-down-menu3.htm");
  699. options[9]=new Option("Creating the javascript menu with the TCJM","../TOC/drop-down-menu4.htm");
  700. options[10]=new Option("Saving Your Project in the TCJM","../TOC/drop-down-menu5.htm");
  701. options[11]=new Option("Screen Shot of Editor - TCJM","../TOC/editor.htm");
  702. options[12]=new Option("TCJM Tutorial - Home Page","../TOC/index.html");
  703. options[13]=new Option("How to use your menu in a different directory","../TOC/MenuToOtherDirectory.htm");
  704. options[14]=new Option("Purchase TCJM","../TOC/tcjmSell.htm");
  705. options[15]=new Option("Screen Shot of the TCJM","../TOC/TOC.htm");
  706. options[16]=new Option("Making a TOC for downloaded pages","../TOC/usingTCJM1.htm");
  707. options[0].selected=true
  708.  }
  709.  /* //Netscape likes a refresh, but Microsoft doesn't
  710. if (navigator.appName.indexOf("Netscape")>-1)
  711. history.go(0) */
  712. }
  713. function MySubject5b(aMenu){
  714. nullOptions(aMenu)
  715.  with (aMenu){
  716.  //Rewrites the text and values
  717. options[0]=new Option("Select a page","none");
  718. options[1]=new Option("------------------------------------","none");
  719. options[2]=new Option("Credits","top10/credits.htm");
  720. options[3]=new Option("Top 10 Plus - the easiest way to JavaScript enable your web site.","../top10/index.html");
  721. options[4]=new Option("Register jTop 10 Plus","top10/sell.htm");
  722. options[5]=new Option("Top 10 Plus - the easiest way to JavaScript enable your web site.","../top10/top10help.htm");
  723. options[0].selected=true
  724.  }
  725.  
  726. /* //Netscape likes a refresh, but Microsoft doesn't
  727. if (navigator.appName.indexOf("Netscape")>-1)
  728. history.go(0) */
  729. }
  730. function MySubject6b(aMenu){
  731. nullOptions(aMenu)
  732.  with (aMenu){
  733.  //Rewrites the text and values
  734. options[0]=new Option("Select a page","none");
  735. options[1]=new Option("Double drop down menu - add files 1","../DoubleMenu/Files1.htm");
  736. options[2]=new Option("Double drop down menu - add files 2","../DoubleMenu/Files2.htm");
  737. options[3]=new Option("Double drop down menu - first screen","../DoubleMenu/firstScreen.htm");
  738. options[4]=new Option("Double Drop Down Menu Builder","../products.htm");
  739. options[5]=new Option("Double drop down menu code","../DoubleMenu/newMenu.htm");
  740. options[6]=new Option("Double drop down menu example.","../DoubleMenu/newMenu2.htm");
  741. options[7]=new Option("Register Double Menu Builder","../DoubleMenu/sell.htm");
  742. options[8]=new Option("Add Subjects for the new menu","../DoubleMenu/Subjects.htm");
  743. options[9]=new Option("Double Drop Down Menu Tutorial","../DoubleMenu/tutorial.htm");
  744. options[0].selected=true
  745.  }
  746.  /* //Netscape likes a refresh, but Microsoft doesn't
  747. if (navigator.appName.indexOf("Netscape")>-1)
  748. history.go(0) */
  749. }
  750.  /* ####################### myTopics ####################### */
  751. function MyTopics1(aMenu){
  752.  nullOptions(aMenu);
  753. with (aMenu){
  754.  //Rewrites the text and values
  755. options[0]=new Option("Select a page","none");
  756. options[1]=new Option("JavaScript","");
  757. options[2]=new Option("HTML","");
  758. options[3]=new Option("CSS","");
  759. options[0].selected=true
  760. }
  761.  /* //Netscape likes a refresh, but Microsoft doesn't
  762. if (navigator.appName.indexOf("Netscape")>-1)
  763. history.go(0) */
  764. }
  765. function MyTopics2(aMenu){
  766.  nullOptions(aMenu);
  767. with (aMenu){
  768.  //Rewrites the text and values
  769. options[0]=new Option("Select a page","none");
  770. options[1]=new Option("Self Development","");
  771. options[2]=new Option("Communication","");
  772. options[3]=new Option("Creative Memory","");
  773. options[4]=new Option("Feeling Good","");
  774. options[5]=new Option("Flatland","");
  775. options[6]=new Option("General Semantics","");
  776. options[7]=new Option("New Life Course","");
  777. options[8]=new Option("Philosophy","");
  778. options[9]=new Option("Sales","");
  779. options[10]=new Option("Spiritual","");
  780. options[11]=new Option("Kabbala","");
  781. options[12]=new Option("Theory of PD","");
  782. options[13]=new Option("30 Plus Techniques","");
  783.  options[0].selected=true
  784.  }
  785.  /* //Netscape likes a refresh, but Microsoft doesn't
  786. if (navigator.appName.indexOf("Netscape")>-1)
  787. history.go(0) */
  788. }
  789. function MyTopics3(aMenu){
  790. //Software
  791. nullOptions(aMenu);
  792. with (aMenu){
  793.  //Rewrites the text and values
  794. options[0]=new Option("Select a page","none");
  795. options[1]=new Option("JavaScript Editor","");
  796. options[2]=new Option("New Windows","");
  797. options[3]=new Option("Search Engine Positioning","");
  798. options[4]=new Option("JavaScript TOC and Menus Builder","");
  799. options[5]=new Option("Top 10 - Easy JavaScript","");
  800. options[6]=new Option("Double Drop Down Menu Builder","");
  801. options[0].selected=true
  802. }
  803.  /* //Netscape likes a refresh, but Microsoft doesn't
  804. if (navigator.appName.indexOf("Netscape")>-1)
  805. history.go(0) */
  806. }
  807.  /* ####################### go() ####################### */
  808.  function go(aMenu){
  809. if (aMenu.options.value!="none")
  810. {
  811. location=aMenu.options[aMenu.selectedIndex].value
  812. else
  813. aMenu.options[0].selected=true;
  814.  }
  815.  /* ####################### setUp ####################### */
  816.  function setUp(){
  817. if (navigator.appName.indexOf("Microsoft")>-1)
  818. {
  819. document.formDoubleMenu.menuTopics.options[0].selected=true;
  820. document.formDoubleMenu.menuSubjects.options[0].selected=true;
  821. document.formDoubleMenu.menuFiles.options[0].selected=true;
  822.  }
  823. }
  824.  /* ####################### end of setup ####################### */
  825.  /* ####################### change Subjects ####################### */
  826. function changeSubjects(){
  827. aMenu=document.formDoubleMenu.menuSubjects
  828. aMenu2=document.formDoubleMenu.menuFiles
  829. aMenu3=document.formDoubleMenu.menuTopics
  830. with (aMenu3){
  831.  switch (selectedIndex) {
  832. case 0:
  833. nullOptions(aMenu)
  834. nullOptions(aMenu2)
  835. aMenu.options[0]=
  836. new Option("Pages appear here","none")
  837. aMenu.options[0].selected=true;
  838. history.go(0)
  839. break 
  840. case 1: 
  841. //computer stuff
  842. nullOptions(aMenu)
  843. nullOptions(aMenu2)
  844. aMenu2.options[0]=
  845. new Option("Pages appear here","none")
  846. aMenu2.options[0].selected=true;
  847. MyTopics1(aMenu) 
  848. break 
  849. case 2: 
  850. //self development
  851. nullOptions(aMenu)
  852. nullOptions(aMenu2)
  853. aMenu2.options[0]=
  854. new Option("Pages appear here","none")
  855. aMenu2.options[0].selected=true;
  856. MyTopics2(aMenu) 
  857. break 
  858. case 3: 
  859. //computer software
  860. nullOptions(aMenu)
  861. nullOptions(aMenu2)
  862. aMenu2.options[0]=
  863. new Option("Pages appear here","none")
  864. aMenu2.options[0].selected=true;
  865. MyTopics3(aMenu) 
  866. break; 
  867. }
  868. }
  869.  }
  870. /* ####################### end of change Subjects ####################### */
  871.  /* ####################### changeFiles ####################### */
  872.  function changeFiles(){
  873. aMenu=document.formDoubleMenu.menuSubjects
  874. aMenu2=document.formDoubleMenu.menuFiles
  875. aMenu3=document.formDoubleMenu.menuTopics;
  876.  
  877. /* ####################### set of files for option 1 (JavaScript) ####################### */
  878.  if (aMenu3.selectedIndex==1)
  879. {
  880. with (aMenu){
  881.  switch (selectedIndex) {
  882. case 0:
  883. aMenu2.options.length=0;
  884. aMenu2.options[0]=
  885. new Option("Pages appear here","none")
  886. aMenu2.options[0].selected=true;
  887. history.go(0)
  888. break 
  889. //Description 
  890. case 1: 
  891. MySubject1(aMenu2) 
  892. //JavaScript
  893. break 
  894. case 2: 
  895. MySubject2(aMenu2) 
  896. //HTML
  897. break 
  898. case 3: 
  899. MySubject3(aMenu2) 
  900. //CSS
  901. break; 
  902. case 4:
  903. MySubject4(aMenu2) 
  904. //Search engine positioning
  905. break 
  906. }
  907. }
  908. }
  909.  
  910. /* ####################### set of files for option 2 Self Development ####################### */
  911. if (aMenu3.selectedIndex==2)
  912. {
  913. with (aMenu){
  914.  switch (selectedIndex) {
  915. case 0:
  916. aMenu2.options.length=0;
  917. aMenu2.options[0]=
  918. new Option("Pages appear here","none")
  919. aMenu2.options[0].selected=true;
  920. history.go(0)
  921. break 
  922. case 1: 
  923. MySubject1a(aMenu2) 
  924. break 
  925. case 2: 
  926. MySubject2a(aMenu2) 
  927. break 
  928. case 3: 
  929. MySubject3a(aMenu2) 
  930. break; 
  931. case 4:
  932. MySubject4a(aMenu2) 
  933. break 
  934. case 5:
  935. MySubject5a(aMenu2) 
  936. break 
  937. case 6:
  938. MySubject6a(aMenu2) 
  939. break 
  940. case 7:
  941. MySubject7a(aMenu2) 
  942. break 
  943. case 8:
  944. MySubject8a(aMenu2) 
  945. break 
  946. case 9:
  947. MySubject9a(aMenu2) 
  948. break 
  949. case 10:
  950. MySubject10a(aMenu2) 
  951. break 
  952. case 11:
  953. MySubject13a(aMenu2) 
  954. break 
  955. case 12:
  956. MySubject11a(aMenu2) 
  957. break 
  958. case 13:
  959. MySubject12a(aMenu2) 
  960. break 
  961. }
  962. }
  963. }
  964.  /* ####################### third set of files for option 3 ####################### */
  965.  if (aMenu3.selectedIndex==3)
  966. {
  967. with (aMenu){
  968.  switch (selectedIndex) {
  969. case 0:
  970. aMenu2.options.length=0;
  971. aMenu2.options[0]=
  972. new Option("Pages appear here","none")
  973. aMenu2.options[0].selected=true;
  974. history.go(0)
  975. break 
  976. case 1: 
  977. MySubject1b(aMenu2) 
  978. break 
  979. case 2: 
  980. MySubject2b(aMenu2) 
  981. break 
  982. case 3: 
  983. MySubject3b(aMenu2) 
  984. break; 
  985. case 4:
  986. MySubject4b(aMenu2) 
  987. break 
  988. case 5:
  989. MySubject5b(aMenu2) 
  990. break 
  991. case 6:
  992. MySubject6b(aMenu2) 
  993. break 
  994. }
  995. }
  996. }
  997. }
  998.  /* ####################### end of doublemenu code ####################### */
  999.  
For each Subject, Topic, File coding in the above, I would need to change it to Day, Month, Year accordingly... I know that much, but changing the options and object name for each wouldn't be enough would it?
I apologize for adding this many lines of coding... but I'm kinda lost on what to do... Only thing I've gone on my end of this code was to change the menu(subject, topic, file) portions of it

With your vast knowledge of JS, I greatly appreciate your help.
Sep 15 '08 #8
acoder
16,027 Expert Mod 8TB
I'm afraid that code will be useless for your current requirements. The code (quite inefficient if you ask me) creates a dependent/cascading drop down which is not what you want. Keep what you had earlier and try adding what I posted above. If you get stuck, post what you tried so we can see where you might've gone wrong.
Sep 15 '08 #9
risk32
98
I took your advice and went back to the original.. I know in the JS portion of the end I'm stuck on creating a href link. Not sure what to put for myFunction(). Thats the only thing that isn't working for me, the form is good with everything there. Maybe using <select id=""> isn't working. If only I had taken classes with JS.... ugh...

Anyways, here's my code:
Expand|Select|Wrap|Line Numbers
  1. <html>
  2. <form>
  3. <select id="selDay" >
  4. <option value="\\yofs13\374OG\36AS\Asgard_data\data\Duty Desk\Electronic Boards Info\Schedule Slides\2008\">01</option>
  5. <option value="\\yofs13\374OG\36AS\Asgard_data\data\Duty Desk\Electronic Boards Info\Schedule Slides\2008\">02</option>
  6. <option value="\\yofs13\374OG\36AS\Asgard_data\data\Duty Desk\Electronic Boards Info\Schedule Slides\2008\">03</option>
  7. <option value="\\yofs13\374OG\36AS\Asgard_data\data\Duty Desk\Electronic Boards Info\Schedule Slides\2008\">04</option>
  8. <option value="\\yofs13\374OG\36AS\Asgard_data\data\Duty Desk\Electronic Boards Info\Schedule Slides\2008\">05</option>
  9. <option value="\\yofs13\374OG\36AS\Asgard_data\data\Duty Desk\Electronic Boards Info\Schedule Slides\2008\">06</option>
  10. <option value="\\yofs13\374OG\36AS\Asgard_data\data\Duty Desk\Electronic Boards Info\Schedule Slides\2008\">07</option>
  11. <option value="\\yofs13\374OG\36AS\Asgard_data\data\Duty Desk\Electronic Boards Info\Schedule Slides\2008\">08</option>
  12. <option value="\\yofs13\374OG\36AS\Asgard_data\data\Duty Desk\Electronic Boards Info\Schedule Slides\2008\">09</option>
  13. <option value="\\yofs13\374OG\36AS\Asgard_data\data\Duty Desk\Electronic Boards Info\Schedule Slides\2008\">10</option>
  14. <option value="\\yofs13\374OG\36AS\Asgard_data\data\Duty Desk\Electronic Boards Info\Schedule Slides\2008\">11</option>
  15. <option value="\\yofs13\374OG\36AS\Asgard_data\data\Duty Desk\Electronic Boards Info\Schedule Slides\2008\">12</option>
  16. <option value="\\yofs13\374OG\36AS\Asgard_data\data\Duty Desk\Electronic Boards Info\Schedule Slides\2008\">13</option>
  17. <option value="\\yofs13\374OG\36AS\Asgard_data\data\Duty Desk\Electronic Boards Info\Schedule Slides\2008\">14</option>
  18. <option value="\\yofs13\374OG\36AS\Asgard_data\data\Duty Desk\Electronic Boards Info\Schedule Slides\2008\">15</option>
  19. <option value="\\yofs13\374OG\36AS\Asgard_data\data\Duty Desk\Electronic Boards Info\Schedule Slides\2008\">16</option>
  20. <option value="\\yofs13\374OG\36AS\Asgard_data\data\Duty Desk\Electronic Boards Info\Schedule Slides\2008\">17</option>
  21. <option value="\\yofs13\374OG\36AS\Asgard_data\data\Duty Desk\Electronic Boards Info\Schedule Slides\2008\">18</option>
  22. <option value="\\yofs13\374OG\36AS\Asgard_data\data\Duty Desk\Electronic Boards Info\Schedule Slides\2008\">19</option>
  23. <option value="\\yofs13\374OG\36AS\Asgard_data\data\Duty Desk\Electronic Boards Info\Schedule Slides\2008\">20</option>
  24. <option value="\\yofs13\374OG\36AS\Asgard_data\data\Duty Desk\Electronic Boards Info\Schedule Slides\2008\">21</option>
  25. <option value="\\yofs13\374OG\36AS\Asgard_data\data\Duty Desk\Electronic Boards Info\Schedule Slides\2008\">22</option>
  26. <option value="\\yofs13\374OG\36AS\Asgard_data\data\Duty Desk\Electronic Boards Info\Schedule Slides\2008\">23</option>
  27. <option value="\\yofs13\374OG\36AS\Asgard_data\data\Duty Desk\Electronic Boards Info\Schedule Slides\2008\">24</option>
  28. <option value="\\yofs13\374OG\36AS\Asgard_data\data\Duty Desk\Electronic Boards Info\Schedule Slides\2008\">25</option>
  29. <option value="\\yofs13\374OG\36AS\Asgard_data\data\Duty Desk\Electronic Boards Info\Schedule Slides\2008\">26</option>
  30. <option value="\\yofs13\374OG\36AS\Asgard_data\data\Duty Desk\Electronic Boards Info\Schedule Slides\2008\">27</option>
  31. <option value="\\yofs13\374OG\36AS\Asgard_data\data\Duty Desk\Electronic Boards Info\Schedule Slides\2008\">28</option>
  32. <option value="\\yofs13\374OG\36AS\Asgard_data\data\Duty Desk\Electronic Boards Info\Schedule Slides\2008\">29</option>
  33. <option value="\\yofs13\374OG\36AS\Asgard_data\data\Duty Desk\Electronic Boards Info\Schedule Slides\2008\">30</option>
  34. <option value="\\yofs13\374OG\36AS\Asgard_data\data\Duty Desk\Electronic Boards Info\Schedule Slides\2008\">31</option>
  35. </select>
  36.  
  37. <select id="selMonth">
  38. <option value="January">January</option>
  39. <option value="February">February</option>
  40. <option value="March">March</option>
  41. <option value="April">April</option>
  42. <option value="May">May</option>
  43. <option value="June">June</option>
  44. <option value="July">July</option>
  45. <option value="August">August</option>
  46. <option value="September">September</option>
  47. <option value="October">October</option>
  48. <option value="November">November</option>
  49. <option value="December">December</option>
  50. </select>
  51.  
  52. <select id="selYear" >
  53. <option value="2008">2008</option>
  54. </form>
  55. <script type="text/javascript">
  56. var str="";
  57. var selDay = document.getElementById("selDay");
  58. var selMonth = document.getElementById("selMonth");
  59. var selYear = document.getElementById("selYear");
  60. str = selDay + " " + selMonth + " " + selYear;
  61. function myFunction()
  62. {
  63. linkRef.href = "\\yofs13\374OG\36AS\Asgard_data\data\Duty Desk\Electronic Boards Info\Schedule Slides\2008\" + str;
  64. }
  65. </script>
  66. < a href="javascript:myFunction();">Here is the slide</a>
  67. </html>
Sep 16 '08 #10
acoder
16,027 Expert Mod 8TB
Lines 56-60 need to go inside myFunction(). You'll also need to change the selDay option values to days.
Sep 16 '08 #11
risk32
98
Lines 56-60 need to go inside myFunction(). You'll also need to change the selDay option values to days.
OK, so take out \\yofs13\374OG\36AS\Asgard_data\data\Duty Desk\Electronic Boards Info\Schedule Slides\2008\ and put in 01,02,03... gotcha. I still need to specify a basis for the root directory though.
Sep 17 '08 #12
risk32
98
Oh, nevermind.. the linkRef.href specifies that. Sorry
Sep 17 '08 #13
risk32
98
Final question... why wouldn't the href link work?
Expand|Select|Wrap|Line Numbers
  1. <html>
  2. <form>
  3. <select id="selDay" >
  4. <option value="01">01</option>
  5. <option value="02">02</option>
  6. <option value="03">03</option>
  7. <option value="04">04</option>
  8. <option value="05">05</option>
  9. <option value="06">06</option>
  10. <option value="07">07</option>
  11. <option value="08">08</option>
  12. <option value="09">09</option>
  13. <option value="10">10</option>
  14. <option value="11">11</option>
  15. <option value="12">12</option>
  16. <option value="13">13</option>
  17. <option value="14">14</option>
  18. <option value="15">15</option>
  19. <option value="16">16</option>
  20. <option value="17">17</option>
  21. <option value="18">18</option>
  22. <option value="19">19</option>
  23. <option value="20">20</option>
  24. <option value="21">21</option>
  25. <option value="22">22</option>
  26. <option value="23">23</option>
  27. <option value="24">24</option>
  28. <option value="25">25</option>
  29. <option value="26">26</option>
  30. <option value="27">27</option>
  31. <option value="28">28</option>
  32. <option value="29">29</option>
  33. <option value="30">30</option>
  34. <option value="31">31</option>
  35. </select>
  36.  
  37. <select id="selMonth">
  38. <option value="January">January</option>
  39. <option value="February">February</option>
  40. <option value="March">March</option>
  41. <option value="April">April</option>
  42. <option value="May">May</option>
  43. <option value="June">June</option>
  44. <option value="July">July</option>
  45. <option value="August">August</option>
  46. <option value="September">September</option>
  47. <option value="October">October</option>
  48. <option value="November">November</option>
  49. <option value="December">December</option>
  50. </select>
  51.  
  52. <select id="selYear" >
  53. <option value="2008">2008</option>
  54. </form>
  55. <script type="text/javascript">
  56.  
  57. function myFunction()
  58. {
  59. var str="";
  60. var selDay = document.getElementById("selDay");
  61. var selMonth = document.getElementById("selMonth");
  62. var selYear = document.getElementById("selYear");
  63. str = selDay + " " + selMonth + " " + selYear;
  64. linkRef.href = "\\yofs13\374OG\36AS\Asgard_data\data\Duty Desk\Electronic Boards Info\Schedule 
  65.  
  66. Slides\2008\" + str;
  67. }
  68. </script>
  69. < a href="javascript:myFunction();">Here is the slide</a>
  70. </html>
Sep 17 '08 #14
risk32
98
Again nevermind... I found out that I left a </select> portion of the coding out so after the last <select> it tried to put all the code into it and nothing would work.
But, I greatly appreciate your help. This little bit of coding is going to be used for a company wide project, although I'm only the one who is working on the minor portion. Your help has also taught me a little bit about JS as I had to keep troubleshooting my code to figure out what was wrong. Thank you.
Sep 17 '08 #15
risk32
98
Ahhh... not again! There's a coding error in the JS portion. I dont have anything to debug it except notepad.

Expand|Select|Wrap|Line Numbers
  1. <html>
  2.  
  3. <select id="selDay" >
  4. <option value="01">01</option>
  5. <option value="02">02</option>
  6. <option value="03">03</option>
  7. <option value="04">04</option>
  8. <option value="05">05</option>
  9. <option value="06">06</option>
  10. <option value="07">07</option>
  11. <option value="08">08</option>
  12. <option value="09">09</option>
  13. <option value="10">10</option>
  14. <option value="11">11</option>
  15. <option value="12">12</option>
  16. <option value="13">13</option>
  17. <option value="14">14</option>
  18. <option value="15">15</option>
  19. <option value="16">16</option>
  20. <option value="17">17</option>
  21. <option value="18">18</option>
  22. <option value="19">19</option>
  23. <option value="20">20</option>
  24. <option value="21">21</option>
  25. <option value="22">22</option>
  26. <option value="23">23</option>
  27. <option value="24">24</option>
  28. <option value="25">25</option>
  29. <option value="26">26</option>
  30. <option value="27">27</option>
  31. <option value="28">28</option>
  32. <option value="29">29</option>
  33. <option value="30">30</option>
  34. <option value="31">31</option>
  35. </select>
  36.  
  37. <select id="selMonth">
  38. <option value="January">January</option>
  39. <option value="February">February</option>
  40. <option value="March">March</option>
  41. <option value="April">April</option>
  42. <option value="May">May</option>
  43. <option value="June">June</option>
  44. <option value="July">July</option>
  45. <option value="August">August</option>
  46. <option value="September">September</option>
  47. <option value="October">October</option>
  48. <option value="November">November</option>
  49. <option value="December">December</option>
  50. </select>
  51.  
  52. <select id="selYear" >
  53. <option value="2008">2008</option>
  54. </select>
  55. <script type="text/javascript">
  56. function myFunction()
  57. {
  58. var str="";
  59. var selDay = document.getElementById("selDay");
  60. var selMonth = document.getElementById("selMonth");
  61. var selYear = document.getElementById("selYear");
  62. str = selDay + " " + selMonth + " " + selYear;
  63. linkRef.href = "\\yofs13\374OG\36AS\Asgard_data\data\Duty Desk\Electronic Boards Info\Schedule Slides\2008\" + str + ".ppt";
  64. }
  65. </script>
  66. <a href="javascript:myFunction();">Here is the slide</a>
  67. </html>
  68.  
Sep 17 '08 #16
acoder
16,027 Expert Mod 8TB
Firstly, linkRef should be set to the link element whose href property needs changing. Also selDay, selMonth, etc. should be set the value of the select elements, not the elements themselves.
Sep 17 '08 #17
risk32
98
So... I should set the option value to equal selDay, SelMonth, and selYear
and linkRef.href = selDay + selMonth + selYear?
Sep 18 '08 #18
hi
what u can do is you can change the nodevalue in any function like this.....
[HTML]<select .......
onchange="changeValue(this);" ...../select>
[/HTML]
<script type="text/javascript">
Expand|Select|Wrap|Line Numbers
  1. function changeValue(that){
  2. var linknode=$('ID of the hyperlink').;
  3. var combovalue=that.value;//Can get value in this way of the combo.
  4.  
  5. linknode.firstChild.nodeValue='as per your desired value you can use concatenation or indexOf() funcn to print value at desired place in the string';
  6.  
  7.  
  8. }
  9.  
  10.  
</script>
Sep 18 '08 #19
acoder
16,027 Expert Mod 8TB
So... I should set the option value to equal selDay, SelMonth, and selYear
and linkRef.href = selDay + selMonth + selYear?
Yes, e.g. selDay would be set to document.getElementById("selDay").value. However, you still need to set linkRef to the link element. Give the link an ID and access it using document.getElementById().
Sep 18 '08 #20
risk32
98
Rsmastermind,
Using your guidance, here's the coding I came up with.. not much different from where I started and I need a little more help on the JS portion of it.
You may use any value for the linknode or nodeValue, just need to see an example of how I would do it.

Expand|Select|Wrap|Line Numbers
  1. <html>
  2. <select onchange="changeValue(this);">
  3. <option value="selDay">01</option>
  4. <option value="selDay">02</option>
  5. <option value="selDay">03</option>
  6. <option value="selDay">04</option>
  7. <option value="selDay">05</option>
  8. <option value="selDay">06</option>
  9. <option value="selDay">07</option>
  10. <option value="selDay">08</option>
  11. <option value="selDay">09</option>
  12. <option value="selDay">10</option>
  13. <option value="selDay">11</option>
  14. <option value="selDay">12</option>
  15. <option value="selDay">13</option>
  16. <option value="selDay">14</option>
  17. <option value="selDay">15</option>
  18. <option value="selDay">16</option>
  19. <option value="selDay">17</option>
  20. <option value="selDay">18</option>
  21. <option value="selDay">19</option>
  22. <option value="selDay">20</option>
  23. <option value="selDay">21</option>
  24. <option value="selDay">22</option>
  25. <option value="selDay">23</option>
  26. <option value="selDay">24</option>
  27. <option value="selDay">25</option>
  28. <option value="selDay">26</option>
  29. <option value="selDay">27</option>
  30. <option value="selDay">28</option>
  31. <option value="selDay">29</option>
  32. <option value="selDay">30</option>
  33. <option value="selDay">31</option>
  34. </select>
  35.  
  36. <select onchange="changeValue(this);">
  37. <option value="selMonth">January</option>
  38. <option value="selMonth">February</option>
  39. <option value="selMonth">March</option>
  40. <option value="selMonth">April</option>
  41. <option value="selMonth">May</option>
  42. <option value="selMonth">June</option>
  43. <option value="selMonth">July</option>
  44. <option value="selMonth">August</option>
  45. <option value="selMonth">September</option>
  46. <option value="selMonth">October</option>
  47. <option value="selMonth">November</option>
  48. <option value="selMonth">December</option>
  49. </select>
  50.  
  51. <select onchange="changeValue(this);">
  52. <option value="selYear">2008</option>
  53. </select>
  54. <script type="text/javascript">
  55. function changeValue(that){
  56. var linknode=$();
  57. var comboValue=.that.value;
  58. linknode.firstChild.nodeValue = ""
  59. }
  60. </script>
  61. <a href="javascript:myFunction();">Here is the slide</a>
  62. </html>
  63.  
Sep 18 '08 #21
acoder
16,027 Expert Mod 8TB
For linknode or linkRef or whatever you want to call it, you need to access the link element, so give the <a> element an id and then use document.getElementById("id") to refer to it.
Sep 18 '08 #22
Rsmastermind,
Using your guidance, here's the coding I came up with.. not much different from where I started and I need a little more help on the JS portion of it.
You may use any value for the linknode or nodeValue, just need to see an example of how I would do it.

Expand|Select|Wrap|Line Numbers
  1. <html>
  2. <select onchange="changeValue(this);">
  3. <option value="selDay">01</option>
  4. <option value="selDay">02</option>
  5. <option value="selDay">03</option>
  6. <option value="selDay">04</option>
  7. <option value="selDay">05</option>
  8. <option value="selDay">06</option>
  9. <option value="selDay">07</option>
  10. <option value="selDay">08</option>
  11. <option value="selDay">09</option>
  12. <option value="selDay">10</option>
  13. <option value="selDay">11</option>
  14. <option value="selDay">12</option>
  15. <option value="selDay">13</option>
  16. <option value="selDay">14</option>
  17. <option value="selDay">15</option>
  18. <option value="selDay">16</option>
  19. <option value="selDay">17</option>
  20. <option value="selDay">18</option>
  21. <option value="selDay">19</option>
  22. <option value="selDay">20</option>
  23. <option value="selDay">21</option>
  24. <option value="selDay">22</option>
  25. <option value="selDay">23</option>
  26. <option value="selDay">24</option>
  27. <option value="selDay">25</option>
  28. <option value="selDay">26</option>
  29. <option value="selDay">27</option>
  30. <option value="selDay">28</option>
  31. <option value="selDay">29</option>
  32. <option value="selDay">30</option>
  33. <option value="selDay">31</option>
  34. </select>
  35.  
  36. <select onchange="changeValue(this);">
  37. <option value="selMonth">January</option>
  38. <option value="selMonth">February</option>
  39. <option value="selMonth">March</option>
  40. <option value="selMonth">April</option>
  41. <option value="selMonth">May</option>
  42. <option value="selMonth">June</option>
  43. <option value="selMonth">July</option>
  44. <option value="selMonth">August</option>
  45. <option value="selMonth">September</option>
  46. <option value="selMonth">October</option>
  47. <option value="selMonth">November</option>
  48. <option value="selMonth">December</option>
  49. </select>
  50.  
  51. <select onchange="changeValue(this);">
  52. <option value="selYear">2008</option>
  53. </select>
  54. <script type="text/javascript">
  55. function changeValue(that){
  56. var linknode=$();
  57. var comboValue=.that.value;
  58. linknode.firstChild.nodeValue = ""
  59. }
  60. </script>
  61. <a href="javascript:myFunction();">Here is the slide</a>
  62. </html>
  63.  


Yes but linknode you had specified as null.That is not correct
give like this in your document.[HTML]<a id="Link_ID">link value </a> //Assign this Id Link_ID to var linknode of your code[/HTML]

this will work fine.
Sep 19 '08 #23
risk32
98
Here's another way I tried to go about it... It works, but I need to find a way to adjust the filePath depending on the Airifield / Daily Schedule radio button. The filePath for Daily schedule is good, but I need a separate filePath for the Aifield so it reads var filePath = "INFO & STATUS\\Info & Status" with the same file extension as ".ppt".

The code:
Expand|Select|Wrap|Line Numbers
  1. <html>
  2. <head>
  3. <script>
  4.  
  5. var year ="2008";
  6. var fileExt = ".ppt";
  7.  
  8. function getRadioButtonvalue(radioButtons)
  9. {
  10.     var value = null;
  11.     for (var i=0; i<= radioButtons.length -1; i++)
  12.     {
  13.         if (radioButtons[i].checked)
  14.         {
  15.             value =radioButtons[i].value;
  16.         }
  17.     }
  18.     return value;
  19. }
  20.  
  21.  
  22. function displayFileName()
  23. {
  24.     var day = getRadioButtonvalue(document.getElementsByName("day"));
  25.     var month = getRadioButtonvalue(document.getElementsByName("month"));
  26.     var filePath = getRadioButtonvalue(document.getElementsByName("month"));
  27.     var fileName = filePath + "/" + day + " " + month + " " + year + fileExt;
  28.  
  29.     //write to page..
  30.     var downloadArea = document.getElementById("downloadArea");
  31.     downloadArea.innerHTML = '<a href="'+fileName+'"> Click to download File </a>'; 
  32.  
  33. }
  34. </script>
  35.  
  36. </HEAD>
  37. <BODY>
  38.  
  39. <TABLE cellSpacing="0" cellPadding="0" width="1111" bgColor="#999999" border="2">
  40.  
  41.  
  42. <h5>Please Select Airfield Status Or Daily Schedule</h5>
  43. <input type="radio" name="type" value="airfield">Airfield Status<br>
  44. <input type="radio" name="type" value="schedule">Daily Schedule
  45.  
  46. <h5>Please Select the Day<br></h5>
  47. <input type="radio" name="day" value="01">01
  48. <input type="radio" name="day" value="02">02
  49. <input type="radio" name="day" value="03">03
  50. <input type="radio" name="day" value="04">04
  51. <input type="radio" name="day" value="05">05
  52. <input type="radio" name="day" value="06">06
  53. <input type="radio" name="day" value="07">07
  54. <input type="radio" name="day" value="08">08
  55. <input type="radio" name="day" value="09">09
  56. <input type="radio" name="day" value="10">10
  57. <input type="radio" name="day" value="11">11
  58. <input type="radio" name="day" value="12">12
  59. <input type="radio" name="day" value="13">13
  60. <input type="radio" name="day" value="14">14
  61. <input type="radio" name="day" value="15">15<br>
  62. <input type="radio" name="day" value="16">16
  63. <input type="radio" name="day" value="17">17
  64. <input type="radio" name="day" value="18">18
  65. <input type="radio" name="day" value="19">19
  66. <input type="radio" name="day" value="20">20
  67. <input type="radio" name="day" value="21">21
  68. <input type="radio" name="day" value="22">22
  69. <input type="radio" name="day" value="23">23
  70. <input type="radio" name="day" value="24">24
  71. <input type="radio" name="day" value="25">25
  72. <input type="radio" name="day" value="26">26
  73. <input type="radio" name="day" value="27">27
  74. <input type="radio" name="day" value="28">28
  75. <input type="radio" name="day" value="29">29
  76. <input type="radio" name="day" value="30">30
  77. <input type="radio" name="day" value="31">31
  78.  
  79. <h5>Please Select the month</h5>
  80. <input type="radio" name="month" id="Janauary" value="jan">January<br>
  81. <input type="radio" name="month" id="February" value="feb">February<br>
  82. <input type="radio" name="month" id="March" value="mar">March<br>
  83. <input type="radio" name="month" id="April" value="apr">April<br>
  84. <input type="radio" name="month" id="May" value="may">May<br>
  85. <input type="radio" name="month" id="June" value="jun">June<br>
  86. <input type="radio" name="month" id="July" value="jul">July<br>
  87. <input type="radio" name="month" id="August" value="aug">August<br>
  88. <input type="radio" name="month" id="September" value="sep">September<br>
  89. <input type="radio" name="month" id="October" value="oct">October<br>
  90. <input type="radio" name="month" id="November" value="nov">November<br>
  91. <input type="radio" name="month" id="December" value="dec">December<br>
  92. <br>
  93.  
  94. <H3>Please Select the Appropiate Link</H3>
  95.  
  96. <input type="button" value="Generate Link" onClick="displayFileName()">
  97. <input type="reset" value="reset">
  98. <div id="downloadArea"></div>
  99. </body>
  100. </html>
  101.  
Sep 24 '08 #24
acoder
16,027 Expert Mod 8TB
Use the getRadioButtonValue function to get the value of the "type" radio button. If it's Aifield, you can set it to "INFO AND STATUS..". I think select elements would be more useful than radio buttons for the day/month and make the code shorter too.
Sep 24 '08 #25
risk32
98
Use the getRadioButtonValue function to get the value of the "type" radio button. If it's Aifield, you can set it to "INFO AND STATUS..". I think select elements would be more useful than radio buttons for the day/month and make the code shorter too.
Acoder,
Using your advice I changed the radio value for airfield to "INFO & STATUS\Info and Status.ppt" and it worked! Success! Almost... In order to do that I had to change var fileName to just filePath.. now I'm stuck with trying to figure out how to toggle between two filepaths... (by the way, never took and JDK or JS classes, just learning as I go by using forums, online books etc... big pain in the a$$ if you ask me.. should have taken a class)
Sep 24 '08 #26
acoder
16,027 Expert Mod 8TB
What I was suggesting was along the lines of:
Expand|Select|Wrap|Line Numbers
  1. var type = getRadioButtonvalue(document.getElementsByName("type"));
  2. // now check type value
  3. if (type == "airfield") {
  4.  // set fileName to "INFO...", etc.
  5. } else {
  6.     // get day/month values and set fileName
  7. }
Sep 25 '08 #27
risk32
98
This If / Else statement is throwing errors. This is the only part I changed
Expand|Select|Wrap|Line Numbers
  1. function displayFileName()
  2. {
  3. var type = getRadioButtonValue(document.getElementsByName("schedule")); 
  4.  if (type == "schedule") {
  5.     var day = getRadioButtonvalue(document.getElementsByName("day")); 
  6.     var month = getRadioButtonvalue(document.getElementsByName("month"));
  7.     var filePath = "M:\\data\\Duty Desk\\Electronic Boards Info\\Schedule Slides\\2008\\"
  8.     var fileName = filePath +  month + "\\" + day + " " + month + " " + year + fileExt;
  9.  } else {
  10. var filePath = "M:\\data\\Duty Desk\\Electronic Boards Info\\Schedule Slides\\2008\\INFO & STATUS\\"
  11. var fileName = filePath + "Info And Status" + fileExt;
  12.  
Sep 28 '08 #28
acoder
16,027 Expert Mod 8TB
What error messages do you see?

Don't forget to close the else part with a closing bracket.
Sep 28 '08 #29
risk32
98
Line 35, Char 1
Expected character '}'
Doesn't really make sense since it's html and not javascript on Ln 35

Line 89 Char 1
Object Expected
Expand|Select|Wrap|Line Numbers
  1. <html>
  2. <head>
  3. <script>
  4. var year ="2008";
  5. var fileExt = ".ppt";
  6. function getRadioButtonvalue(radioButtons)
  7. {
  8. var value = null;
  9. for (var i=0; i<= radioButtons.length -1; i++)
  10. {
  11. if (radioButtons[i].checked)
  12. {
  13. value =radioButtons[i].value;
  14. }
  15. }
  16. return value;
  17. }
  18. function displayFileName()
  19.  { 
  20. var type = getRadioButtonValue(document.getElementsByName("schedule"));  
  21.  if (type == "schedule") { 
  22.     var day = getRadioButtonvalue(document.getElementsByName("day"));  
  23.     var month = getRadioButtonvalue(document.getElementsByName("month")); 
  24.     var filePath = "M:\\data\\Duty Desk\\Electronic Boards Info\\Schedule Slides\\2008\\" 
  25.     var fileName = filePath +  month + "\\" + day + " " + month + " " + year + fileExt; 
  26. } else {
  27. var filePath = "M:\\data\\Duty Desk\\Electronic Boards Info\\Schedule Slides\\2008\\INFO & STATUS\\" 
  28. var fileName = filePath + "Info And Status" + fileExt; 
  29. var downloadArea = document.getElementById("downloadArea"); 
  30.     downloadArea.innerHTML = '<a href="'+fileName+'"> Click to download File </a>';
  31. </script>
  32. </HEAD>
  33. <BODY>
  34. <TABLE cellSpacing="0" cellPadding="0" width="1111" bgColor="#999999" border="2">
  35. <h5>Please Select Airfield Status Or Daily Schedule</h5>
  36. <input type="radio" name="type" value="INFO & STATUS\Info and Status.ppt">Airfield Status<br>
  37. <input type="radio" name="type" value="">Daily Schedule
  38. <h5>Please Select the Day<br></h5>
  39. <input type="radio" name="day" value="01">01
  40. <input type="radio" name="day" value="02">02
  41. <input type="radio" name="day" value="03">03
  42. <input type="radio" name="day" value="04">04
  43. <input type="radio" name="day" value="05">05
  44. <input type="radio" name="day" value="06">06
  45. <input type="radio" name="day" value="07">07
  46. <input type="radio" name="day" value="08">08
  47. <input type="radio" name="day" value="09">09
  48. <input type="radio" name="day" value="10">10
  49. <input type="radio" name="day" value="11">11
  50. <input type="radio" name="day" value="12">12
  51. <input type="radio" name="day" value="13">13
  52. <input type="radio" name="day" value="14">14
  53. <input type="radio" name="day" value="15">15<br>
  54. <input type="radio" name="day" value="16">16
  55. <input type="radio" name="day" value="17">17
  56. <input type="radio" name="day" value="18">18
  57. <input type="radio" name="day" value="19">19
  58. <input type="radio" name="day" value="20">20
  59. <input type="radio" name="day" value="21">21
  60. <input type="radio" name="day" value="22">22
  61. <input type="radio" name="day" value="23">23
  62. <input type="radio" name="day" value="24">24
  63. <input type="radio" name="day" value="25">25
  64. <input type="radio" name="day" value="26">26
  65. <input type="radio" name="day" value="27">27
  66. <input type="radio" name="day" value="28">28
  67. <input type="radio" name="day" value="29">29
  68. <input type="radio" name="day" value="30">30
  69. <input type="radio" name="day" value="31">31
  70. <h5>Please Select the month</h5>
  71. <input type="radio" name="month" id="Janauary" value="jan">January<br>
  72. <input type="radio" name="month" id="February" value="feb">February<br>
  73. <input type="radio" name="month" id="March" value="mar">March<br>
  74. <input type="radio" name="month" id="April" value="apr">April<br>
  75. <input type="radio" name="month" id="May" value="may">May<br>
  76. <input type="radio" name="month" id="June" value="jun">June<br>
  77. <input type="radio" name="month" id="July" value="jul">July<br>
  78. <input type="radio" name="month" id="August" value="aug">August<br>
  79. <input type="radio" name="month" id="September" value="sep">September<br>
  80. <input type="radio" name="month" id="October" value="oct">October<br>
  81. <input type="radio" name="month" id="November" value="nov">November<br>
  82. <input type="radio" name="month" id="December" value="dec">December<br>
  83. <br>
  84. <H3>Please Select the Appropiate Link</H3>
  85. <input type="button" value="Generate Link" onClick="displayFileName()">
  86. <input type="reset" value="reset">
  87. <div id="downloadArea"></div>
  88. </body>
  89. </html>
  90.  
Sep 29 '08 #30
Yes this is an error u need to close all the braces If the brace will be opened the javascript will not get executed.
Sep 29 '08 #31
risk32
98
OK, looked at the IE error report is put out, though the line numbers arent the exact number is says. I'm pretty sure it's throwing an error due to the "downloadArea" portion of it. I've gotten it to work before, but after that, I had to throw in the IF/ELSE statement... might just be syntax and/or placement issues.
Expand|Select|Wrap|Line Numbers
  1. <html>
  2. <head>
  3. <script>
  4. var year ="2008";
  5. var fileExt = ".ppt";
  6. function getRadioButtonvalue(radioButtons)
  7. {
  8. var value = null;
  9. for (var i=0; i<= radioButtons.length -1; i++)
  10. {
  11. if (radioButtons[i].checked)
  12. {
  13. value =radioButtons[i].value;
  14. }
  15. }
  16. return value;
  17. }
  18. function displayFileName()
  19.  { 
  20. var type = getRadioButtonValue(document.getElementsByName("schedule"));  
  21. var downloadArea = document.getElementById("downloadArea"); 
  22. downloadArea.innerHTML = '<a href="'+fileName+'"> Click to download File </a>';    
  23.  if (type == "schedule") { 
  24.     var day = getRadioButtonvalue(document.getElementsByName("day"));  
  25.     var month = getRadioButtonvalue(document.getElementsByName("month")); 
  26.     var filePath = "M:\\data\\Duty Desk\\Electronic Boards Info\\Schedule Slides\\2008\\" 
  27.     var fileName = filePath +  month + "\\" + day + " " + month + " " + year + fileExt; 
  28. } else {
  29. var filePath = "M:\\data\\Duty Desk\\Electronic Boards Info\\Schedule Slides\\2008\\INFO & STATUS\\" 
  30. var fileName = filePath + "Info And Status" + fileExt;
  31. </script>
  32. </HEAD>
  33. <BODY>
  34. <TABLE cellSpacing="0" cellPadding="0" width="1111" bgColor="#999999" border="2">
  35. <h5>Please Select Airfield Status Or Daily Schedule</h5>
  36. <input type="radio" name="type" value="INFO & STATUS\Info and Status.ppt">Airfield Status<br>
  37. <input type="radio" name="type" value="">Daily Schedule
  38. <h5>Please Select the Day<br></h5>
  39. <input type="radio" name="day" value="01">01
  40. <input type="radio" name="day" value="02">02
  41. <input type="radio" name="day" value="03">03
  42. <input type="radio" name="day" value="04">04
  43. <input type="radio" name="day" value="05">05
  44. <input type="radio" name="day" value="06">06
  45. <input type="radio" name="day" value="07">07
  46. <input type="radio" name="day" value="08">08
  47. <input type="radio" name="day" value="09">09
  48. <input type="radio" name="day" value="10">10
  49. <input type="radio" name="day" value="11">11
  50. <input type="radio" name="day" value="12">12
  51. <input type="radio" name="day" value="13">13
  52. <input type="radio" name="day" value="14">14
  53. <input type="radio" name="day" value="15">15<br>
  54. <input type="radio" name="day" value="16">16
  55. <input type="radio" name="day" value="17">17
  56. <input type="radio" name="day" value="18">18
  57. <input type="radio" name="day" value="19">19
  58. <input type="radio" name="day" value="20">20
  59. <input type="radio" name="day" value="21">21
  60. <input type="radio" name="day" value="22">22
  61. <input type="radio" name="day" value="23">23
  62. <input type="radio" name="day" value="24">24
  63. <input type="radio" name="day" value="25">25
  64. <input type="radio" name="day" value="26">26
  65. <input type="radio" name="day" value="27">27
  66. <input type="radio" name="day" value="28">28
  67. <input type="radio" name="day" value="29">29
  68. <input type="radio" name="day" value="30">30
  69. <input type="radio" name="day" value="31">31
  70. <h5>Please Select the month</h5>
  71. <input type="radio" name="month" id="Janauary" value="jan">January<br>
  72. <input type="radio" name="month" id="February" value="feb">February<br>
  73. <input type="radio" name="month" id="March" value="mar">March<br>
  74. <input type="radio" name="month" id="April" value="apr">April<br>
  75. <input type="radio" name="month" id="May" value="may">May<br>
  76. <input type="radio" name="month" id="June" value="jun">June<br>
  77. <input type="radio" name="month" id="July" value="jul">July<br>
  78. <input type="radio" name="month" id="August" value="aug">August<br>
  79. <input type="radio" name="month" id="September" value="sep">September<br>
  80. <input type="radio" name="month" id="October" value="oct">October<br>
  81. <input type="radio" name="month" id="November" value="nov">November<br>
  82. <input type="radio" name="month" id="December" value="dec">December<br>
  83. <br>
  84. <H3>Please Select the Appropiate Link</H3>
  85. <input type="button" value="Generate Link" onClick="displayFileName()">
  86. <input type="reset" value="reset" onclick="window.location.reload(true); return false;">
  87. <div id="downloadArea"></div>
  88. </body>
  89. </html>
  90.  
Sep 29 '08 #32
acoder
16,027 Expert Mod 8TB
Change it back to what you had before. The download Area lines have to appear after the if/else statement because that's where the fileName variable is set.

What you needed to do was add two brackets. One to close the else and one to close the function. Whenever you have an opening { you need a matching close }.

One final thing: don't trust IE error message line numbers. They're very often horribly wrong. First test in a decent other browser such as Firefox or Opera, then finally test in IE.
Sep 29 '08 #33
risk32
98
Change it back to what you had before. The download Area lines have to appear after the if/else statement because that's where the fileName variable is set.

What you needed to do was add two brackets. One to close the else and one to close the function. Whenever you have an opening { you need a matching close }.

One final thing: don't trust IE error message line numbers. They're very often horribly wrong. First test in a decent other browser such as Firefox or Opera, then finally test in IE.
Unfortunately I'm stuck with the POS IExplorer. I changed it around slightly, put the downloadArea at the end, and made sure I put closing brackets after each section containing an opening bracket. Still throwing errors with IE. I'm pretty sure it's either that it's not getting the element ID from the bottom of the page, where <div id="downloadArea"> is specified. I'm doing something wrong...
Expand|Select|Wrap|Line Numbers
  1. function getRadioButtonvalue(radioButtons) 
  2. var value = null; 
  3. for (var i=0; i<= radioButtons.length -1; i++) 
  4. if (radioButtons[i].checked) 
  5. value =radioButtons[i].value; 
  6. return value; 
  7.  
  8.  
  9. function displayFileName() 
  10.     var type = getRadioButtonValue(document.getElementsByName("schedule"));
  11.     var day = getRadioButtonvalue(document.getElementsByName("day")); 
  12.     var month = getRadioButtonvalue(document.getElementsByName("month")); 
  13.       var downloadArea = document.getElementById("downloadArea");
  14. }
  15.   if (type == "schedule") 
  16. {
  17.     var filePath = getRadioButtonvalue(document.getElementsByName("month")); 
  18.     var fileName = filePath + "/" + day + " " + month + " " + year + fileExt;
  19. {
  20. else  
  21. var filePath = "M:\\data\\Duty Desk\\Electronic Boards Info\\Schedule Slides\\2008\\INFO & STATUS\\"  
  22. var fileName = filePath + "Info And Status" + fileExt; 
  23. }
  24. {
  25.     //write to page.. 
  26.  
  27.     downloadArea.innerHTML = '<a href="'+fileName+'"> Click to download File </a>';
  28. }
  29. </script>
  30. <html> ......
  31. <div id"downloadArea">
  32. </html>
Sep 30 '08 #34
acoder
16,027 Expert Mod 8TB
There are a number of syntax errors.

On line 21, you close the function displayFileName which is not what you want, so remove that line. Lines 27/28 need to be swapped round because the if-else syntax is "if { ... } else { ... }", not "if { ... } { else }". Finally, on line 32, you're opening a block of code with { which is not required, so remove that line too.
Sep 30 '08 #35
risk32
98
There are a number of syntax errors.

On line 21, you close the function displayFileName which is not what you want, so remove that line. Lines 27/28 need to be swapped round because the if-else syntax is "if { ... } else { ... }", not "if { ... } { else }". Finally, on line 32, you're opening a block of code with { which is not required, so remove that line too.
Alright, IE is pretty much ticking me off. If I wasn't at work i could be getting better error reports from FireFox. I've done all the tips that you've given me, looked over my code a hundred times to see if there's something I'm missing and it's still not working. I'm about to say screw it and create an EXE using VB. GUI's most generally work better than IE anywyas.
Expand|Select|Wrap|Line Numbers
  1. <html>
  2. <head>
  3. <script>
  4. var year ="2008";
  5. var fileExt = ".ppt";
  6. function getRadioButtonvalue(radioButtons)  
  7. {  
  8. var value = null;  
  9. for (var i=0; i<= radioButtons.length -1; i++)  
  10. {  
  11. if (radioButtons[i].checked)  
  12. {  
  13. value =radioButtons[i].value;  
  14. }  
  15. }  
  16. return value;  
  17. }  
  18. function displayFileName()  
  19. {  
  20.     var type = getRadioButtonValue(document.getElementsByName("schedule")); 
  21.     var day = getRadioButtonvalue(document.getElementsByName("day"));  
  22.     var month = getRadioButtonvalue(document.getElementsByName("month"));  
  23.       var downloadArea = document.getElementById("downloadArea"); 
  24.   if (type == "schedule")  
  25.  {
  26.     var filePath = getRadioButtonvalue(document.getElementsByName("month"));  
  27.     var fileName = filePath + "/" + day + " " + month + " " + year + fileExt; 
  28. }  
  29. else
  30. {   
  31. var filePath = "M:\\data\\Duty Desk\\Electronic Boards Info\\Schedule Slides\\2008\\INFO & STATUS\\"   
  32. var fileName = filePath + "Info And Status" + fileExt;  
  33. //write to page..  
  34. downloadArea.innerHTML = '<a href="'+fileName+'"> Click to download File </a>'; 
  35. </script>
  36. </HEAD>
  37. <BODY>
  38. <TABLE cellSpacing="0" cellPadding="0" width="1111" bgColor="#999999" border="2">
  39. <h5>Please Select Airfield Status Or Daily Schedule</h5>
  40. <input type="radio" name="type" value="INFO & STATUS\Info and Status.ppt">Airfield Status<br>
  41. <input type="radio" name="type" value="">Daily Schedule
  42. <h5>Please Select the Day<br></h5>
  43. <input type="radio" name="day" value="01">01
  44. <input type="radio" name="day" value="02">02
  45. <input type="radio" name="day" value="03">03
  46. <input type="radio" name="day" value="04">04
  47. <input type="radio" name="day" value="05">05
  48. <input type="radio" name="day" value="06">06
  49. <input type="radio" name="day" value="07">07
  50. <input type="radio" name="day" value="08">08
  51. <input type="radio" name="day" value="09">09
  52. <input type="radio" name="day" value="10">10
  53. <input type="radio" name="day" value="11">11
  54. <input type="radio" name="day" value="12">12
  55. <input type="radio" name="day" value="13">13
  56. <input type="radio" name="day" value="14">14
  57. <input type="radio" name="day" value="15">15<br>
  58. <input type="radio" name="day" value="16">16
  59. <input type="radio" name="day" value="17">17
  60. <input type="radio" name="day" value="18">18
  61. <input type="radio" name="day" value="19">19
  62. <input type="radio" name="day" value="20">20
  63. <input type="radio" name="day" value="21">21
  64. <input type="radio" name="day" value="22">22
  65. <input type="radio" name="day" value="23">23
  66. <input type="radio" name="day" value="24">24
  67. <input type="radio" name="day" value="25">25
  68. <input type="radio" name="day" value="26">26
  69. <input type="radio" name="day" value="27">27
  70. <input type="radio" name="day" value="28">28
  71. <input type="radio" name="day" value="29">29
  72. <input type="radio" name="day" value="30">30
  73. <input type="radio" name="day" value="31">31
  74. <h5>Please Select the month</h5>
  75. <input type="radio" name="month" id="Janauary" value="jan">January<br>
  76. <input type="radio" name="month" id="February" value="feb">February<br>
  77. <input type="radio" name="month" id="March" value="mar">March<br>
  78. <input type="radio" name="month" id="April" value="apr">April<br>
  79. <input type="radio" name="month" id="May" value="may">May<br>
  80. <input type="radio" name="month" id="June" value="jun">June<br>
  81. <input type="radio" name="month" id="July" value="jul">July<br>
  82. <input type="radio" name="month" id="August" value="aug">August<br>
  83. <input type="radio" name="month" id="September" value="sep">September<br>
  84. <input type="radio" name="month" id="October" value="oct">October<br>
  85. <input type="radio" name="month" id="November" value="nov">November<br>
  86. <input type="radio" name="month" id="December" value="dec">December<br>
  87. <br>
  88. <H3>Please Select the Appropiate Link</H3>
  89. <input type="button" value="Generate Link" onClick="displayFileName()">
  90. <input type="reset" value="reset" onclick="window.location.reload(true); return false;">
  91. <div id="downloadArea"></div>
  92. </body>
  93. </html>
  94.  
I'm pretty sure if you save my code to an html and run it, you'll definately have the idea of what i'm trying to do, but the filePath's definately wont work since I'm on a private network. Don't worry though. Security isn't such a big thing for this project.

Thanks for the help acoder
Oct 1 '08 #36
acoder
16,027 Expert Mod 8TB
I notice a few more errors. You haven't closed displayFileName properly. There should be a closing } after the last line of the function before </script>.

The type value is incorrect because you're getting the radio button value of elements named "schedule" instead of "type". Secondly, you will get an error because JavaScript is case-sensitive and you calling the getRadioButtonvalue() function with a capital V instead of a lower-case v.

See if that helps fix things.
Oct 1 '08 #37
risk32
98
I notice a few more errors. You haven't closed displayFileName properly. There should be a closing } after the last line of the function before </script>.

The type value is incorrect because you're getting the radio button value of elements named "schedule" instead of "type". Secondly, you will get an error because JavaScript is case-sensitive and you calling the getRadioButtonvalue() function with a capital V instead of a lower-case v.

See if that helps fix things.
Alright, looks like it worked it's wonders.
Now all I've got to do is make sure every single .ppt file is in the correct format to open it according to the link. I've got all kinds of different ways people have saved these slides... Ugh... :( But that comes with the terriroty of being a Computer Support Assistant AND being a Duty Officer for a C-130 squadron.

Is there a way to add a login form and change visible to false until the correct login is input? Also, without a server-side ability, is there a way to add cookies using a mapped network drive and fake a folder to act as a server? Reason I'm asking... we have a network server, with no direct access to the configuration or software on it iself. Most file extensions are blocked except those savable under Microsoft office, html, and .js files. ALL .exes are blocked as well as .bats
Is there a way to write it in javascript to fake itself to create an object to act as a server for the cookies function? We've got 180 people and some higher ups that need access to this webpage for historical purposes and having MySQL is just not an option for maintaining usernames and password for it. It's not classified information, but still need to prevent anyone not part of our office looking at it.

I greatly appreciate your help. Without it I'd be pulling my hair out of just giving up on this html. With the guidance you've given, I understand JS a little more and realize how strict the language is, unlike VB or html. Again, thank you.
Oct 2 '08 #38
acoder
16,027 Expert Mod 8TB
I'm afraid that won't be possible. You can use cookies without a server, but for any type of login security, you will need server-side code. JavaScript doesn't offer much protection. Any that it does is easily circumvented by anyone with even a bit of knowledge.

What type of server/network is it? There may be options that you could consider, but they wouldn't involve JavaScript, so you can try asking in an appropriate forum, or Misc. Questions if nothing fits.

Personally, I would consider a proper server setup which allows you to control access.

Anyway, glad to hear that you've got the original problem solved. You could improve it further by using select elements instead of radio buttons.
Oct 2 '08 #39
risk32
98
I'm afraid that won't be possible. You can use cookies without a server, but for any type of login security, you will need server-side code. JavaScript doesn't offer much protection. Any that it does is easily circumvented by anyone with even a bit of knowledge.

What type of server/network is it? There may be options that you could consider, but they wouldn't involve JavaScript, so you can try asking in an appropriate forum, or Misc. Questions if nothing fits.

Personally, I would consider a proper server setup which allows you to control access.

Anyway, glad to hear that you've got the original problem solved. You could improve it further by using select elements instead of radio buttons.
The server being used is operated by outside personnel. There's no way I could get any administrative rights to it. And any software installed has to be coordinated with proper approval before anything gets installed... welcome to the military. Kind of like submitting a form to request a form to get the form you really need. With the programming aspect, I wish I was still a civilian. I could get a lot more done and have a lot more time to work with it.

Anyways, I tried using the select elements for a drop down menu with JS but it was to no avail. I couldn't get the element values to cross over into each menu and there would be 365+ option values.... WAY too much coding when I could use radio buttons like this. Unless of course, all I have to do in this code is substitute the radio button for a select. Also, the site is working just fine, just need to keep maintenance contantly since most people don't know how to save the .ppt files the right way... Also implemented an Excel VBA project that does the same thing, just trying to transfer it over to VB6 for compiling. Hopefully this gets some good feedback for the work I've been doing to improve operations.
Oct 3 '08 #40
acoder
16,027 Expert Mod 8TB
To use select elements, replace the radio buttons with select/option elements in the HTML, e.g. for day:
Expand|Select|Wrap|Line Numbers
  1. <select id="day">
  2. <option value="01">01
then in displayFileName(), replace the lines setting the day and month to get the select values instead, e.g. for day:
Expand|Select|Wrap|Line Numbers
  1. var day = document.getElementById("day").value;
Oct 3 '08 #41
risk32
98
To use select elements, replace the radio buttons with select/option elements in the HTML, e.g. for day:
Expand|Select|Wrap|Line Numbers
  1. <select id="day">
  2. <option value="01">01
then in displayFileName(), replace the lines setting the day and month to get the select values instead, e.g. for day:
Expand|Select|Wrap|Line Numbers
  1. var day = document.getElementById("day").value;
When I transferred everything over for a <select> the coding is giving me an error. IE is saying that "Object doesn't support this proprty or method". Maybe Firefox could give me some better advice? I must apologize for asking for all of this help. I'm stuck using IE and notepad :*(

Anyways, I separated the code into a .js and .html, mostly so I dont have to keep looking at the same code over and over. I can fix one or both and not have to worry so much.

Here's the .js, called link.js (nothing really changed since the last time I posted it)
Expand|Select|Wrap|Line Numbers
  1. var year ="2008"; 
  2. var fileExt = ".ppt"; 
  3. function getRadioButtonvalue(radioButtons)   
  4. {   
  5. var value = null;   
  6. for (var i=0; i<= radioButtons.length -1; i++)   
  7. {   
  8. if (radioButtons[i].checked)   
  9. {   
  10. value =radioButtons[i].value;   
  11. }   
  12. }   
  13. return value;   
  14. }   
  15. function displayFileName()   
  16. {   
  17.     var type = getRadioButtonvalue(document.getElementsByName("schedule"));  
  18.     var day = document.getElementsById("day");   
  19.     var month = document.getElementById("month");   
  20.       var downloadArea = document.getElementById("downloadArea");  
  21.   if (type == "schedule")   
  22.  { 
  23.     var filePath = "\\Duty Desk\\Electronic Boards Info\\Schedule Slides\\2008"
  24.     var fileName = filePath + "/" + month + "/" + day + " " + month + " " + year + fileExt;  
  25. }   
  26. else 
  27. {    
  28. var filePath = "Duty Desk\\Electronic Boards Info\\Schedule Slides\\2008\\INFO & STATUS\\"    
  29. var fileName = filePath + "Info And Status" + fileExt;   
  30. }  
  31. //write to page..   
  32. downloadArea.innerHTML = '<a href="'+fileName+'"> Click to download File </a>';  
  33. }
  34.  
The .html file...
Expand|Select|Wrap|Line Numbers
  1. <html>
  2. <BODY>
  3. <script type="text/javascript" src="link.js">
  4. </script>
  5. <TABLE cellSpacing="0" cellPadding="0" width="1111" bgColor="#999999" border="2">
  6. <h5>Please Select Airfield Status Or Daily Schedule</h5>
  7. <input type="radio" name="airfield" value="airfield">Airfield Status<br>
  8. <input type="radio" name="schedule" value="schedule">Daily Schedule
  9. <h5>Please Select the Day<br></h5>
  10. <select id="day">
  11. <option value="01">01
  12. <option value="02">02
  13. <option value="03">03
  14. <option value="04">04
  15. <option value="05">05
  16. <option value="06">06
  17. <option value="07">07
  18. <option value="08">08
  19. <option value="09">09
  20. <option value="10">10
  21. <option value="11">11
  22. <option value="12">12
  23. <option value="13">13
  24. <option value="14">14
  25. <option value="15">15
  26. <option value="16">16
  27. <option value="17">17
  28. <option value="18">18
  29. <option value="19">19
  30. <option value="20">20
  31. <option value="21">21
  32. <option value="22">22
  33. <option value="23">23
  34. <option value="24">24
  35. <option value="25">25
  36. <option value="26">26
  37. <option value="27">27
  38. <option value="28">28
  39. <option value="29">29
  40. <option value="30">30
  41. <option value="31">31
  42. </select>
  43. <h5>Please Select the month</h5>
  44. <select id="month">
  45. <option value="january">January
  46. <option value="february">February
  47. <option value="march">March
  48. <option value="april">April
  49. <option value="may">May
  50. <option value="june">June
  51. <option value="july">July
  52. <option value="august">August
  53. <option value="september">September
  54. <option value="october">October
  55. <option value="november">November
  56. <option value="decemeber">December
  57. </select>
  58. <br>
  59. <H3>Please Select the Appropiate Link</H3>
  60. <input type="button" value="Generate Link" onClick="displayFileName()">
  61. <input type="reset" value="reset" onclick="window.location.reload(true); return false;">
  62. <div id="downloadArea"></div>
  63. </body>
  64. </html>
  65.  
Honestly... I have no clue as to why it would throw an error like that.. but then, I'm also very new to javascripting.

Thanks again,
Adam
Oct 7 '08 #42
acoder
16,027 Expert Mod 8TB
Lines 18 and 19 in the JavaScript should be set to the value, not the element:
Expand|Select|Wrap|Line Numbers
  1. var day = document.getElementsById("day").value;
Oct 7 '08 #43
risk32
98
Lines 18 and 19 in the JavaScript should be set to the value, not the element:
Expand|Select|Wrap|Line Numbers
  1. var day = document.getElementsById("day").value;
Looks like it fixed the problem. THANKS A BUNCH!
Oct 8 '08 #44
acoder
16,027 Expert Mod 8TB
You're welcome. Glad it's working :) I'm sure you (and your users) will find select elements easier to deal with than radio buttons.
Oct 8 '08 #45

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.