HTML Password Protection. There’s no way to put password protection in a webpage via HTML commands, but it can be done with a simple javascript available from HTML Goodies. Here is how I got it to work. Take the code and replace the password (peppermint) and the web page address (scripttip73correct.html) with your own names. Then put the code into the file that’s publicly linked. Clicking on the link will take people to the script code file, and if they get the password right it passes them on to the file you’re protecting. This protection method is not very strong, since the password is written in the file, but it is pretty easy at least.
Archive
Clicking to Expand Concealed Text in HTML
Arvind Satyanarayan’s “Toggle Visibility – Show/Hide Anything” is worth knowing about. (Click here to read more.)
<!– Arvind Satyanarayan script added by John Smith on Oct XX, 20XX. –>
<script type=”text/javascript”>
<!–
function toggle_visibility(id) {
var e = document.getElementById(id);
if(e.style.display == ‘block’)
e.style.display = ‘none’;
else
e.style.display = ‘block’;
}
//–>
</script>
Then, to display “(Click here to read more.)” and have “Here is where all the rest of the post would go.” display when “(Click here to read more.)” is clicked (or concealed when it is clicked again), insert
<a href=”#” onclick=”toggle_visibility(’07oct2′);”>(Click here to read more.)</a>
<div id=”07oct2″ style=’display:none’>
Here is where all the rest of the post would go.
</div>
You can insert as many of these as you like in one file, with just one insertion of the script, so long as you give distinct titles, not “07oct2” to the second and later concealed sections.
Writings of Possible Interest
Recent Posts
- What Does It Mean for a Replication To Be Successful?
- If Trump Paid a Stripper To Be Quiet, Is That a Campaign Expenditure?
- The Acting Attorney-General Problem
- (no title)
- The Slayer Rule and Birthright Citizenship
- Notes from the FTC Micro Conference, Nov. 2018
- The Christian and Politics—Bainbridge, Stuntz, Bayly,and Pope Paul
- The 2018 EU Holding that a Country Can Make It a Crime to Criticize Islam (E.S. v. Austria)
- Don’t Use Bad Language
- Indiana University’s Kelley School of Business Students Are Almost As Good As Harvard Students
- The Ted Hill Male Variability Paper that the Math Journals Suppressed
- FBI’s Comey, Martha Stewart, and the Richmond African-American Minister
- Mueller’s Indictment of the 13 Russians: Huffing and Puffing with No Substance
- End the State and Local Tax Deduction for Businesses
- Reforming the FISA Court: A Second Post on the Public Defender Idea
Categories
Archives
Blogroll
vzxcvxcvcx
Categories
- a.research
- abortion
- academia
- Academia: Anti-conservative bias
- accounting
- agenda control
- Agents Provocateur
- AIDS
- army
- art
- authority
- bailout
- bailouts
- banking crisis
- bankruptcy
- banks
- bargaining
- beauty
- blogger
- blogging
- Bloomington
- books
- bureaucracy
- Bush
- business
- buying
- CEOs
- charity
- children
- christmas
- CIA
- civil rights
- climategate
- clinton
- clothing
- Companies
- competence
- computer
- computers
- consensus
- conservatism
- conservatives
- corruption
- Countries
- crime
- Daniels
- Data
- Dawkins
- decisions
- dissident
- divorce
- dodd
- downloads
- drink
- Economics
- economsits
- education
- elitism
- environmentalism
- ethics
- evolution
- experiments
- feminism
- flag burning
- food
- foreign policy
- fossils
- free speech
- freedom
- frequentist
- g406
- games
- Geneva conventions
- global warming
- good days
- government
- group selection
- handwriting
- harding
- health
- health care
- hillary
- history
- Holder
- holidays
- homosexuality
- HTML
- Huckabee
- humor
- i.o.
- Iceland
- ideas
- immigration
- india. terrorism
- Indiana University
- inspector-general
- intelligent design
- international economics
- internet
- inventions
- IQ
- Iraq
- IRS
- Israel
- Japan
- javascript
- jokes
- Kennedy
- Kmiec
- law
- law professors
- law. politics
- lawyers
- Learning
- liberalism
- liberals
- libertarians
- life
- living
- lobbying
- lying
- magic
- Major Hasan
- management
- maps
- Martin Luther King
- math
- media
- medicine
- Methodists
- microsoft
- middle east
- monopoly
- morality
- movies
- mushrooms
- music
- natural design
- naturalism
- nature
- New York Times
- nonprofits
- Northern Rock
- notation
- obama
- Obama's broken promises
- obscenity
- OLC
- op-eds
- organization
- Oxford
- pace
- palestine
- Paley
- palin
- pardons
- parks
- parties
- pascal's wager
- People
- personal
- philosophy
- phthalates
- picture
- Places
- poems
- poetry
- police
- political philosophy
- politics
- polls
- poltical economy
- prayer
- precautionary principle
- presidents
- price theory
- procedure
- prosecutors
- publishing
- quizzes
- quotations
- race
- reading
- Reagan
- recession
- regulation
- religion
- religion thinking humor
- religions
- republicans
- reputation
- research
- restaurants
- reviews
- Roman Catholicism
- Roman Catholics
- Rush Limbaugh
- Sailer
- schools
- science
- settlements
- sin
- social regulation
- social regulation. political philosophy
- software
- sotomayor
- spam
- st
- statistics
- stevens
- stigma
- stimulus
- Strauss
- straussians
- surplus. social regulation
- takings
- taxes
- teaching
- technology
- terrorism
- tests
- Thanskgiving
- theology
- thinking
- Tiller
- to-do
- torture
- tourism
- translation
- travel
- typesetting
- Uncategorized
- unions
- United Nations
- univerities
- universities
- vote fraud
- votes
- voting
- walpin
- walprin
- war
- weblogs
- webpages
- wilson
- words
- writing
- writing. mathematics
- Wycliff Hall
Recent Comments