can help me i have no idea this html

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