multiple scripts across multiple pages
Hi Everybody,
I have in mind to establish a "Log-In" and "Sign-Up" link on each page of a site. Lets say there are 8 different pages in the site.
Can I link all 8 "Log-In"s to a single script, or will I need to duplicate the "Log-In" script on each of the eight pages?
Re: multiple scripts across multiple pages
Paul, it depends.
It the log-in has a visual impact on the page presentation, you need a Placeholder for each page.
If not, it can be added to the Website Head or Body.
I can imagine adding 1,000 login pages and some code to put a different password in each login. great for password hacking or denial of service but possibly frowned on by the White Hat bunch.
My solution is simpler. Have a separate page for the login.
When the login is a success, JavaScript to go back to the original page.
Otherwise, you could set up a Layer on each page with a Placeholder that goes to the separate login page, avoiding any scripting.
The question arises, how are you storing the password credentials? Usually, you would require a server-based password manager function.
What I might instead do is use the sign-up to be an email request that hits an autoresponder.
This replies with a web link, where on accessing, a Local Storage variable is set.
Back on your website, a Website Head code checks for the presence of the LS variable and suppresses all subsequent Sign-up/Logins.
The "sign-up" is particular to the used browser.
You gain a collection of emails...
Ideally, you need to fully describe your User Stories.
Acorn