Jump to content

ffej2ffej

Members
  • Posts

    9
  • Joined

  • Last visited

ffej2ffej's Achievements

Newbie

Newbie (1/7)

1

Reputation

  1. I would swear I have seen an input type that was somewhere between a plain ol' text box and a select. In other words, the user could choose from the drop-down list or, if their choice was not found in the list, they could type in whatever they wanted. Is there such a control? I spent some time on http://w3schools.com looking for this, but found nothing.
  2. I have a page in which users are an employee of a charity. They can / should enter information about their organization including phone numbers. It occurs to me that some organizations may have dozens or even hundreds of phone numbers. I do NOT want to have to place that many <input> tags on the page since most users will never need them. I thought it would be nice if there were some sort of input device that can be expanded as needed like a spreadsheet.If there is no such control, I want one. I want it very similar to an <input type=text> control because I want to limit the length of the user's input and even the content, if possible. Also, the cells need to be named as they are created so the server can know they exist and can extract their value.
  3. I fixed it. I realized the problem was not with the sorting mechanism, but the fact that I was sorting a date (01, 02, etc.) to a string of the entire date. I extracted the substring then compared it and it works fine. I did not use any of the sorting functions built in to PHP, but rather used my own algorithm. The way I'm imagining the site in full use, it won't really matter because there won't ever be any more than a few dozen (at worst) records to sort.Thank you all for your suggestions and help.
  4. Ok, here is my attempt to "manually" sort. The code follows. for($x=1;$x<32;$x++){for($y=0;$y<count($thisMonthArray);$y++){if($thisMonthArray[$y][dateOfThisOccurance]==$x){array_push($thisMonthArraySorted,$thisMonthArray[$y]);echo "<script>alert('x='.$x.'y='.$y)</script>";}//closes if()}//closes inner loop (all elements in $thisMonthArray)}//closes outer loop (1 - 31) echo "<table border=3><tr><td>Event Name</td><td>Organization</td><td>Event Date</td><td>Event Description</td></tr>";for($i=0;$i < count($thisMonthArraySorted);$i++){echo "<tr><td>".$thisMonthArraySorted[$i][eventName]."</td><td>".$thisMonthArraySorted[$i][nameAddressPhone]."</td><td>".$thisMonthArraySorted[$i][dateOfThisOccurance]."</td><td>".$thisMonthArraySorted[$i][description]."</td></tr>";}//closes for()echo "</table>";
  5. I have an array full of smaller arrays. The smaller arrays contain elements, one of which is a date. (Not a timestamp, a date such as 1, 2, 3, etc.) I want to sort the small arrays within the large array in order of this date. I don't see anything in the docs for PHP on how to do this.Let me state this another way. I have an array called $eventsThisMonth. I would like to sort $eventsThisMonth by $eventsThisMonth[every][dateOfThisOccurrance]. Thank you in advance for your great help and advice. Jeff P.S. I tried sorting "manually" using an outside loop that goes 1-31 (for the possible values of the date) and an inner loop that goes 0-count($eventsThisMonth) and compares the dateOfThisOccurrance of each smaller array to the index of the outside loop. If equal, it does an array_push to another array. This still didn't work; the other array was in the same order as the original.
  6. I am learning CSS and it's mostly going well. All the advantages about using CSS are realized almost immediately once you being using it. I, however, am from the old school. When you wanted something centered, you surrounded it with <center> and </center> tags. This would center ANYTHING. Pictures, tables, etc. would all be centered if they were between these tags. CSS text-align:center will center the text. Nothing else. I would like to know if there is a way to center other things or if there will be soon.I understand that <center> is deprecated and I would like to stop having to use it.Thank you in advance for your help. Jeff S.
  7. Try this -- <script....blah blah blahalert("You chose "+document.myForm.veggies.value); </script<body<form name="myForm" action="nothing.html" method=POST><select name="veggies"><option value="onions">Onions</option><option value="peas">Peas</option></select></form></body> **NOTE** Notice I didn't include lima beans because NOBODY would choose lima beans! hahaahaha
  8. OSX is Apple's abbreviation for its operating system. 'OS' stands for Operating System and X is the roman numeral 10 to indicate the 10th major version.If you have Windows ____________ , you do not have OSX at all.
×
×
  • Create New...