Probl�me de param�tres dans mon code javascript
Bonjour,
Je viens de passer l'apr�s midi sur mon code, et le javascript �a me d�passe un peu. J'esp�re que vous pourrez me donner un peu d'aide, j'ai eu votre forum par un ami.
Je vais mettre mon code � la fin du post.
Le probl�me est :
Quand sur la page http://www.hiaka.com , on remplit les cases pseudo, ville etc etc, et bien le t'chat s'ouvre pas, je dois avoir un probl�me de fonction mais je trouve pas l�
merci d'avance
Voici mon code
Le d�but du code refiler par Pjirc.com
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
| <html>
<head>
<title>IRCApplet</title>
<script language=javascript>
function parseQueryString () {
var str = str ? "" : document.location.search;
var query = str.charAt(0) == '?' ? str.substring(1) : str;
var args = new Object(
if (query) {
var fields = query.split('&'
for (var f = 0; f < fields.length; f++) {
var field = fields[f].split('='
args[unescape(field[0].replace(/\+/g, ' '))] = unescape(field[1].replace(/\+/g, ' ')
}
}
return args;
} |
Logiquement le code qui doit renseigner, les pseudos ville etc etc (doit pas �re bon
Code:
1 2 3 4 5 6 7 8 9 10 11
| function startChat() {
var args = parseQueryString (
var nick = args['nick'];
var alternatenick = args['nick']+ '??';
var name = args['age'] + args['ville'];
var command1 = '/msg nickserv identify ' + args['pass'];
var command2 = '/join ' + args['chan'];
}
</script>
</head> |
Sert � lancer le t'chat avec les cases remplies "pseudo ville etc etc", le gras ne doit pas �tre bon
Code:
1 2 3 4 5 6 7 8
| <body onload='startChat()'>
<applet name='applet' code=IRCApplet.class archive='irc.jar,pixx.jar' width=80% height=80%>
<param name='CABINETS' value='irc.cab,pixx.cab,securedirc.cab'>
<param name='nick' onLoad="[b]this.value='nick'[/b]">
<param name='alternatenick' onLoad="[b]this.value='alternatenick'[/b]">
<param name='quitmessage' value='Hiaka venir chatter sur Hiaka.com'>
<param name='name' onLoad="[b]this.value='name'[/b]"> |
Sert � configurer le t'chat (couleur, nom du servuer etc etc donc �a + la fin que je n'ai pas mis c'est ok)
Code:
1 2 3 4 5 6 7 8 9 10 11 12
|
<param name='pixx:language' value='pixx-french'>
<param name='pixx:lngextension' value='lng'>
<param name='host' value='jenny.hiaka.com'>
<param name='port' value='6667'>
<param name='gui' value='pixx'>
<param name='asl' value='true'>
<param name='command1' onLoad="this.value='command1'">
<param name='command2' onLoad="this.value='command2'">
<param name='highlight' value='true'>
<param name='style:bitmapsmileys' value='true'>
.................. etc etc |
Et sinon voici mon formulaire sur page page d'accueil
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77
| <table align='center'>
<tr>
<td align=center >
<form name='jform' id='jform' action='/applet/java_chat.html' target="_self" method=get>
<table border='0' cellspacing='0'>
<tr>
<td valign='center' colspan='4' align='center'>
</td>
</tr>
<tr>
<td align='center'>
<font colour=blue>
Votre salon
</font>
</td>
<td align='center' colspan="2">
<font colour=blue>
Votre pseudo</font>
</td>
<td align='center' colspan="2">
<font colour=blue>
Votre Age</font>
</td>
</tr>
<tr>
<td align='center'>
<font colour=blue>
<input name='chan' type=textbox value='formulaire en travaux'>
</font>
</td>
<td align='center' colspan="2">
<font colour=blue>
<input name='nick' type=textbox value='formulaire en travaux'>
</font>
</td>
<td align='center' colspan="2">
<font colour=blue>
<input name='age' type=textbox value='formulaire en travaux'>
</font>
</td>
</tr>
<tr>
<td valign='center' colspan='4' align='center'>
<br>
</td>
</tr>
<tr>
<td align='center' colspan="2">
<font colour=blue>
Votre mot de passe</font>
</td>
<td align='center' colspan="2">
<font colour=blue>
Votre Ville</font>
</td>
</tr>
<tr>
<td align='center' colspan="2">
<font colour=blue><input name='pass' type=textbox value='formulaire en travaux'>
</font>
</td>
<td align='center' colspan="2">
<font colour=blue><input name='ville' type=textbox value='formulaire en travaux'>
</font>
</td>
</tr>
<tr>
<td valign='center' colspan='4' align='center'>
<br>
<input name='submit' type=submit value='T-Chat'>
</td>
</tr>
</table>
</form>
</td>
</tr>
</table> |