Skip to content
MPGHThe Dark Arts
/
RegisterLog in
Forum
Community
What's NewLatest posts across the boardTrendingHottest threads right nowSubscribedThreads you follow
Discussion
GeneralIntroductionsEntertainmentDebate FortFlaming & Rage
Board
News & AnnouncementsMPGH TimesSuggestions & HelpGiveaways
More Sections
Art & Graphic DesignProgrammingHackingCryptocurrency
Hacks & Cheats
Games
ValorantCS2 / CS:GOCall of Duty / WarzoneFortniteApex LegendsEscape From Tarkov
+14 moreLeague of LegendsGTA VMinecraftRustROTMGBattlefieldTroveBattleOnCombat ArmsCrossFireBlackshotRuneScapeDayZDead by Daylight
Resources
Game Hacking TutorialsReverse EngineeringGeneral Game HackingAnti-CheatConsole Game Hacking
Tools
Game Hacking ToolsTrainers & CheatsHack/Release NewsNew
Submit a release →Share your cheat, tool, or config with the community.
AINEW
AI Tools
General & DiscussionPrompt EngineeringLLM JailbreaksHotAI Agents & AutomationLocal / Open Models
AI × Gaming
AI Aimbots & VisionML Anti-CheatGame Bots & Automation
Create
AI Coding / Vibe CodingAI Art & MediaAI Voice & TTS
The AI frontier →Where game hacking meets modern machine learning. Jump in.
Marketplace
Buy & Sell
SellingBuyingTradingUser Services
Trust & Safety
Middleman LoungeMarketplace TalkVouch Copy Profiles
Money
Cryptocurrency TalkCurrency ExchangeWork & Job Offers
Start selling →List accounts, services, and goods. Use the middleman to trade safe.
MPGH The Dark Arts

A community for offensive security research, reverse engineering, and AI.

Community

ForumMarketplaceSearch

Account

RegisterLog in

Legal

Privacy PolicyForum RulesHelp & FAQ
© 2026 MPGH · All rights reserved.Built by the community, for the community. For educational purposes onlyContent is shared for security research and education — we don't condone illegal use. You're responsible for complying with applicable laws. Use at your own risk.
Home › Forum › Programming › Other Programming › Web Languages › [help]html text generator

[help]html text generator

Posts 1–4 of 4 · Page 1 of 1
TR
trevor206
[help]html text generator
i have looked on the internet for awhile now but i can find out how to make a html text generator and when i say that i mean, there is a button and a textbox above the button and when u press that button some prewritten text comes up that i added to it. like so when u press the button it will say "hi" and when u press it again it will say "go away." and so on.

thanks in advance
#1 · 15y ago
NutriGrain
NutriGrain
Create a file named textgen.html

CHANGE ALL ********** TO ********** IF ITS THE <script langauge="********"> TAG
Put this in textgen.html:

Code:
<script language="**********">
<!--
var r_text = new Array ();
r_text[0] = "Hello";
r_text[1] = "Umad LOL?";
r_text[2] = "Trolololo";
r_text[3] = "Go Away";
r_text[4] = "I wish you were a punchbag";
r_text[5] = "Your Mine";
r_text[6] = "This script was created by NutriGrain!";
var i = Math.floor(7*Math.random())

document.write(r_text[i]);

//-->
</script>
Save it.

In a main page like index.html , look where you want this to be, and place this where you want it (IN THE <BODY> TAGS!!!):

Code:
<iframe id="iframe1" src="textgen.html" width="100%" height="300">
  <p>Your browser does not support iframes.</p>
</iframe>
Now in the <HEAD> tags of index.html put this:

Code:
<script type="text/**********">

function Reload () {
var f = document.getElementById('iframe1');
f.src = f.src;
}

</script>
So, here's example:

INDEX.HTML

Code:
<html>
<head>
<title>Index Fo Sho</title>
<script type="text/**********">

function Reload () {
var f = document.getElementById('iframe1');
f.src = f.src;
}
</head>

<body>
<iframe id="iframe1" src="textgen.html" width="100%" height="300">
  <p>Your browser does not support iframes.</p>
</iframe>
</body>
</html

</script>

TEXTGEN.HTML
:

Code:
<html>
<head>
</head>
<body>
<script language="**********">
<!--
var r_text = new Array ();
r_text[0] = "Hello";
r_text[1] = "Umad LOL?";
r_text[2] = "Trolololo";
r_text[3] = "Go Away";
r_text[4] = "I wish you were a punchbag";
r_text[5] = "Your Mine";
r_text[6] = "This script was created by NutriGrain!";
var i = Math.floor(7*Math.random())

document.write(r_text[i]);

//-->
</body>
</html>
</script>
change
Code:
r_text[0] = "Hello";
, the "Hello" part to what you want.

Thank button is there. Add me as a friend, need more help? See my signature.

Sorry, didn't test this, don't know if it'll work. (its off the top of my head / )
#2 · edited 15y ago · 15y ago
Alen
Alen
NutriGrain has the right idea but horrible code. If you want me to give you a proper example gimme your page and show me where you want what and I'll do it, I'm too lazy to make something generic right now.
#3 · 15y ago
NutriGrain
NutriGrain
Yes, sorry for that code. It's 9:30pm here, been studying all night :S
#4 · 15y ago
Posts 1–4 of 4 · Page 1 of 1

Post a Reply

Similar Threads

  • help with text on sig!By mexicano007 in Art & Graphic Design
    11Last post 17y ago
  • [Help]Basic Text Box[Solved]By FlashDrive in Visual Basic Programming
    3Last post 16y ago
  • [Help]Print Text Box [Solved]By zmansquared in Visual Basic Programming
    7Last post 16y ago
  • [Help]Save Text to Desktop[Solved]By ppl2pass in Visual Basic Programming
    8Last post 16y ago
  • [Help]Save Text[Solved]By Shark23 in Visual Basic Programming
    7Last post 16y ago

Tags for this Thread

None