R
E
S
O
U
R
C
E
S
       Question Index      Products & Services      Contact Us      Links


WebHatchers will design & develop your site for you.
_______________________

Website Menu Heaven: side or top popup menus, buttons, image rotators, navbars, tons more.
_______________________

Send us your questions and wittiest comments.
_______________________

Report errors on our site.
_______________________

Share your neatest DHTML examples with us; we may publish them.
_______________________


_______________________

      QUESTION INDEX      

Question Index
Browser Insanity
JavaScript
Animation
Buttons and Menus
CSS and HTML
PHP
Personal Status Boards
Content Management
   Systems
Website Directory
   CMS Systems


 INFORMATIVE ARTICLES 

Menus-and-Buttons-
Part-I.htm


Menus-and-Buttons-
Part-II.htm


Change-Div-Size-Color-
and-Location-with-the-
W3C-DOM.htm


Bouncing-Ball-Animation-
with-the-W3C-DOM.htm


Style-Changes-with-the-
W3C-DOM.htm


Animation-with-the-
W3C-DOM.htm


Window-Play-and-Some-
Important-DOM-Methods.htm


Using-getElementsByTagName
-and-getElementsByName.htm


The-CSS-Resources-Intro-
Page.htm


Convert-Word-Files-to-HTML-
and-Install-Editor2-to-
Use-Instead-of-NotePad.htm


CSS-Issues.htm

What Are Fifteen Simple Methods of Doing Web-Page Pop-ups?

Security levels from Javascript and PHP input filtering

What is a regular expression general input validator?

What is a regular expression user name validator?

What is a regular expression password validator?

What is a regular expression email validator?

What is a regular expression URL validator?

How can I convert a Javascript array to a PHP array?

How can I Dynamically Create Input Boxes with Validation?

How do I use JavaScript Object Notation (JSON) in PHP and JavaScript to convert strings and arrays from PHP to JavaScript?

How do I add html to a web page with JavaScript, PHP or ssi includes?

How do I add html to a web page with JavaScript includes?


PHP

How do you put PHP variables in URL and link text?

What is PHP Code for Multiple PSB Hosts?

What is Registration PHP Code for Multiple PSB Hosts?

What is Registration PHP Code for Multiple PSB Hosts with a captcha?

What is Administrator PHP Code for Multiple PSB Hosts?

What's the PHP code for a script for a PSB?

What's the PHP code for a script for PSB updating?

What's the PHP code for a script if you forgot your user name?

What's the PHP code for a script if you forgot your password?

What's the PHP code for a script to change a member's email address?

What's the PHP code for a script to connect to a MySQL database?

What's the PHP code for a script to close a member's account?

What's the PHP code for a script to edit group member?

What's the PHP code for a script to add group member?

What's the PHP code for a script to reset a MySQL table's data to its original?

What's the PHP code for a script to edit a MySQL table's data?

What's the PHP code for a script to change a username?

What's the PHP code for a script to change a password?

What's the PHP code for a script to delete group member?

What's the PHP code for a script to view membership data?

What's the PHP code for a script to change an administrator's password?

What's the PHP code for a script to logout?

What's the PHP code for a script to login?

Security levels from Javascript and PHP input filtering

Security levels and PHP

How can I convert a Javascript array to a PHP array?

What is PHP Code to Prevent Duplicate Data Input - Like User Names or Members?

What is PHP Code for PSB Status Update for Multiple PSB Hosts?

How do I sort 1 PHP array and have the other arrays sort in parallel to how the first array sorts?

How do I use JavaScript Object Notation (JSON) in PHP and JavaScript to convert strings and arrays from PHP to JavaScript?

How do you do PHP-to-JavaScript String Conversion with No JSON?

How do you Convert PHP String to JavaScript String?

How do you Post a JavaScript Array to a PHP Array?

How do you send a value to PHP using JavaScript?

Info on unwanted primary field auto-sorting

How can I do instant article font size, font family, and paragraph formatting with radio buttons?

How can I create custom HTML tags that are safer for MySQL databases?

How can I edit text from MySQL databases by using a textarea box?

How can I highlight matched search terms in a MySQL database table search?

How can I search using not only exact phrase matching but also a series of words to match in a MySQL database table search?

What's the code for an Ajax and PHP Based Input Filter?

Ajax and PHP Based Insult Auto-Completer

How can I use PHP and MySQL for Checking Key Codes to Allow Update to a New Software App Version?




Personal Status Boards (PSB™)

Standard Free PSB

PSB Pro Version

Social PSB

Social PSB Plus (with Email)

Business PSB

Business PSB Plus (with Email)

PSB demo

Social PSB demo

Business PSB demo

So what's all this PSB stuff about?

Chart comparing business status boards

PSB hosting diagram

PSB Licence Agreement




Article Content Management System

Content Management System Introduction

Content Management System—Article Navigation

Content Management System—Article Indexing

Content Management System—Article Editing

Content Management System—Article Searching

Content Management System—Article Deleting

Content Management System—Article Writing

Content Management System—Article Reading

What are the terms of use for our Article Content Management System?




Website Directory Content Management System

Website Directory—Delete Category

Website Directory—Delete URL

Website Directory—Add URL

Website Directory—Add Category

Website Directory—Directory Creating

Website Directory—View by Category (Demo Code)

Website Directory—View by URL (Demo Code)

Website Directory—View by Category (Demo)

Website Directory—View by URL (Demo)

Website Directory—View

Website Directory—View (Demo)



Copyright © 2002 -
MCS Investments, Inc. sitemap

PSBs, social networking, social evolution, microcommunities, personal status boards
PSBs, social networking, business personal status boards
website design, ecommerce solutions
website menus, buttons, image rotators
Ez-Architect, home design software
the magic carpet and the cement wall, children's adventure book
the squirrel valley railroad, model railroad videos, model train dvds
the deep rock railroad, model railroad videos, model train dvds

Preserve a Variable Between Web Pages

If you have web pages with menus or variables or selections and you want to preserve what these are as you navigate amongst your web pages, you need something very special. You could use cookies but they may not be set to be "allowed." If you do use them, try to delete them as your site is exited. If you count on cookies for inter-page navigation, you may need to ask if they have cookies allowed—an embarrassing question reflecting on questionable programming abilities. Especially since there's an alternative. Even though if you have forms where visitors enter names or other data, and you want to be able to remember them the next time they visit, cookies are warranted, the same is not true about using cookies for navigation.

The following method takes a single character representing a choice or variable or menu selection and sends your visitor to one of your other web pages (webpage2.html) from your first web page (webpage1.html), but it remembers the choice/variable/menu selection.

Include any number of selections to choose from on page 1:

<div onClick="javascript:window.location.replace('webpage2.html?t');return true">Choose Top View</div>


<div onClick="javascript:window.location.replace('webpage2.html?c');return true">Choose Close-up View</div>


<div onClick="javascript:window.location.replace('webpage2.html?s');return true">Choose Side View</div>

Call this function from the body tag on page 2, replacing the backgrnd() function with your own:

function fix(){m = location.search.substr(1).split("?");if(m=='t'){backgrnd('b')};if(m=='s'){backgrnd('c')};if(m=='c'){backgrnd('d')}

The body tag:

<body onload='fix()'>


Note that even if the choices you want to preserve are words like "Blue" or phrases like "The Shadow of Your Smile," a single character can do it, since in the second page you can retrieve the whole phrase by just having an array of strings that contain the phrases, and your variable can be the array element number.

Nutty as it sounds, you need to do it differently for more than one variable, due to problems with window.location being interpreted as a property that doesn't like to be parsed as a string, rather than being interpreted as a text string that doesn't mind being parsed as a string. Below is the code, in which adding an empty string does the convert-to-string trick. Split() is a method to break a string into 2 or more array elements. In our case, the first is the url address that we don't need, and the latter element is the data after the "?". Use the second array element, q[1], since it contains the 2 variables. It turns out when you're only messing with one character, you don't have to mess with the arrays. Go figure. So here's the code for getting the variables out of the url address:

x=window.location+"";q = x.split("?");r=q[1];f=r.charAt(0);m=r.charAt(1);

The code for adding the variables to the url address is the same as for the 1-variable method except for the need to choose which values to include according to the current variable's value.


<div onClick="javascript:backgrnd('b');if(f=='m'){window.location.replace('squirrel-valley-railroad.htm?mt')}else{window.location.replace('squirrel-valley-railroad.htm?wt')};return true">Choose Top View</div>


<div onClick="javascript:backgrnd('b');if(f=='m'){window.location.replace('squirrel-valley-railroad.htm?ms')}else{window.location.replace('squirrel-valley-railroad.htm?ws')};return true">Choose Side View</div>


<div onClick="javascript:backgrnd('b');if(f=='m'){window.location.replace('squirrel-valley-railroad.htm?mc')}else{window.location.replace('squirrel-valley-railroad.htm?wc')};return true">Choose Close-up View</div>