• Steam recently changed the default privacy settings for all users. This may impact tracking. Ensure your profile has the correct settings by following the guide on our forums.

[Solved] ok, I need some help with Javascript >.<

Status
Not open for further replies.

Darkchild

The Doctor
http://altocircuito.net/acnew/

Try pressing the "Inscrever-te" link, it'll show you a dialog, just press "Concordo" to agree, problem is... This works on Firefox and Chrome, but AS USUAL, IE has a problem.

All it says is runtime error

Line : 209
Char: 24

It does the same in IE7 >.<

Can anyone tell me wtf is the problem!? cuz I don't see it!

EDIT :


Seemingly, if I clean out the text that is replaced INSIDE, it works >.<

here's the HTML code :

PHP:
<form action="register.php" method="post" id="regform"><strong><h2>Dados Pessoais : </h2> </strong><br><br><b>Nome Completo: (Minimo 6 caracteres) </b><br><input type="text" onChange="checkname()" onBlur="checkname()" onKeyDown="checkname()" onKeyUp="checkname()" name="fname" class="register_text" size="80" id="fname"/><span id="fname_err"><img src="data/action_stop.gif"></span><br /><b>Email : </b><input type="checkbox" id="hasemail" checked="true" onClick="emailonoff()" nChange="emailonoff()"> Tenho email!<br><input type="text" onChange="checkmails()" onBlur="checkmails()" onKeyDown="checkmails()" onKeyUp="checkmails()" name="email1" class="register_text" size="80" id="email1"/><span id="email1_err"><img src="data/action_stop.gif"></span><br><b>Confirmar Email : </b><br><input type="text" onChange="checkmails()" onBlur="checkmails()" onKeyDown="checkmails()" onKeyUp="checkmails()" name="email2" class="register_text" size="80" id="email2"/> <span id="email2_err"><img src="data/action_stop.gif"></span><br><br><strong>Sexo : </strong><input type="radio" checked="true" name="sex" value="male">Masculino <input type="radio" name="sex" value="female"> Feminino<img src="data/spacer.gif" width="95px" height="1px"><strong>Idade : <input type="text" id="age" name="age" size="2" onChange="checkage()" onBlur="checkage()" onKeyDown="checkage()" onKeyUp="checkage()" onkeypress="return isNumberKey(event)"><span id="age_err"><img src="data/action_stop.gif"></span><br><br><input type="submit" value="Inscrever!" id="button" disabled="true"></form>
 

x3sphere

Administrator
Staff member
Enforcer Team
Game Info Editor
I would avoid echoing straight HTML from JS. It's cleaner (IMO) to insert it in the HTML, then activate or deactivate the form by toggling display: none.

So, place the form as a static item in your HTML like so:

Code:
<form action="register.php" method="post" id="regform" style="display:none"><br><strong><h2>Dados Pessoais :</h2></strong><br><br><br><b>Nome Completo: (Minimo 6 caracteres)</b><br><input type="text" onChange="checkname()" onBlur="checkname()" onKeyDown="checkname()" onKeyUp="checkname()" nam

Then, in the JS, do this to show it instead of echoing code.

Code:
document.getElementById('regform').style.display = '';

Just tested this method and it works fine with your current code in IE.
 
Status
Not open for further replies.
Top