Jump to content

Recommended Posts

32 минуты назад, Lovly сказал:

У меня тоже куча разных полезных модулей, но я ещё не разбирался в них что к чему.

Жизненно) нужно будет мне тоже разобраться, а то, может что-то интересное есть) 

Link to comment
Share on other sites

Uncaught TypeError: can't access property "split", matches[1] is undefined

 

Ругается на:

	CheckLinkText: function(val, f){		
		if(!$('#attach_lnk_stared').val()){
			matches = val.split('http://');
			url = matches[1].split('\r');
			if(!url[1]) url = matches[1].split(' ');
			if(val == 'http://'+url[0] && f) fast_check = 1;
			if(url[1] || fast_check){
				rUrl = url[0].split(' ');
				$('#attach_block_lnk').show();
				$('#teck_link_attach').val(rUrl[0]);
				txurl = rUrl[0].replace('http://', '');
				spurl = txurl.split('/');
				$('#attatch_link_url').text(spurl[0]).attr('href', '/away.php?url=http://'+rUrl[0]);
				$('#attach_lnk_stared').val('started');
				$.post('/index.php?go=wall&act=parse_link', {lnk: rUrl[0]}, function(d){
					$('#loading_att_lnk').hide();
					rndval = new Date().getTime(); 
					row = d.split('<f>');
					if(d != 1){
						$('#attatch_link_title').html(row[0]);
						$('#attatch_link_descr').html(row[1]);
					}
					if(row[2] && d != 1) $('#attatch_link_img').attr('src', row[2]).show();
					if(!row[1]) row[1] = '0';
					if(d != 1){
						$('#vaLattach_files').val($('#vaLattach_files').val()+'link|http://'+rUrl[0]+'|'+row[0]+'|'+row[1]+'|'+row[2]+'||');
						$('#urlParseImgs').text(row[3]);
					}
				});
			}
		}
	},

 

Link to comment
Share on other sites

1 час назад, Stark98 сказал:

Uncaught TypeError: can't access property "split", matches[1] is undefined

 

Ругается на:

	CheckLinkText: function(val, f){		
		if(!$('#attach_lnk_stared').val()){
			matches = val.split('http://');
			url = matches[1].split('\r');
			if(!url[1]) url = matches[1].split(' ');
			if(val == 'http://'+url[0] && f) fast_check = 1;
			if(url[1] || fast_check){
				rUrl = url[0].split(' ');
				$('#attach_block_lnk').show();
				$('#teck_link_attach').val(rUrl[0]);
				txurl = rUrl[0].replace('http://', '');
				spurl = txurl.split('/');
				$('#attatch_link_url').text(spurl[0]).attr('href', '/away.php?url=http://'+rUrl[0]);
				$('#attach_lnk_stared').val('started');
				$.post('/index.php?go=wall&act=parse_link', {lnk: rUrl[0]}, function(d){
					$('#loading_att_lnk').hide();
					rndval = new Date().getTime(); 
					row = d.split('<f>');
					if(d != 1){
						$('#attatch_link_title').html(row[0]);
						$('#attatch_link_descr').html(row[1]);
					}
					if(row[2] && d != 1) $('#attatch_link_img').attr('src', row[2]).show();
					if(!row[1]) row[1] = '0';
					if(d != 1){
						$('#vaLattach_files').val($('#vaLattach_files').val()+'link|http://'+rUrl[0]+'|'+row[0]+'|'+row[1]+'|'+row[2]+'||');
						$('#urlParseImgs').text(row[3]);
					}
				});
			}
		}
	},

 

Чтобы тупо работало нужно больше условий. Скорее пустая строка.

Link to comment
Share on other sites

  • 3 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...