can help me i have no idea this html

html
No description
52 Replies
Judy
Judy2y ago
This is the JS portion of the HTML page not HTML it self
IAM
IAMOP2y ago
hm? what js? are you sure about that js?
Judy
Judy2y ago
JAVASCRIPT
Jochem
Jochem2y ago
I think it's the entire thing, it's all enclosed in an HTML tag what's your question exactly? @IAM
IAM
IAMOP2y 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
MarkBoots2y ago
it is reading a file and those are the chars
IAM
IAMOP2y ago
but select file ya so what i do?
MarkBoots
MarkBoots2y ago
what do you want it to do?
IAM
IAMOP2y ago
sec
IAM
IAMOP2y ago
it's correct?
IAM
IAMOP2y ago
weird...
No description
Jochem
Jochem2y 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
IAMOP2y ago
ya it's puzzle but the script i'm just new little
Jochem
Jochem2y 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
IAMOP2y 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
MarkBoots2y ago
what should it look like then? the code is doing what it should do imo. What is 'weird'?
IAM
IAMOP2y ago
No description
IAM
IAMOP2y 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
MarkBoots2y ago
yea, the file is read into result. then from that result it takes the [index] character and adds it to the page
IAM
IAMOP2y ago
what i do?
MarkBoots
MarkBoots2y ago
I don't understand. It does what it does. What do you want it to be
Jochem
Jochem2y ago
if you're having trouble explaining in English, try using google translate.
IAM
IAMOP2y ago
bad transalte the problem lol
MarkBoots
MarkBoots2y ago
what is your native language?
IAM
IAMOP2y ago
arabic
IAM
IAMOP2y ago
IAM
IAMOP2y ago
it's was correct?
Jochem
Jochem2y ago
we can't tell you if it's correct, because we don't know what you expect your code to do
MarkBoots
MarkBoots2y ago
where are you getting this code/puzzle from?
IAM
IAMOP2y ago
puzzle
Jochem
Jochem2y ago
can you link to the puzzle?
IAM
IAMOP2y ago
this image .
Jochem
Jochem2y ago
that image doesn't explain what you are asking
IAM
IAMOP2y ago
i know but no explain
Jochem
Jochem2y ago
if you can't explain, we can't help
IAM
IAMOP2y ago
how the fix this problem
Jochem
Jochem2y ago
what problem?
IAM
IAMOP2y ago
No description
MarkBoots
MarkBoots2y 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
Jochem2y ago
but aren't they already in the right place in this file?
MarkBoots
MarkBoots2y ago
no it's placed after the .onload, not inside
IAM
IAMOP2y ago
oh so i want add morecode.js?
Jochem
Jochem2y ago
oh, good spot!
MarkBoots
MarkBoots2y ago
also they used content instead of result where the //insert is, that's were it needs to be
IAM
IAMOP2y ago
the link
MarkBoots
MarkBoots2y 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
IAMOP2y ago
bruh lag?
IAM
IAMOP2y ago
No description
MarkBoots
MarkBoots2y ago
yea, probably it is a large file and you are doing a lot of actions
IAM
IAMOP2y 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
MarkBoots2y ago
i cleaned up your code a bit, hope it helps. But that's all i can do
IAM
IAMOP2y ago
OH TY THAT'S WORKS :d cya ❤️ tysm 😄 ty man

Did you find this page helpful?