aboutsummaryrefslogblamecommitdiffstats
path: root/view/js/mod_new_channel.js
blob: 02b6f857ea0809e428db4e5b2f372ac481aec03f (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
















                                                                                                                   
	$(document).ready(function() {
		$("#newchannel-name").blur(function() {
			var zreg_name = $("#newchannel-name").val();
			$.get("newchannel/autofill.json?f=&name=" + encodeURIComponent(zreg_name),function(data) {
				$("#newchannel-nickname").val(data);
				zFormError("#newchannel-name-feedback",data.error);
			});
		});
		$("#newchannel-nickname").blur(function() {
			var zreg_nick = $("#newchannel-nickname").val();
			$.get("newchannel/checkaddr.json?f=&nick=" + encodeURIComponent(zreg_nick),function(data) {
				$("#newchannel-nickname").val(data);
				zFormError("#newchannel-nickname-feedback",data.error);
			});
		});

	});