can help me i have no idea this html

html
No description
52 Replies
Judy
Judy5mo ago
This is the JS portion of the HTML page not HTML it self
IAM
IAM5mo ago
hm? what js? are you sure about that js?
Judy
Judy5mo ago
JAVASCRIPT
Jochem
Jochem5mo ago
I think it's the entire thing, it's all enclosed in an HTML tag what's your question exactly? @IAM
IAM
IAM5mo ago
fileDisplayArea.innerText += result[42543]; fileDisplayArea.innerText += result[40846]; fileDisplayArea.innerText += result[7901]; fileDisplayArea.innerText += result[15535]; fileDisplayArea.innerText += result[27172]; fileDisplayArea.innerText += result[20833];
MarkBoots
MarkBoots5mo ago
it is reading a file and those are the chars
IAM
IAM5mo ago
but select file ya so what i do?
MarkBoots
MarkBoots5mo ago
what do you want it to do?
IAM
IAM5mo ago
sec
IAM
IAM5mo ago
it's correct?
IAM
IAM5mo ago
weird...
No description
Jochem
Jochem5mo ago
that's not really a question we can answer. Does it run? Do you get any errors? Does it do what you want it to?
IAM
IAM5mo ago
ya it's puzzle but the script i'm just new little
Jochem
Jochem5mo ago
what is your question exactly? what you shared will sure do something, I suppose. But I don't understand what you expect anyone to do or say about this code
IAM
IAM5mo ago
but i tired not working the coding weird bc reader.readAsText(file); fileDisplayArea.innerText += result[42543]; fileDisplayArea.innerText += result[40846]; fileDisplayArea.innerText += result[7901]; fileDisplayArea.innerText += result[15535]; fileDisplayArea.innerText += result[27172];
MarkBoots
MarkBoots5mo ago
what should it look like then? the code is doing what it should do imo. What is 'weird'?
IAM
IAM5mo ago
No description
IAM
IAM5mo ago
sorry i'm little english the morecode.txt fileDisplayArea.innerText += result[42543]; fileDisplayArea.innerText += result[40846]; fileDisplayArea.innerText += result[7901]; fileDisplayArea.innerText += result[15535]; fileDisplayArea.innerText += result[27172]; fileDisplayArea.innerText += result[20833]; fileDisplayArea.innerText += result[7568]; fileDisplayArea.innerText += result[28893]; fileDisplayArea.innerText += result[6269]; fileDisplayArea.innerText += result[37279]; the long
MarkBoots
MarkBoots5mo ago
yea, the file is read into result. then from that result it takes the [index] character and adds it to the page
IAM
IAM5mo ago
what i do?
MarkBoots
MarkBoots5mo ago
I don't understand. It does what it does. What do you want it to be
Jochem
Jochem5mo ago
if you're having trouble explaining in English, try using google translate.
IAM
IAM5mo ago
bad transalte the problem lol
MarkBoots
MarkBoots5mo ago
what is your native language?
IAM
IAM5mo ago
arabic
IAM
IAM5mo ago
IAM
IAM5mo ago
it's was correct?
Jochem
Jochem5mo ago
we can't tell you if it's correct, because we don't know what you expect your code to do
MarkBoots
MarkBoots5mo ago
where are you getting this code/puzzle from?
IAM
IAM5mo ago
puzzle
Jochem
Jochem5mo ago
can you link to the puzzle?
IAM
IAM5mo ago
this image .
Jochem
Jochem5mo ago
that image doesn't explain what you are asking
IAM
IAM5mo ago
i know but no explain
Jochem
Jochem5mo ago
if you can't explain, we can't help
IAM
IAM5mo ago
how the fix this problem
Jochem
Jochem5mo ago
what problem?
IAM
IAM5mo ago
No description
MarkBoots
MarkBoots5mo ago
think i got it. he wants to know where to place those fileDisplayArea.innerText += lines
<!DOCTYPE html>
<html>
<head>
<title>File Reader</title>
</head>
<body>
<h2>Select a text file:</h2>
<input type="file" id="fileInput">
<pre id="fileDisplayArea"></pre>

<script>
window.onload = function() {
var fileInput = document.getElementById('fileInput');
var fileDisplayArea = document.getElementById('fileDisplayArea');

fileInput.addEventListener('change', function(e) {
var file = fileInput.files[0];
var reader = new FileReader();

reader.onload = function(e) {
result = reader.result;
fileDisplayArea.innerText += result[42543];
/// the rest of the lines

};
reader.readAsText(file);
});
};
</script>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<title>File Reader</title>
</head>
<body>
<h2>Select a text file:</h2>
<input type="file" id="fileInput">
<pre id="fileDisplayArea"></pre>

<script>
window.onload = function() {
var fileInput = document.getElementById('fileInput');
var fileDisplayArea = document.getElementById('fileDisplayArea');

fileInput.addEventListener('change', function(e) {
var file = fileInput.files[0];
var reader = new FileReader();

reader.onload = function(e) {
result = reader.result;
fileDisplayArea.innerText += result[42543];
/// the rest of the lines

};
reader.readAsText(file);
});
};
</script>
</body>
</html>
Jochem
Jochem5mo ago
but aren't they already in the right place in this file?
MarkBoots
MarkBoots5mo ago
no it's placed after the .onload, not inside
IAM
IAM5mo ago
oh so i want add morecode.js?
Jochem
Jochem5mo ago
oh, good spot!
MarkBoots
MarkBoots5mo ago
also they used content instead of result where the //insert is, that's were it needs to be
IAM
IAM5mo ago
the link
MarkBoots
MarkBoots5mo ago
i think so. again we have no idea what this exactly is. we can not press on a link in a screenshot and we don't know what this is or has to do
IAM
IAM5mo ago
bruh lag?
IAM
IAM5mo ago
No description
MarkBoots
MarkBoots5mo ago
yea, probably it is a large file and you are doing a lot of actions
IAM
IAM5mo ago
HMM
__XXXXXXXXXXXX |# A D._XXXX1___XXXXXX |0 YOSEMITE PICTURES BOARD MEETING._XX2X_XXXXXXXXX |1 CHOP-CHOP LOVERS NIGHT LIGHT._XX_X_XXXXXXXXX |2 CHEESY DOUGH.34__X_XXXXXXXXX |3 ARCH SUPPORT.X_X5____6XXXXXX |4 FIRST NUMBER.7___X_XX_XXXXXX |5 HELLBOUND.X_X_X_XX_XXXXXX |6 TERRIBLE FATE.X_X8__9__AXXXXX |7 CHUCK'S HERD.X_XXXX_XX_XXBXX |8 BACKGROUND GUESTS.XXXXXX_XX_XX_XX |9 A BIG-EARED FLIER.XXXXXXC___XD__E |A THEY STAND FOR SOMETHING.XXXXXX_XX_XX_X_ |B LONG LASTING COLD.XXXXXXXXX_XX_X_ |C OOZING MOVIE MONSTER.XXXXXXXXXF_____ |D VOLCANIC FEATURE. |E PITCHED CANVAS. |F TYPE OF FILM
__XXXXXXXXXXXX |# A D._XXXX1___XXXXXX |0 YOSEMITE PICTURES BOARD MEETING._XX2X_XXXXXXXXX |1 CHOP-CHOP LOVERS NIGHT LIGHT._XX_X_XXXXXXXXX |2 CHEESY DOUGH.34__X_XXXXXXXXX |3 ARCH SUPPORT.X_X5____6XXXXXX |4 FIRST NUMBER.7___X_XX_XXXXXX |5 HELLBOUND.X_X_X_XX_XXXXXX |6 TERRIBLE FATE.X_X8__9__AXXXXX |7 CHUCK'S HERD.X_XXXX_XX_XXBXX |8 BACKGROUND GUESTS.XXXXXX_XX_XX_XX |9 A BIG-EARED FLIER.XXXXXXC___XD__E |A THEY STAND FOR SOMETHING.XXXXXX_XX_XX_X_ |B LONG LASTING COLD.XXXXXXXXX_XX_X_ |C OOZING MOVIE MONSTER.XXXXXXXXXF_____ |D VOLCANIC FEATURE. |E PITCHED CANVAS. |F TYPE OF FILM
lol weird the last xd
MarkBoots
MarkBoots5mo ago
i cleaned up your code a bit, hope it helps. But that's all i can do
IAM
IAM5mo ago
OH TY THAT'S WORKS :d cya ❤️ tysm 😄 ty man