As you can use PHP it would be better to have a form which posts to its self, then have the PHP redisplay the page inserting the information.
If you use JS only then anyone with JS disabled won't be able to use the page.
A very quick and dirty snippet of PHP/HTML is:
Code:
<?php
$c = 0;
if(isset($_POST['update'])) {
switch($_POST['color']) {
case 1: echo 'Red'; break;
case 2: echo 'Blue'; break;
case 3: echo 'Green'; break;
}
$c = $_POST['color'];
}
?>
<form action="#" method="post">
<select name="color">
<option value="1" <?php if($c == 1) echo 'selected="selected"'; ?>>Red</option>
<option value="2" <?php if($c == 2) echo 'selected="selected"'; ?>>Blue</option>
<option value="3" <?php if($c == 3) echo 'selected="selected"'; ?>>Green</option>
</select>
<input type="submit" name="update">
</form>
If you then add a JS onchange handler to <select> then as the user changes the selection the form will auto submit, if the user doesn't have JS then they will have to click the submit button.
Quote:
|
On a similar note about SSI capabilities, can SSIs be used to display a different string of text based upon the date?
|
I would use PHP.
Quote:
|
MODERATORS: While I continue to receive email notifications from all other forums in which I participate, I do not receive notifications from WebProWorld threads in which I participate. The "Notify me when a reply is posted" option is checked on this thread but the notifications are not received - not even in the "deleted" or "spam" folders. How can this matter be resolved?
|
If like me you are using a block list you'll have to explicitly allow emails from this board through as they seem to have got their servers listed as a spam source.