I have a file called "newfile.txt" which has two lines of text in it
newfile.txt
Lights Turned on
Lights turned off
I have a javascript function which reads the text file and i can access the output through the variable called "status" (see below) and when i console log "status" I can see both the lines present in newfile.txt.
Javascript ( to read the text file)
var status;
function readTextFile1(file)
{
var rawFile = new XMLHttpRequest();
rawFile.open("GET", file, false);
rawFile.onreadystatechange = function ()
{
if(rawFile.readyState === 4)
{
if(rawFile.status === 200 || rawFile.status == 0)
{
status = rawFile.responseText;
}
}
}
rawFile.send(null);
}
readTextFile1("newfile.txt"); //calling the function
console.log(status);
Now the problem is, I need to use an if statement based on the text in each line
For example ( just my concept)
if ( status (line 1) = "Lights Turned Off" ){
do something
}
if ( status (line 2) = "Lights Turned On" ){
do something
}
Any help is appreciated. Thanks a lot for your time.
provigil dosage – generic provigil modafinil moa
accutane 20 mg daily – accutane singapore cost buy 40mg accutane online
generic amoxicillin at walmart – buy amoxicillina 500 mg online amoxicillin for humans for sale
buy vardenafil on line – ordering vardenafil online generic vardenafil online canada
stromectol 12 mg – stromectol tablets 3 mg ivermectin cream 1%
canadian pharmacy cialis 10mg – cost of tadalafil generic cialis brand name in india
ivermectin cream uk – ivermectina 6 mg buy stromectol 3mg
accutane 60 mg daily – accutane 40 mg price in india purchase accutane with paypal
generic lyrica medication – lyrica tablet cost canadian pharmacy generic cialis
order Amoxil – amoxpharm.com buy amoxicillin noscript canada
viagra 200mg price – viagra online no prescription canada buy cheap viagra online without prescription
cialis uk prescription – cialis united states can i buy cialis over the counter canada
buy ivermectin usa – ivercipills ivermectin without prescription
buying prednisone – prednisone 40 mg ordering prednisone
modafinil dosage – provigil settlement provigil generic
buy azithromycin 100mg – can you buy zithromax over the counter in canada order azithromycin 100mg
furosemide on line no prescription – furosemide lasix buy lasixonline
dating
daisy ridley dating
where to buy clomid – buy clomiphene 100mg online buy clomid
order viagra online australia – cheap generic viagra online sildenafil 200 mg online
gay celibacy dating
gay youth dating sites
gay dating savannah ga
herbal viagra reviews viagra phamacy stores in ohio ViagraCND100Mg – ggeneric viagra for sale
white men gay dating site
dating a gay korean
gay dating scams
gay triangle of dating meme
should i chase gay dating
[url=”http://gaychatus.com?”]argentina gay dating apo[/url]
Hey there! Someone in my Facebook group shared this website with us so I came to give it a look.
I’m definitely enjoying the information. I’m book-marking and will be tweeting this to
my followers! Terrific blog and amazing design and style.
Hello, I want to subscribe for this blog to take most recent updates,
therefore where can i do it please help out.
It’s perfect time to make some plans for the longer term and it
is time to be happy. I have read this submit and if I may just I
wish to counsel you few fascinating issues or advice.
Perhaps you can write next articles referring to this article.
I wish to learn even more issues about it!
I enjoy reading an article that will make people think.
Also, thank you for allowing for me to comment!
I think the admin of this site is in fact working hard in favor of his website, for the reason that here every data is quality based data.
gay closeted dating a girl
hairy gay dating
gay gym dating
What i don’t understood is in fact how you’re not actually much more smartly-favored than you may be right now.
You’re so intelligent. You realize therefore considerably relating to this topic, made me
in my view consider it from a lot of various angles. Its like women and men don’t seem to be interested until it is something to accomplish with Lady gaga!
Your own stuffs excellent. At all times deal with
it up!
amoxicillin for sale for humans 500 mg – amoxil 500 amoxicillin for sale uk
Very good info. Lucky me I came across your blog by accident (stumbleupon).
I’ve book-marked it for later!
Hello, i believe that i saw you visited my web site so i came to return the favor?.I am attempting to to find issues to
enhance my website!I assume its ok to use some of your
ideas!!
Hey very nice site!! Guy .. Excellent .. Superb .. I’ll
bookmark your blog and take the feeds also? I am
satisfied to find a lot of helpful info here within the submit, we need develop more strategies on this regard, thanks for sharing.
. . . . . quest bars http://j.mp/3jZgEA2 quest bars
Hi there just wanted to give you a quick heads up and let
you know a few of the pictures aren’t loading properly.
I’m not sure why but I think its a linking issue.
I’ve tried it in two different internet browsers and
both show the same outcome. scoliosis surgery https://0401mm.tumblr.com/ scoliosis surgery
I have been browsing online more than 2 hours today,
yet I never found any interesting article
like yours. It’s pretty worth enough for me. In my opinion, if all site owners and bloggers
made good content as you did, the internet will be much more useful than ever before.
ps4 games https://bit.ly/3z5HwTp ps4 games
middletown ny gay dating
adam and adam gay dating site
gay men dating
Hello there, You’ve done an excellent job. I will certainly digg it and personally suggest to my
friends. I’m confident they’ll be benefited from this site.
scoliosis surgery https://coub.com/stories/962966-scoliosis-surgery scoliosis surgery
uc abbreviation gay dating
male gay dating
dating a gay porn star quotes
can you buy doxycycline online – buy doxycycline from canada buy prednisolone 5mg
generic vardenafil canada – levitra 10mg best ed treatment pills
resume help nyc
resume help com
can i buy viagra in canada – buy pfizer viagra viagra for women otc
Hi! I’ve been following your weblog for a while now and finally
got the bravery to go ahead and give you a shout out from Humble Tx!
Just wanted to say keep up the good job! https://parttimejobshiredin30minutes.wildapricot.org/ part
time jobs hired in 30 minutes
thesis writer – need a paper written buy essay now
sildalis order – metformin 500mg uk buy glucophage 500mg generic
cheap acillin – order ampicillin 250mg generic buy hydroxychloroquine online cheap
What’s up friends, nice article and nice urging commented here, I am actually enjoying by these.
cheap sildenafil tablets – brand cialis cialis 5mg brand
acheter 100mg sildenafil – tadalafil 20mg pas cher cialis generique
ivermectin medicine – stromectol for humans ivermectin 400 mg brands
tetracycline 500mg oral – tetracycline 500mg pills citalopram 20mg ca
https://cialistrxy.com/ tadalafil price walmart
order tadalafil 10mg generic – order tadalafil 20mg generic ivermectin 500mg
side effects of tadalafil tadalafil order online no prescription
cialis without prescription https://cialisicp.com/
cialis cost tadalafil drug
tadalafil order online no prescription tadalafil generic where to buy
buy tadalis what is tadalafil
canada generic tadalafil buy cialis pills
where to get tadalafil tadalafil drug
buy tadalafil prescription tadalafil online
https://nextadalafil.com/ where to order tadalafil tablets
Great article.
I am truly grateful to the owner of this site who has shared this fantastic
piece of writing at here.
I’m extremely impressed together with your writing talents
as smartly as with the format in your blog. Is that this a paid theme or did you customize
it your self? Either way stay up the nice quality writing,
it’s rare to see a nice blog like this one these days..
Great article! We are linking to this particularly great article on our website.
Keep up the good writing.
Good blog you have got here.. It’s hard to find high-quality writing like yours these days.
I really appreciate people like you! Take care!!
I am regular visitor, how are you everybody?
This article posted at this web site is really pleasant.
Hi, after reading this amazing paragraph i am as well glad to share my know-how
here with friends.
You could certainly see your expertise within the article you write.
The world hopes for even more passionate writers like you who are not afraid to
mention how they believe. Always go after your heart.
If some one wants expert view about blogging and site-building after that i suggest him/her to visit this
web site, Keep up the fastidious job.
I was curious if you ever thought of changing the
structure of your site? Its very well written; I love what youve
got to say. But maybe you could a little more in the way of
content so people could connect with it better. Youve got an awful lot
of text for only having one or 2 pictures. Maybe you could space it
out better?
ivermectin 12mg generic ivermectin 12mg
stromectol canada buy ivermectin canada stromectol online canada
http://www.ivermectinoge.com/ ivermectin 6 mg
Hello there! This is my first comment here so I just wanted to
give a quick shout out and tell you I really enjoy reading
through your blog posts. Can you recommend any other blogs/websites/forums that deal with the same subjects?
Thank you!
What a data of un-ambiguity and preserveness of valuable
know-how regarding unpredicted feelings.
hey there and thank you for your information – I’ve definitely picked
up anything new from right here. I did however expertise some technical issues using this web site, as I experienced to reload the
website a lot of times previous to I could get it to load correctly.
I had been wondering if your web host is OK? Not that I am complaining,
but slow loading instances times will sometimes
affect your placement in google and could damage your quality score if ads and marketing with Adwords.
Anyway I’m adding this RSS to my e-mail and can look out for a lot
more of your respective exciting content. Make sure you update this again soon.