Numbers Guessing Game
Your Numbers Game
Get
clueYour
answerYour
ScoreClue? Score 0/0
-
Recent Posts
- PHP Exif Quiz Geographicals Tutorial
- PHP Exif Quiz Tutorial
- PHP Exif Retention off iPhone Images Tutorial
- List to Grid Layout CSS Media Query Tutorial
- List to Grid Layout Primer Tutorial
- Out and About WordPress Blog Content Tweaks Just with iPhone Tutorial
- Command Line History By Date Tutorial
- Overseas Travel Global Roaming Mobile Primer Tutorial
Categories
- Ajax
- Android
- Animation
- Anything You Like
- Code::Blocks
- Coding
- Colour Matching
- Data Integration
- Database
- Delphi
- Eclipse
- eLearning
- ESL
- Event-Driven Programming
- Games
- GIMP
- GUI
- Hardware
- Installers
- iOS
- Land Surveying
- Moodle
- Music Poll
- NetBeans
- Networking
- News
- Not Categorised
- OOP
- Operating System
- Photography
- Projects
- Signage Poll
- Software
- SpectroPhotometer
- Tiki Wiki
- Trips
- Tutorials
- Uncategorized
- Visual Studio
- Xcode
Meta
Tags
Ajax animation background button canvas command line CSS Did you know DOM dropdown email emoji event form game Google Google chart hashtag HTML IFRAME image iOS Javascript MAMP media mobile navigation onclick overlay PHP popup programming select share sharing SMS SVG table text textarea tutorial url video web browser webpageYour Background Image
OnTopList
Tag Archives: innerHTML
WordPress Blog ISBN Links Primer Tutorial
When you are tailoring a WordPress blog, using the “edit header.php” principles we use so much here, at this blog, different aims coalesce on shared Javascript function intervention points, just about all associated with document.body onload event intervention, we most often find, and today’s “create ISBN (International Standard Book Number) helper links” (courtesy of ISBN Search website, thanks) calls on the previous WordPress Blog Complex Selectors Tutorial‘s same Javascript function intervention point. “Sisters of code”. Why might these two quite disparate aims meet at our WordPress blog’s (homegrown) Javascript function checkonl() { … } entry point? For us, doing the changes today, we knew that … we wanted to intervene at document.body onload event … all easy and good there … and then … we wanted to scour the [htmlElement].innerHTML (and today [htmlElement].textContent is also useful) of all HTML p (paragraph) elements looking for our “ISBN:” habitual flaggings of referring to a book (but not having already established an a link regarding it) … so … we looked in WordPress theme TwentyTen’s header.php for mentions of (the ilk) … var arrayVar=document.getElementsByTagName(‘p’); … and so it came to pass that function checkonl() { … } was the best place to “share” interventional (document.body onload event) Javascript (client) code. Now with a lot of jobs, that is the most “telling” thing to establish, and yes, it is somewhat “telling” today too, but more on the scale that we “go tell it on a moun-tainmole-hill” because doing a linking “after the event” can be difficult not so much for the … ISBN: [ISBN number] habit we have, that is easy to track … but working backwards to attempt to find … by [author list] … and/or … thanks to [book title] … eg. Thanks to WordPress Web Design for Dummies, 3rd Edition by Lisa Sabin-Wilson ISBN: 978-1-1190886-4-6 … is so much harder to track, though resorting to [htmlElement].textContent property can help, sometimes. It’s one of those jobs that you do your best, but do not act (to create the new link) if the result is uncertain (especially because there is no harm done not having the link). Bits of function checkonl() { … } changed as below … function checkonl() { var bisi=[-1], iisi=[-1], pisi=[-1], jbisi=0, jiisi=0, jpisi=0, iourps; var ourps=document.getElementsByTagName(“b”); for (iourps=0; iourps<ourps.length; iourps++) { if (ourps[iourps].innerHTML.replace(/<p>/g,””).replace(/<i>/g,””).replace(/<b>/g,””).replace(/<\/p>/g,””).replace(/<\/i>/g,””).replace(/<\/b>/g,””) == “Did you know?”) { bisi[jbisi]=iourps; jbisi++; bisi[jbisi]=-1; } else if (ourps[iourps].innerHTML.replace(/<p>/g,””).replace(/<i>/g,””).replace(/<b>/g,””).replace(/<\/p>/g,””).replace(/<\/i>/g,””).replace(/<\/b>/g,””) == “Stop Press”) { bisi[jbisi]=iourps; jbisi++; bisi[jbisi]=-1; } } ourps=document.getElementsByTagName(“i”); for (iourps=0; iourps<ourps.length; iourps++) { if (ourps[iourps].innerHTML.replace(/<p>/g,””).replace(/<i>/g,””).replace(/<b>/g,””).replace(/<\/p>/g,””).replace(/<\/i>/g,””).replace(/<\/b>/g,””) == “Did you know?”) { iisi[jiisi]=iourps; jiisi++; iisi[jiisi]=-1; } else if (ourps[iourps].innerHTML.replace(/<p>/g,””).replace(/<i>/g,””).replace(/<b>/g,””).replace(/<\/p>/g,””).replace(/<\/i>/g,””).replace(/<\/b>/g,””) == “Stop Press”) { iisi[jiisi]=iourps; jiisi++; iisi[jiisi]=-1; } } ourps=document.getElementsByTagName(“p”); for (iourps=0; iourps<ourps.length; iourps++) { if (ourps[iourps].innerHTML.replace(/<p>/g,””).replace(/<i>/g,””).replace(/<b>/g,””).replace(/<\/p>/g,””).replace(/<\/i>/g,””).replace(/<\/b>/g,””) == “Did you know?”) { pisi[jpisi]=iourps; jpisi++; pisi[jpisi]=-1; } else if (ourps[iourps].innerHTML.replace(/<p>/g,””).replace(/<i>/g,””).replace(/<b>/g,””).replace(/<\/p>/g,””).replace(/<\/i>/g,””).replace(/<\/b>/g,””) == “Stop Press”) { pisi[jpisi]=iourps; pisi[jpisi]=iourps; jpisi++; pisi[jpisi]=-1; } else if (ourps[iourps].innerHTML.toUpperCase().indexOf(“ISBN:”) != -1) { var isbnis=”, jisbn=0, okays=”-0123456789″, preis=[]; if (ourps[iourps].innerHTML.toUpperCase().indexOf(“ISBN: “) != -1) … Continue reading
Posted in eLearning, Event-Driven Programming, Tutorials
Tagged blog, book, DOM, event, function, innerHTML, ISBN, Javascript, link, onload, paragraph, PHP, programming, textContent, tutorial, TwentyTen, TwentyTen theme, Wordpress
Leave a comment


Thanks. Since then, a Shower Songs project at https://www.rjmprogramming.com.au/HTMLCSS/shower_songs.html is an improvement regarding "Radio Play" on mobile platforms.