Changeset 5375
- Timestamp:
- 06/19/09 13:34:26 (3 years ago)
- File:
-
- 1 edited
-
trunk/padre.perlide.org/irc.html (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/padre.perlide.org/irc.html
r5362 r5375 31 31 perlfr: {title:"Perl in French", host:"irc.perl.org", channel:"perlfr"}, 32 32 poe: {title:"POE", host:"irc.perl.org", channel:"poe"}, 33 rt: {title:" POE",host:"irc.perl.org", channel:"rt"},33 rt: {title:"RT", host:"irc.perl.org", channel:"rt"}, 34 34 perl_help: {title:"Perl Help", host:"irc.perl.org", channel:"perl-help"}, 35 35 wxperl: {title:"Perl Help", host:"irc.perl.org", channel:"wxperl"}, … … 37 37 }; 38 38 39 function on_click(name) {40 var url = 'http://widget.mibbit.com/?autoConnect=true';41 url += '&server=' + channels[name].host;42 url += '&chanel=#' + channels[name].channel;43 url += '&nick=' + document.forms.n.nickname.value;44 alert(url);45 }46 39 47 40 function get_values() { … … 62 55 } 63 56 57 function on_click() { 58 59 var name; 60 for (var i = 0; i < document.forms.n.channel.length; i++) { 61 if (document.forms.n.channel[i].checked) { 62 name = document.forms.n.channel[i].value; 63 } 64 } 65 66 var url; 67 if (channels[name].host == 'irc.freenode.net') { 68 url = 'http://webchat.freenode.net/?'; 69 url += 'channels=' + channels[name].channel; 70 url += '&nick=' + document.forms.n.nickname.value; 71 } else { 72 url = 'http://widget.mibbit.com/?autoConnect=true'; 73 url += '&server=' + channels[name].host; 74 url += '&chanel=#' + channels[name].channel; 75 url += '&nick=' + document.forms.n.nickname.value; 76 } 77 //alert(url); 78 window.location = url; 79 } 80 64 81 </script> 65 82 <p> … … 67 84 </p> 68 85 <form name="n"> 69 Nickname: <input name="nickname" value=""> 70 </form> 86 Nickname: <input name="nickname" value=""> <input type="button" OnClick="javascript:on_click()" value="Connect"> 87 71 88 72 89 … … 79 96 show the localized channels first ? 80 97 81 if all the necessary input is available don't even show this page just redirec to98 if all the necessary input is available don't even show this page just redirect to 82 99 the mibbit service 83 100 … … 96 113 97 114 for (var i in channels) { 98 document.write('<tr><td>< a href="#" onClick="javascript:on_click(\'' + i + '\')">' + channels[i].title + '</a></td></tr>');115 document.write('<tr><td><input type="radio" name="channel" value="' + i + '">' + channels[i].title + '</td></tr>'); 99 116 } 100 117 </script> 101 118 </table> 119 </form> 102 120 103 121 </body>
Note: See TracChangeset
for help on using the changeset viewer.
