I should mention that I'm working on a Bible app for iPhones and iPads. Not for a web site. I agree that infinite scrolling May not be applicable for a regular site. Some of the Bible books are quite large (500kb+) and takes a few seconds to load. This is especially noticeable on older iPhones...
@jpadie
Ok, here'es my code I've tried so far. I've out the JS code in the beginning of the body tag with a div to load the previous file and a link to do that. But it doesn't load the previous file.
<!doctype html>
<html lang="en">
<head>
<meta http-equiv="Content-Type"...
@Chris
I think infinite scrolling is quite ingenious, especially if you have a long text in HTML on a mobile device that needs to be displayed. Mobile device have lesser CPU power than a computer and therefore loading a big HTML file takes time. But dividing it into chunks allows for much faster...
Hello.
I'm looking for a way to have infinite scrolling work both up and down. Presently the code below only works when you scroll down, meaning it shows the next html file, index3.html, when scrolling to the bottom. But let's say that my web page starts with index2.html, then I'd like to...
@LKBrwnDBA
Good point. Here's the additional information:
The 3rd file, fileC.txt, contains the same keys. So how can I adopt the awk code in the second post to accommodate 3 or more files with the same keys, "LANG_XX" etc.?
fileA.txt:
"LANG_AJ" = "azerbejdżański (alfabet grażdanka)"...
Hi PHV.
Just returning briefly to this topic.
What if I have more than 2 files that need to be merged using this awk command. I tried the below, but that will always only take 2 of the 3 files.
awk 'NR==FNR{t[$1]=$0;next}{print $0"\n"t[$1]}' fileC.txt fileB.txt fileA.txt
Yep, PHV! Thanks a million. It works! It doesn't sort the final list alphabetically, but according to the list of fileA.txt
This helps me avoid having to do this manually!
Could you explain the awk code?
Philip
Hello.
I'm looking for a way to merge 2 files, and have the final file sorted according to how the list is set up in fileA.txt, the master file, like described below. Can it be done with AWK?
fileA.txt:
"LANG_AJ" = "azerbejdżański (alfabet grażdanka)";
"LANG_BS" = "basa (Kamerun)";
"LANG_BQ" =...
...for others ... to make sense of it. The idea is that whenever you tap the number (in this case '18') the function gets the text but removes the '*' and the '+* signs. I'm using this code in my iOS app: it gets the text and displays it in a text view.
<b id="17:18"...
Thanks jpadie.
The script still works but now it doesn't remove those ID's. My complete code is:
function getText(what)
{
var result = ''
for (var i = 0, l = what.childNodes.length; i < l; i++)
if (what.childNodes[i].nodeType == Node.TEXT_NODE)
result +=...
thread216-1705590
@feherke
Some time ago you helped me removing a character from a text inside a div element. That works great, but now I need to have 2 characters removed with an ID value of 'mr' and 'fn' respectively. Please see the thread linked to with the working code of removing 1...
@jpadie
Thanks for the code. I got it to work just fine. I've tested the code in Safari and Chrome and it works great. The plan is to include it in one of my iOS apps running mobile safari; its webview. I nested the function in a window.onload=function(){}, just in case others were wondering...
Hello.
How do I find and replace a string with a specific starting value?
I have this text:
xx
xx
xx
and would like to replace it with:
0
1
2
My awk code is contained in my regex.awk file and run from my Mac's Terminal. This code works fine but it starts replacement at value '1' and I want...
Hello.
I have some text that is nested within custom named tags, 'vs', and preceded by a bold tag with their own id. Now, I'd like to get the id of the 'b' tag when clicking any link in the 'vs' tags. Example, if I click on the first, second, or third link I'd like to get the id "2:1" and if I...
Hello.
The Javascript code below searches for any word in an HTML file entered into a textfield. Now, the text that needs to be searched through contains special characters like the apostrophe and dot in this sample text: "And the tribe of Zeb′u·lun."
If I type Zebulun with no special...
Thanks Feherke. That worked!
Just a another question: in the vs tag there are sometimes included a plus sign for a cross reference. I don't want to include that in the extraction. It is doing that now. I thought the original code in my first post would handle that and not include the plus...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.