/    Sign up×
Community /Pin to ProfileBookmark

WHY my page is refreshing by automatically?

hi,
i added a form, and i added TWO TEXTFields and i added two buttons.
so, i want to when i press button the buttons value is added textfield2. its ok , it is added but page is refreshing by automatically so all of my values are lost.

what can i do?
( i want to make a hangman game ! )

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@SheldonJun 20.2007 — Post what you have so we can see whats going on
Copy linkTweet thisAlerts:
@futiauthorJun 20.2007 — ok i solve that problem but i encounter new problem.

as i mentioned earlier, i am working on a hangman game.

==

for (i=1; i < 30; i++)

{

harfim = list_getat(harfler,i);

document.write(harfim);

document.write('<input type="button" value="'+harfim+'" onClick="control(harfim)">');

}

harfim variables is OK. that s not problem.

document.write(harfim) is running good.( it writes from a to z to page)

the second document.write is running good until the onClick method.

the value is OK. buttons values are A,B,C,D ... ,Z OK. but when i press the button, control() method take parameter as 'Z'. when i press the button C, control('Z') runs. when i press the button K, control('Z') runs.

what can i do?
×

Success!

Help @futi 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 5.19,
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: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

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

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...