almostbob 866 Retired: passive income ROCKS

go to windowsupdate and get updated

almostbob 866 Retired: passive income ROCKS

i messed up
as above attempting to select a checkbox will hide them again, should be:: <a href='#' onfocus="showIt('firstyear');hideIt('secondyear');hideIt('thirdyear');" onclick="showIt('firstyear');hideIt('secondyear');hideIt('thirdyear');" tabindex=1>First Year</a>

almostbob 866 Retired: passive income ROCKS

sorry, can you explain more please?

look at the html sample given, copy it to a html file on your desktop and run it
the reset button will uncheck any other button in the list
and give a nul value, so that verification of submitted data can still take place

almostbob 866 Retired: passive income ROCKS
<html>
<head>
<style>
.year { width:25%; margin:3%; padding:3%; float:left; }
</style>
<script language="javascript" type="text/javascript">
<!--
(document.getElementById) ? dom = true : dom = false;
function hideIt(layer) {
 if (dom) {document.getElementById(layer).style.visibility='hidden';} //ie
 if (document.layers) {document.layers[layer].visibility='hide';} } //mozilla
function showIt(layer) {
 if (dom) {document.getElementById(layer).style.visibility='visible';} //ie
 if (document.layers) {document.layers[layer].visibility='show';} } //mozilla
onResize="window.location.href = window.location.href"
//--></script>
</head>
<body>
<noscript> This form requires Javascript to process</noscript>
<div class='year'>
<a href='#' onfocus="showIt('firstyear');" onclick="showIt('firstyear');"  onblur="hideIt('firstyear');" taborder=1>First Year</a> <!-- onfocus onclick allows for keyboard tab as well as mouseclick-->
<div id='firstyear' style='visibility:hidden'> <!-- initially invisible -->
<input type='checkbox' value='filipino'>filipino<br>
<input type='checkbox' value='math'>math<br>
<input type='checkbox' value='sci'>science<br>
</div></div>
<div class='year'>
<a href='#' onfocus="showIt('secondyear');" onclick="showIt('secondyear');"  onblur="hideIt('secondyear');" taborder=2>second Year</a> 
<div id='secondyear' style='visibility:hidden'> 
<input type='checkbox' value='filipino'>2filipino<br>
<input type='checkbox' value='math'>2math<br>
<input type='checkbox' value='sci'>2science<br>
</div></div>
<div class='year'>
<a href='#' onfocus="showIt('thirdyear');" onclick="showIt('thirdyear');"  onblur="hideIt('thirdyear');" taborder=3>third Year</a> 
<div id='thirdyear' style='visibility:hidden'>
<input type='checkbox' value='filipino'>3filipino<br>
<input type='checkbox' value='math'>3math<br>
<input type='checkbox' value='sci'>3science<br>
</div></div>
</body</html>

the javacript will hide or show any number of div span p textarea
Its been a long time since I coded anything new in javascript, if the script does not run, change the id='firstyear' to name='firstyear' edit** for tabulated data as
first year .. second year .. third year

almostbob 866 Retired: passive income ROCKS

for a layout like yours
add margin-bottom to the leftcol rightcol css, large enough to accomodate the height of the footer,
the page will always scroll down to display the last line of text, in the largest column,
above the footer

almostbob 866 Retired: passive income ROCKS

I use another radio button

<input type='radio' value="1" name="samename" >5<br>
<input type='radio' value="2" name="samename" >4<br>
<input type='radio' value="3" name="samename" >3<br>
<input type='radio' value="4" name="samename" >2<br>
<input type='radio' value="5" name="samename" >1<br>
<input type='radio' value="" name="samename" checked>Reset<br>
almostbob 866 Retired: passive income ROCKS

already covered in the css standard for screen readers
as imported .css files or as a portion of a standard .css

<style>
@media reader {
 img { display:none; }
.rollover { display:none; }
body, div, p, span, a, {margin:5px; padding:5px;} /* any element you need to separate for accessibility */ 
.b { width:97%; margin:1%; } /* three lines create tables without tables */
.lt { width:30%; float:left; text-align:right;}
.rt { width:30%; float:right; text-align:left;}
}</style>

and the html 'tabindex' and z-index attributes applicable to all elements controls the order that screen readers access elements
Its harder to get web designers who have been doing things the same way since prehistoric times, to read the standards

<body>
<div class='b' >
<!-- menu html 9 items tabindex 1-9 -->
</div>
<div class='b'>
<div class='l' tabindex=10>explanatory text for input</div>
<input tabindex=12 type='text' name='idontcare'></div>
<div class='b' tabindex=13>
<img src='./img/image.jpg' alt='Accurate description of the image which is read by the screen reader' tabindex=14> large block of text for reader</div>
</div>
</body>

by now every designer should have at least
@media screen
@media print
@media reader
@media handheld
stylesheets

almostbob 866 Retired: passive income ROCKS

The validator tells you what is wrong
fix them in order 1 - 51 and keep the fixed page as a template

Markup Validation Service
Check the markup (HTML, XHTML, …) of Web documents

Jump To: Validation Output
Errors found while checking this document as XHTML 1.0 Transitional!
Result: 51 Errors
To ensure your <hr> extends across the page use width=100%
obscenely large pixel measures just create scroll bars on the page

almostbob 866 Retired: passive income ROCKS

I have a frame breakout in succcess.page.php

<script type='text/javascript' language='javascript'>
  if (top.location != location) { 
 top.location.href = document.location.href ;
  }
</script>

or

<script type='text/javascript' language='javascript'>
if (parent.frames.length > 0) {
    parent.location.href = self.document.location
}
</script>

degrades badly if javascript disabled

almostbob 866 Retired: passive income ROCKS

as Guest I get no buttons
perhaps the desktop lost your cookie

almostbob 866 Retired: passive income ROCKS
//write text.php
// Get the user details.
$getdate = date( 'd-m-Y, H:i:s' );// Get the date.
$user_ip = $_SERVER['REMOTE_ADDR'];// Get the users IP.just in case
$referer = getenv("HTTP_REFERER");// Get the refering page. just in case
// Look for the text file and open it for writting.
$file = "./logfiles/logfile.csv";// define the text file. Note I am using a .csv file, it is still text but opens in excell for manipulation when I remember to check it
$fp = fopen($file, "a+");//open the text file for writing.
// Write into the text file.
fputs ($fp, "$user_ip,$getdate, $referer, $data1, \n"); //$data1 can be any number of data fields required to match the form,
fclose($fp);// Close the text file.

The scrap above can be appended to any php form and write to the texfile as part of the php form processing, checking IP and referrer helps reduce obvious dodgy entries.
Javasript on the user side, and php at the server, is pretty much AJAX, and can do really impressive things, the form handlers you look for may be for download at hotscripts, sourceforge, javascript.net or one of the other script repositories If(!$referer==$_SERVER['php_self']) die('data must submitted from the online form'); just crossed my mind assuming this is a self processed form (action='<?php echo $_SERVER; ?>')

almostbob 866 Retired: passive income ROCKS

How about a URL? What you posted is not a complete page, and may not appear the same as on your page (if anyone takes the trouble to copy it to a file).

of course its not a complete page,
its a code scrap
a css demonstration
tabulated layout without a table
If a person cant be bothered copy and paste, then *expletive deleted *
access to my source code ? I get paid for that

almostbob 866 Retired: passive income ROCKS
<style>
.b {width: 99%; }
.l {width:30%; float:left; text-align:right; margin-right:10px;}
.r {width:30%; float:right; text-align:left; margin-left:10px;}
</style>
<div class='b'>
<div class='l'>Prompt for input 1</div>
<input name='1' type='text'></div>
<div class='b'>
<div class='l'>Prompt for input 2</div>
<input name='1' type='radio' value='yes'>Yes <input name='1' type='radio' value='no' checked>No </div>
<div class='b'>
<div class='l'>Prompt for input 3</div>
<input name='3' type='password'></div>
<div class='b'>
<div class='l'>Prompt for input 4</div>
<textarea cols=60 rows=10 name='4'></textarea></div>
<div class='b'>
<div class='l'>Prompt for input 5</div>
<input name='5' type='radio' value='yes' checked>Yes <input name='5' type='radio' value='no'>No </div>
<div class='b'>
<div class='l'>Prompt for input 6</div>
<input name='6' type='text'></div>
<div class='b'>
<div class='l'>Prompt for submit</div>
<input type='submit' onclick="return confirm('Are you sure ?')"></div>
almostbob 866 Retired: passive income ROCKS

Serverside php asp perl using the same techniques used to generate captcha scripts
in php

header ("Content-type: image/png");
$im = @imagecreatetruecolor(500, 300)
    or die("Cannot Initialize new GD image stream");
$text_color = imagecolorallocate($im, 233, 14, 91);
imagestring($im, 3, 5, 5,  "A Simple Text String", $text_color);
imagestring($im, 3, 5, 45,  "A Second Text String", $text_color);
imagestring($im, 3, 5, 85,  "A Third Text String", $text_color);
imagepng($im);
imagedestroy($im);

The image strings can be data from the table output, the image can be sized to suit the number of lines of text output by adjusting the definitions $im = @imagecreatetruecolor(500, 40*$lines) The image generation is simply included as <img src='imagegenerator.php'> in a page, image generator can be set to parse parameters ?1=text1@2=text2, or can be the actual dbase processor

almostbob 866 Retired: passive income ROCKS

Have got to the bottom of the zip file,
the javascripts include IE dom,
there are a lot of DOM declaratives
the script may run on both IE and mozilla based browsers. but likely wont
on a non production run of the script edit out the if(!document.layers) { and the matching } and test in both browser platforms
check also if there is another line in the install instructions that specifies if(document.layers) { (no bash)
If the script fails to run there is some serious debugging involved in the existing script

THere are however cross browser compatible calendar scripts for filling date fields
I use this one
http://www.richarea.com/demo/rich_calendar/

No affiliation with the owner developer
no fee for promotion
no guarantee of suitablility given
fully examine and assess before including any suggested material.
My experience of this script is positive

almostbob 866 Retired: passive income ROCKS
ob_start("ob_gzhandler"); 
$p = split('/', $_SERVER['SCRIPT_FILENAME']);
	$script_name = $p[count($p)-1];
	$path = str_replace($script_name, '', $_SERVER['SCRIPT_FILENAME']);
	$dir_handle = @opendir($path) or die("Unable to open $path");
Function get_Extension($m_FileName){
 	$path_parts = pathinfo($m_FileName);
 	if ($path_parts["extension"]) {
 		$m_Extension = strtolower($path_parts["extension"]);
 		return(strtoupper($m_Extension));
 		}
 	else { return "unknown"; }
 }
function check_image($filename){
 $temp=strtoupper(get_Extension($filename));
 if(($temp=="NEWS")||($temp=="PHP"))
 return (true);
 else
 return (false);
 }
Function get_Files($path) {
 	if ($handle = opendir($path)) {	
 		while (false !== ($file = readdir($handle))) { 
 		if(!is_dir($file) && substr($file,O,1) != "."){				
				$m_Files[]=$file;
 			}
 		}
 closedir($handle); 
 	}
 if(sizeof($m_Files)>1)
 asort($m_Files);
 return $m_Files;
 }
 $files=get_Files($path); 
 $filter_files=array_filter($files,"check_image");
 $maxnr=sizeof($filter_files)-1;
 sort($filter_files);
for ($i=0;$i<sizeof($filter_files);$i++){
	echo "<a href='$filter_files[$i]'>";
	echo substr($filter_files[$i], 0, strlen($filter_files[$i])-4);
	echo "</a><br />";
 }
closedir($dir_handle); 
ob_flush();
almostbob 866 Retired: passive income ROCKS

if(!document.layers)

these fragments in the script above check for the browser to NOT be firefox
IF Not DOcument.layers continue = do nothing if document.layers
IE and mozilla based browsers
code sniippets below demonstrate different aproaches to show or hide a layer in IE and firefox

(document.getElementById) ? dom = true : dom = false; // IE check
function hideIt(layer) {
 if (dom) {document.getElementById(layer).style.visibility='hidden';} //ie
 if (document.layers) {document.layers[layer].visibility='hide';} } //firefox
function showIt(layer) {
 if (dom) {document.getElementById(layer).style.visibility='visible';} //ie
 if (document.layers) {document.layers[layer].visibility='show';} } //firefox

second if statement is redundant in each case, at the moment there are only two forms for document model,
slightly different. just enough that the code for one does not work with the other, standards compliance - grump grump grump
not sure why the original was not scripted to run on both, unless the author was only familiar with one
used with

<button onclick='showit("answer");'>Show more info</button>
<div name='answer' style='visibility:hidden;'>
the answer
more text 
<button onclick='hide it("answer");'>hide</button>
</div>
<button onclick='showit("answer2");'>Show more info about problem 2</button>
<div name='answer2' style='visibility:hidden;'>
the second answer answer
more text 
<button onclick='hide it("answer2");'>hide</button>
</div>

example code untested, just pulled it out of the air

I can only assume that the popup calendar defined elsewhare uses the IE Document model (DOM) to display as a hidden layer and or popup onclick, there shouldnt be much to recode the hidden/visible section of the code to be browser independent,(until somebody comes up with another document model) using the scraps above …

almostbob 866 Retired: passive income ROCKS
$output = bla blah bla; /* the data output from the background php page. I had to put SOMETHING here, */
$getdate = date( 'd-m-Y, H:i:s' );// Get the date.
$user_ip = $_SERVER['REMOTE_ADDR'];// Get the user IP, just in case.
$referer = getenv("HTTP_REFERER");// Get the refering page. just in case
$file = "./your path to logfile/logfile.csv"; /*define the file as required, csv opens easily in excell or imports to sql if REQ, but is really just a text file.*/
$fp = fopen($file, "a+"); //open the text file for writing.
// Write into the text file.
fputs ($fp, "$getdate, $user_ip, $referer, $output\n"); //see note after $output definition above
fclose($fp);// Close the text file.

create a blank text file logfile.csv (or whatever), this scrap is just an appendage to the existing page, not optimized, just an example, there can be any number of data fields to comprise $output

almostbob 866 Retired: passive income ROCKS

more than you can ever read, compiled so you can find the part you need to read
http://www.php.net/docs.php

almostbob 866 Retired: passive income ROCKS

pixel measurements, seriously suck,
table layout -suck, tables delay page display until everything is downloaded,

CSS layout, ems %ages

I have 2040 x 1536px resolution, 10px is invisible, the entire page does not occupy 10% of the screen
all sizes should be relative, in em or % so that the sizes adjust around the base font on the user's computer, and screen size.

For example Grandma has her base font set to 26px her eyes are bad, your 10px link text is a blurry blob, Granny goes to google to find a site she can read.

images should be scalable so that and be effective at
800*600 1024*768 1200*900 2040*1536,
with the window taking any proportion of the screen

the color/size change, dunno, the css specifies grey on mouseover, red, I am getting 50-50 for the link to be the wrong size in Opera, IE as well as safari, no consistent response in either, in IE its working some of the time

look at your page in a different view, a mobile phone browser

http://demo.opera-mini.net/demo.html?http://www.users.waitrose.com/~johnhathway/

almostbob 866 Retired: passive income ROCKS

php run serverside,
it has to refresh the page to display differently,
Javascript runs clientside php makes no changes once the page is sent, AJAX Javascript

almostbob 866 Retired: passive income ROCKS

Dont use popup that can be blocked
use a layer and have the javascript event change the layer's viisiblity
something like

<html>
<head>
<style>
.top { background-color: #000070; color: #ffffff; text-align: right; }
.bottom {  background-color: #efefef; padding: 15px; }
</style>
<script language="javascript" type="text/javascript">
<!--
(document.getElementById) ? dom = true : dom = false;
function hideIt() {
 if (dom) {document.getElementById("layer1").style.visibility='hidden';}
 if (document.layers) {document.layers["layer1"].visibility='hide';} }
function showIt() {
 if (dom) {document.getElementById("layer1").style.visibility='visible';}
 if (document.layers) {document.layers["layer1"].visibility='show';} }
onResize="window.location.href = window.location.href"
//--></script>
</head>
<body>
<button id="form" onClick="showIt();">Important Information</button>
<div id="layer1" style="position:fixed; left:20px; width:45%; top:20px; visibility:hidden;">
<div onClick="hideIt()" class="top">
<font Color="#ffffff"><Strong>Close</strong></font>
</div>
<div class="bottom">
blah blah bla<br>
Important info<br>
bla blah bla
</div>
</div>
</body>
</html>

there are two for each fuction, one IE one Mozilla

almostbob 866 Retired: passive income ROCKS

try taking out the \ from first line. They don't belong there anymore.

forehead slap moment, Sorry

almostbob 866 Retired: passive income ROCKS
echo $TEXT_MAIN;
almostbob 866 Retired: passive income ROCKS

Logial Correction, and statement of the obvious :icon_confused:

<?php 
/* 
logical construct depends on your data,,,
validate data entries, 
if valid 
 insert to mysql, 
 disable submit so data will not be aded to table twice, 
 or redirect to another page 
else
 echo feedback to user to explain what is right/wrong with the submitted data  before the form is resubmitted
*/  ?>
<form action='<?php iecho $_SERVER['PHP_Self']; ?>'>
<input type='text' name='field1' value='<?php if(isset($field1)){echo $field1; } ?>'>
<input type='text' name='field2' value='<?php if(isset($field2)){echo $field2; } ?>'>
<input type='text' name='field3' value='<?php if(isset($field3)){echo $field3; } ?>'>
<input type='text' name='field4' value='<?php if(isset($field4)){echo $field4; } ?>'>
<input type='submit' onclick="return confirm('Are all fields complete?')">
almostbob 866 Retired: passive income ROCKS

Not familiar with wordpress, but try

lots of crap to follow or <a href='#endcrap'>go to the end of the crap</a>
blah blah
blah blah
blah blah
blah blah
<span name='endcrap'>Still reading</span>

works in another hosted site, they disallow id and allow name

or you could use the wordpress --more-- tag and style it so that the page references are
read the crap >> skip the crap

almostbob 866 Retired: passive income ROCKS
<form action='<?php echo $_SERVER['PHP_Self']; ?>'>
<input type='text' name='field1' value='<?php if(isset($field1)){echo $field1; } ?>'>
<input type='text' name='field2' value='<?php if(isset($field2)){echo $field2; } ?>'>
<input type='text' name='field3' value='<?php if(isset($field3)){echo $field3; } ?>'>
<input type='text' name='field4' value='<?php if(isset($field4)){echo $field4; } ?>'>
<input type='submit' onclick="return confirm('Are all fields complete?')">

I like to add confirmation to the submit button, degrades ok with javascript disabled,

almostbob 866 Retired: passive income ROCKS
<?xml version=\"1.0\" ?>
<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1 EN "http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
<card>
<?php
require_once('./common/dblayer1.php');
$query = "select * from login";
$result = mysql_query($query);  
while ($row = mysql_fetch_array($result))  {  echo $row[0];  }
?> </card></wml>

maybe

almostbob 866 Retired: passive income ROCKS

Mysql

$query_Recordset1 = "SELECT admin_user, `update`, status, opened, `group` FROM phpdesk_tickets WHERE update between $date1 and $date2 ORDER BY `update` ASC";

and the date1 date2 fields are input from a html form, or calculated as date() -14 for two wekks

to change the sort order on the resulting table, can be done on the pc with a javascript sort, or on the server by calling the script again with different parameters passed to the sort order

the bees knees of sql
http://dev.mysql.com/doc/refman/5.1/en/

almostbob 866 Retired: passive income ROCKS

store dates as unix time stamp, then you can have any display you like, or have user option to display the date in their chosen format from the php date functions, and date manipulation is a simple add/subtract
a small portion of the potential market uses mm dd yyy
a portion uses dd mm yy
a portion does use yy mm dd

havent tested the sql,

if (!mysql_query(sprintf("UPDATE table SET date = mktime(0,0,0, substr(date, 5, 2),substr(date, 2, 2),substr(date, 0, 4));  "))); { return false; }
 return true;
almostbob 866 Retired: passive income ROCKS
almostbob 866 Retired: passive income ROCKS
<?xml version="1.0" ?>

xml declaration so the php should look something like

<?php
echo "<?xml version=\"1.0\" ?>";
echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\""
. " \"http://www.wapforum.org/DTD/wml_1.1.xml\">";
?>
<wml>
<card>
<?php /* declare script type short tags may be off other script languages may be available saves debugging later*/
require_once('./common/dblayer1.php');
$query = "select * from login";
$result = mysql_query($query);
  while ($row = mysql_fetch_array($result))  {  echo $row[0];  }
?> 
</card>
</wml>
<?php
header("Content-type: text/vnd.wap.wml");
echo " xml version=\"1.0\" ";
echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\""
. " \"http://www.wapforum.org/DTD/wml_1.1.xml\">";

?>
<wml>
<card>
<?
require_once('./common/dblayer1.php');
$query = "select * from login";
$result = mysql_query($query);
  while ($row = mysql_fetch_array($result)) 
  {
  echo $row[0];
  }
?> 
</card>
</wml>