Changeset 5377


Ignore:
Timestamp:
06/19/09 13:51:47 (3 years ago)
Author:
szabgab
Message:

set the default channel and accept the value given on th URL

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/padre.perlide.org/irc.html

    r5375 r5377  
    2929   parrot:       {title:"Parrot",                 host:"irc.perl.org",     channel:"parrot"}, 
    3030   perl_qa:      {title:"Perl Quality Assurance", host:"irc.perl.org",     channel:"perl-qa"}, 
    31    perlfr:       {title:"Perl in French",         host:"irc.perl.org",     channel:"perlfr"}, 
     31   locale_fr:    {title:"Perl in French",         host:"irc.perl.org",     channel:"perlfr"}, 
    3232   poe:          {title:"POE",                    host:"irc.perl.org",     channel:"poe"},    
    3333   rt:           {title:"RT",                     host:"irc.perl.org",     channel:"rt"}, 
    3434   perl_help:    {title:"Perl Help",              host:"irc.perl.org",     channel:"perl-help"}, 
    35    wxperl:       {title:"Perl Help",              host:"irc.perl.org",     channel:"wxperl"}, 
     35   wxperl:       {title:"Wx Perl",                host:"irc.perl.org",     channel:"wxperl"}, 
    3636   perl6:        {title:"Perl 6 development",     host:"irc.freenode.net", channel:"perl6"}, 
    3737}; 
    38  
     38var default_channel = "general"; 
    3939 
    4040function get_values() { 
     
    8181</script> 
    8282<p> 
    83 Please select a nickname and click on one of the links. 
     83Please select a nickname and a channel and click on Connect. 
    8484</p> 
    8585<form name="n"> 
     
    9292   hash_key (maybe that should be host_channel instead of of our own special name) 
    9393    
    94    redirect to selected url 
    95    have drop-down box with list of channels or radio buttons ?? 
    9694   show the localized channels first ? 
     95   if all the necessary input is available don't even show this page just redirect to  
     96   relevant url 
    9797    
    98    if all the necessary input is available don't even show this page just redirect to  
    99    the mibbit service 
    100  
     98   Put some explanation on the top of the page (maybe in multiple languages) 
    10199--> 
    102100 
     
    111109    document.forms.n.nickname.value = "user_" + nick; 
    112110} 
     111var ch = default_channel; 
     112if (values["channel"]) { 
     113    if (channels[ values["channel"] ]) { 
     114    ch = values["channel"]; 
     115    } 
     116} 
    113117 
    114118for (var i in channels) { 
    115     document.write('<tr><td><input type="radio" name="channel" value="' + i + '">' + channels[i].title + '</td></tr>'); 
     119    var html = '<tr><td><input type="radio" name="channel" value="' + i + '"'; 
     120    if (i == ch) { 
     121    html += " CHECKED "; 
     122    } 
     123    html    += '>' + channels[i].title + '</td></tr>'; 
     124    document.write(html); 
    116125} 
    117126</script> 
    118127</table> 
    119128</form> 
     129     
    120130 
    121131</body> 
Note: See TracChangeset for help on using the changeset viewer.