/    Sign up×
Community /Pin to ProfileBookmark

ive got a problem, this code only works for the person viewing the page.

[code]
<!– THREE STEPS TO INSTALL TEXTCHAT V1.2:

1. Copy the coding into the HEAD of your HTML document
2. Add the onLoad event handler into the BODY tag
3. Put the last coding into the BODY of your HTML document –>

<!– STEP ONE: Paste this code into the HEAD of your HTML document –>

<HEAD>

<!– This script and many more are available free online at –>
<!– The JavaScript Source!! [url]http://javascript.internet.com[/url] –>
<!– Original: Jericho Mejia (cirej_jem@@yahoo.com) –>
<script language=”JavaScript”>

<!– Jericho Mejia (cirej_jem@@yahoo.com) –>
<!———- copyright 2003 —————–>

<!– Begin

function typeWith() {

Reply = “”;
while ((Reply == “”) || (Reply == “”)){
Reply=prompt (“Enter your chatID:”, “”);}

if (Reply != null){
document.mytype.typein.value = document.mytype.inputext.value;}
else{
Reply = “Unknown User”;}

}

// End –>
</script>

</HEAD>

<!– STEP TWO: Insert the onLoad event handler into your BODY tag –>

<BODY onLoad=”typeWith()”>

<!– STEP THREE: Copy this code into the BODY of your HTML document –>

<form name=”mytype”>

<textarea name=”typein” cols=”72″ rows=”5″ readonly></textarea>

<br><input name=”inputext” type=”text” size=”74″><input type=”button” name=”sendbutton” value=”SEND !” onClick=”document.mytype.typein.value = Reply + ‘: ‘ + document.mytype.inputext.value”><br>

<br><br>

</form>

<p><center>
</a></font>
</center><p>

<!– Script Size: 1.79 KB –>

[/code]

i want the text inside the box to be viewable to everyone. and when you enter another comment it wont replace it

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@Paul_JrOct 06.2004 — [i]Originally posted by age13kid [/i]

[B]i want the text inside the box to be viewable to everyone.[/b][/quote]

[font=palatino linotype]Then you need to store the data some how, which means you need a server-side language.[/font]

[i]Originally posted by age13kid [/i]

[B]and when you enter another comment it wont replace it [/B][/QUOTE]

[font=palatino linotye]Instead of [font=courier]document.mytype.typein.value = document.mytype.inputext.value;[/font], use [font=courier]document.mytype.typein.value += document.mytype.inputext.value;[/font].[/font]
×

Success!

Help @age13kid spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.16,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...