CHINH PHỤC
Bạn có muốn phản ứng với tin nhắn này? Vui lòng đăng ký diễn đàn trong một vài cú nhấp chuột hoặc đăng nhập để tiếp tục.
Đăng nhập

Ghi nhớ
Latest topics
» Tôi sẽ đỗ đại học!
by vi01239984564 26/8/2024, 7:41 pm

» Kỷ niệm xưa của chúng ta
by nightWalker 9/2/2024, 6:49 pm

» Bị lệch khung cần người giúp đỡ
by webhuy28 7/10/2021, 10:34 pm

» [HỎI ĐÁP] Danh sách bạn bè không thể hiển thị
by anhdaodaica1 2/10/2021, 10:04 pm

» [HỎI ĐÁP] Thông tin tài khoản không thể lưu thay đổi
by anhdaodaica1 2/10/2021, 6:05 am

» Phim bố già full
by huy.pc52 24/8/2021, 12:20 am

» Xin code Box HTML cho Forumvi
by Larva 1/7/2021, 12:57 pm

» Hello Anh Em Chinh phục
by HoàngTửNaivip5p 28/5/2021, 5:03 am

» Trang chủ tin tức cập nhật HOT 2016
by kenbi05 1/1/2020, 11:02 pm

» Không Dang9 bài viết = hình ảnh được
by huy.pc52 30/11/2019, 10:52 am

» CHÚC ANH EM NĂM MỚI VUI VẺ TRÀNG ĐẦY HẠNH PHÚC
by sps.kủn 12/2/2019, 1:16 pm

» Skin CNTT-K3 2015 (Full Mod)[✔]
by kenbi05 6/7/2018, 12:30 am

» baivong, handsome,....
by sps.kủn 29/6/2018, 1:54 pm

» [SHARE] SKIN ĐHFM.V7 @PUNBB
by tonyhoaivu 2/5/2018, 2:37 pm

» Share Skin Xanh Dương Cùi Bắp
by tonyhoaivu 28/4/2018, 5:57 pm

» Xin Skin http://v1.hotrofm.net/
by tonyhoaivu 28/4/2018, 5:45 pm

» Xin Skin Rao Vặt
by tonyhoaivu 15/4/2018, 12:07 pm

» Làm Sao Để Xóa Khung Này
by tonyhoaivu 14/4/2018, 7:18 pm

» [Lập nhóm]Lập nhóm fm
by vietkanpy 31/3/2018, 11:53 am

» [Help] về server úp ảnh của phutu [✔]
by baivong 17/3/2018, 10:18 pm

» Đừng khóc cho “tôi – Chinh Phục!”…
by AnHung 27/2/2018, 5:33 pm

» [Share] Skin Diendandaihoc.com [ Punbb ] [✔]
by Lu Mờ 13/2/2018, 7:28 pm

» Mời mấy thím vào groups Forumotion Việt Nam.
by dang02315 13/2/2018, 12:40 am

» Có thể làm các kiểu giao diện được không?
by Lu Mờ 9/2/2018, 3:40 pm

» ltns chinhphuc.info
by Shinichi Kudo 27/1/2018, 2:27 am

Top posting users this week
No user


[Thắc mắc] Ai fix dùm code load ảnh trước khi chèn input

2 posters

Go down

[Thắc mắc] Ai fix dùm code load ảnh trước khi chèn input Empty [Thắc mắc] Ai fix dùm code load ảnh trước khi chèn input

Bài gửi by phutu01 12/12/2012, 3:06 pm

Mình chỉ lấy được tới đây còn cái thừa thì chịu chịu
test = cách chèn link vào ô đó


Code:
<fieldset class="fieldset_left html-editor" style="margin-top:10px;">
<input type="text"  name="field_icon" value="" style="width:40%" maxlength="90" />
</fieldset>


<script type="text/javascript" src="http://illiweb.com/rs3/41/frm/jquery/colorpicker/colorpicker.js"></script>

<script type="text/javascript">//<![CDATA[
$(document).ready(function(){ColorPickerFA('#field_name_color');var CurId = $('form input[name=id]').val();var CurType = parseInt('3');/* user can't submit if an VerifInput return false on main input */var force_unsubmit = {'name' : true,'desc' : true,'icon' : true};function local_function_VerifInput(obj, regex, regex_option){/* new option to inverse result */var inverse = false;if ( regex_option.indexOf('N') != -1 ){inverse = true;}if ( inverse ){var n = regex_option.length;var x = '';for(var i = 0; i < n ; i++){if(regex_option[i] != 'N'){x = x + regex_option[i];}}regex_option = x;}var etat = new RegExp(regex, regex_option).test(obj.val());etat = inverse ? !etat : etat ;obj.addClass( etat ? 'profile_form_true' : 'profile_form_false' );obj.removeClass( etat ? 'profile_form_false' : 'profile_form_true' );return etat;};$('.fieldset_left input[name=field_name]').bind('VerifInput', function(){force_unsubmit['name'] = local_function_VerifInput($(this), CurType < 0 ? '^.{0,50}$' : '^.{1,50}$', '');}).keyup(function(){ $(this).trigger('VerifInput'); }).focus(function(){ $(this).trigger('VerifInput'); }).change(function(){ $(this).trigger('VerifInput'); }).trigger('VerifInput');$('.fieldset_left input[name=field_desc]').bind('VerifInput', function(){force_unsubmit['desc'] = local_function_VerifInput($(this), '^.{0,250}$', '');}).keyup(function(){ $(this).trigger('VerifInput'); }).focus(function(){ $(this).trigger('VerifInput'); }).change(function(){ $(this).trigger('VerifInput'); }).trigger('VerifInput');$('.fieldset_left input[name=field_icon]').bind('VerifInput', function(){$(this).find('~ img').remove();var url = $(this).val().replace(/"/g, '&quot;').replace(/>/g, '&gt;').replace(/</g, '&lt;');$(this).after( new RegExp('^(https?|ftps?)://.+/.+\.(jpe?g|gif|png)$').test(url) ? '<img src="' + url + '" alt="" title="" />' : '' );force_unsubmit['icon'] = local_function_VerifInput($(this), '^((https?|ftps?)://.+/.+\.(jpe?g|gif|png))?$', '');}).change(function(){ $(this).trigger('VerifInput'); }).keyup(function(){ $(this).trigger('VerifInput'); }).focus(function(){ $(this).trigger('VerifInput'); }).trigger('VerifInput');var tpl_ICON_down = '<img src="http://2img.net/i/fa/admin/icones/bas.png" alt="Chuyển xuống" title="Chuyển xuống" class="pos_down" />';var tpl_ICON_up = '<img src="http://2img.net/i/fa/admin/icones/haut.png" alt="Chuyển lên" title="Chuyển lên" class="pos_up" />';$('#page_if_javascript_active').removeClass('invisible');function local_function_display_type_field(val){var id = '#part_field_type_' + cur_type_field_selected;var id_new = '#part_field_type_' + val;cur_type_field_selected = val;$(id).addClass('invisible');$(id_new).removeClass('invisible');$('.fieldset_hidden_part_with_field > legend').html($('#list_type_field').find('[value=' + cur_type_field_selected + ']').html());}function local_function_display_type_protocol(val){var id = '.field_type_3_content_protocol_' + cur_type_protocol_selected;var id_new = '.field_type_3_content_protocol_' + val;cur_type_protocol_selected = val;$(id).addClass('invisible');$(id_new).removeClass('invisible');}function local_function_type_list_inverse_line(obj, id_type, num_col_number, num_col_pos, first_real_lign, num_col_default){var class_name = obj.attr('class');var cur_lign = obj.parent().parent();var is = class_name == 'pos_up' ? cur_lign.is(':nth-child(' + (first_real_lign + 1) + ')') : cur_lign.is(':last-child') ;if(!is){var location = class_name == 'pos_up' ? cur_lign.prev() : cur_lign.next();var cur_n = cur_lign.find('td:eq(' + num_col_number + ')').html();var new_n = location.find('td:eq(' + num_col_number + ')').html();var cur_pos = cur_lign.find('td:eq(' + num_col_pos + ')').html();var new_pos = location.find('td:eq(' + num_col_pos + ')').html();var x = class_name == 'pos_up' ? location.before(cur_lign) : location.after(cur_lign);x.find('td:eq(' + num_col_number + ')').html(cur_n).parent().find('td:eq(' + num_col_pos + ')').html('').append(cur_pos);cur_lign.find('td:eq(' + num_col_number + ')').html(new_n).parent().find('td:eq(' + num_col_pos + ')').html('').append(new_pos);local_function_refresh_pos(id_type, num_col_number, num_col_pos, first_real_lign, num_col_default);}}function local_function_type_list_delete_line(obj, id_type, num_col_number, num_col_pos, first_real_lign, num_col_default){var lign = obj.parent().parent();var num_lign = lign.find('td:eq(' + num_col_number + ')').html();lign.remove();type_nb_field[id_type]--;var nb_lign = $('#part_field_type_' + id_type + ' table:eq(0) tbody tr').length - first_real_lign ;if ( nb_lign == 63 ){$('#part_field_type_' + id_type + ' table:eq(0) tfoot td.js_add img').show();}/* refresh value */$('#part_field_type_' + id_type + ' tbody tr:gt(' + (num_lign - 1) + ')').each(function(){var x = $(this).find('td:eq(' + num_col_number + ')');x.html(x.html() - 1);});local_function_refresh_pos(id_type, num_col_number, num_col_pos, first_real_lign, num_col_default);local_function_type_list_default(id_type, first_real_lign, num_col_default);}function local_function_type_list_default(id_type, first_real_lign, num_col_default){$('#part_field_type_' + id_type + ' tbody tr:gt(' + (first_real_lign - 1) + ')').each(function(i){$(this).find('td:eq(' + num_col_default + ') input').attr('value', i+1);});}function local_function_refresh_pos(id_type, num_col_number, num_col_pos, first_real_lign, num_col_default){var nb_lign = $('#part_field_type_' + id_type + ' table:eq(0) tbody tr:gt(' + (first_real_lign - 1) + ')').length;/* refresh pos col */$('#part_field_type_' + id_type + ' table:eq(0) tbody tr:gt(' + (first_real_lign - 1) + ')').each(function(i){if(nb_lign > 1){if ( CurType == 0 ){if(i == 0){$(this).find('td:eq(' + num_col_pos + ')').html(tpl_ICON_down);}else if(i == nb_lign-1){$(this).find('td:eq(' + num_col_pos + ')').html(tpl_ICON_up);}else{$(this).find('td:eq(' + num_col_pos + ')').html(tpl_ICON_up + tpl_ICON_down);}$(this).find('td:eq(' + num_col_pos + ') img').each(function(){local_function_type_list_add_pointer($(this));$(this).bind('click', function(){ local_function_type_list_inverse_line($(this), id_type, num_col_number, num_col_pos, first_real_lign, num_col_default); });});}else{var urlPage = document.location.href;var replace_overflow = {0 : /&action=[^&]*/g, 1 : /&move=[^&]*/g, 2 : /&direction=[^&]*/g, 3 : /&id=[^&]*/g};for(v in replace_overflow){urlPage = urlPage.replace(replace_overflow[v], '');}urlPage = urlPage.replace(/&&*/g, '&');urlPage = urlPage + '&amp;action=list_pos&amp;id=' + CurId;var down = '<a href="' + urlPage + '&amp;direction=0&amp;move=' + i + '">' + tpl_ICON_down + '</a>';var up = '<a href="' + urlPage + '&amp;direction=1&amp;move=' + i + '">' + tpl_ICON_up + '</a>';if(i == 0){$(this).find('td:eq(' + num_col_pos + ')').html(down);}else if(i == nb_lign-1){$(this).find('td:eq(' + num_col_pos + ')').html(up);}else{$(this).find('td:eq(' + num_col_pos + ')').html(up + down);}}}else{$(this).find('td:eq(' + num_col_pos + ')').html('');}});local_function_type_list_default(id_type, first_real_lign, num_col_default);}function local_function_type_list_add_pointer(obj){ obj.css({'cursor':'pointer'}); }function local_function_type_list_common(id_type, num_col_number, num_col_pos, num_col_delete, first_real_lign, num_col_default){/* id_type : numero du type de champ *//* num_col_number : numero de la colonne des positions *//* num_col_pos : numero de la colonne contenant les boutons d'ordre *//* num_col_delete : numero de la colonne contenant les actions *//* first_real_lign : numero de la premiere ligne reelement utilise pour l'ajout *//* num_col_default : numero de la colonne contenant les champs par defaut */type_nb_field[id_type] = $('#part_field_type_' + id_type + ' tbody tr:gt(' + (first_real_lign - 1) + ')').length;/* bind event for lign already exist */$('#part_field_type_' + id_type + ' table:eq(0) tbody tr:gt(' + (first_real_lign - 1) + ')').each(function(){if ( CurType == 0 ){$(this).find('td:eq(' + num_col_delete + ') img').bind('click', function(){local_function_type_list_delete_line($(this), id_type, num_col_number, num_col_pos, first_real_lign, num_col_default);});}local_function_refresh_pos(id_type, num_col_number, num_col_pos, first_real_lign, num_col_default);});/* if user click for new line */$('#part_field_type_' + id_type + ' tfoot td.js_add img').click(function(){var nb_lign = $('#part_field_type_' + id_type + ' tbody tr').length - first_real_lign ;/* limit of line per list */if ( nb_lign < 200 ){if ( nb_lign == 199 ){$('#part_field_type_' + id_type + ' tfoot td.js_add img').hide();}/* add new line */$('#part_field_type_' + id_type + ' tbody tr:last').after(eval('field_tpl_type_' + id_type + '_add'));type_nb_field[id_type]++;local_function_type_list_default(id_type, first_real_lign, num_col_default);/* select this new line */$('#part_field_type_' + id_type + ' table:eq(0) tbody tr:last').find('td:eq(' + num_col_number + ')').html(type_nb_field[id_type]).end().find('td:eq(' + num_col_delete + ') img').each(function(){$(this).bind('click', function(){ local_function_type_list_delete_line($(this), id_type, num_col_number, num_col_pos, first_real_lign, num_col_default); });local_function_type_list_add_pointer($(this));});}local_function_refresh_pos(id_type, num_col_number, num_col_pos, first_real_lign, num_col_default);});local_function_type_list_default(id_type, first_real_lign, num_col_default);$('#part_field_type_' + id_type + ' tfoot td.js_rien img').bind('click', function(){$('#part_field_type_' + id_type + ' tbody tr:gt(' + (first_real_lign - 1) + ')').each(function(){$(this).find('td:eq(' + num_col_default + ') input[type=radio]').attr('checked', false);});});}/* Manager for list type */var type_nb_field = new Array;var cur_type_protocol_selected = $('#field_type_3_protocole').val();local_function_display_type_protocol(cur_type_protocol_selected);$('#field_type_3_protocole').change(function(){local_function_display_type_protocol($(this).find(':selected').val());});var TabType3_Protocol = {'1' : {0 : '^([a-z\\d]([-_.]?[\\w?]){0,400}@[a-z\\d]([-.]?[a-z\\d]){0,400}\\.([a-z]{2,6}))?$', 1 : 'i'},'2' : {0 : '^([0-9]{1,10})?$', 1 : ''},'3' : {0 : '^([a-z\\d]([-_.]?[\\w?]){0,400}@[a-z\\d]([-.]?[a-z\\d]){0,400}\\.([a-z]{2,6}))?$', 1 : 'i'},'4' : {0 : '^([a-z\\d]([-_.]?[\\w?]){0,400}@[a-z\\d]([-.]?[a-z\\d]){0,400}\\.([a-z]{2,6}))?$', 1 : 'i'},'5' : {0 : '^((\\d{1,10})|([a-z][a-z\\d]{2,15}))?$', 1 : 'i'},'6' : {0 : '^([^\\t\\r\\n @!]+)?$', 1 : ''},'7' : {0 : '^([a-z][\\w.]{2,30}[a-z\\d]@(?:yahoo|ymail|rocketmail)\\.[a-z]{1,3})?$', 1 : 'i'},'8' : {0 : '^([a-z\\d]([-_.]?[\\w?]){0,400}@[a-z\\d]([-.]?[a-z\\d]){0,400}\\.([a-z]{2,6}))?$', 1 : 'i'},'9' : {0 : '^([a-z][-\\w@,.]{5,149})?$', 1 : 'i'},'10' : {0 : '^([a-z\\d]{1,25})?$', 1 : 'i'},'12' : {0 : '^([+()\\d]{1,20})?$', 1 : ''},'13' : {0 : '^([a-z\\d][a-z\\d\\\\.]{4,28}[a-z\\d]@(googlemail|gmail)\\.com)?$', 1 : ''},'25' : {0 : '^([\\w.]{4,100})?$', 1 : 'i'},'30' : {0 : '^(((https?|ftps?)://)?(.+\\.)?.+\\..+)?$', 1 : 'i'}};$('#part_field_type_3 dd input').each(function(){$(this).bind('VerifInput', function(){var cur_protocol = new RegExp('field_type_3_content_(\\d+)', '').exec($(this).attr('name'));if ( cur_protocol != null ){cur_protocol = cur_protocol[1];local_function_VerifInput($(this), TabType3_Protocol[cur_protocol][0], TabType3_Protocol[cur_protocol][1]);}});});$('#part_field_type_3 dd input').keyup(function(){ $(this).trigger('VerifInput'); }).focus(function(){ $(this).trigger('VerifInput'); }).change(function(){ $(this).trigger('VerifInput'); });$('#main').submit(function(){var temp = true;for(i in force_unsubmit){if(!force_unsubmit[i]){temp = !temp;}}if ( CurType < 0 ){temp = true;}if(!temp){$('#page_if_javascript_active fieldset:eq(0) div.div_btns span.error').text('Some fields are invalid.');/* $('#page_if_javascript_active input.icon_ok').addClass('profile_submit_error'); */}return temp;});var base_type_legend = $('.fieldset_hidden_part_with_field > legend').html();var cur_type_field_selected = $('#list_type_field').val();local_function_display_type_field(cur_type_field_selected);$('#list_type_field').change(function(){local_function_display_type_field($(this).find(':selected').val());});});//]]></script></div>
phutu01
phutu01
CPPurpleMember
CPPurpleMember

Firefox PunBB
Ngày đăng ký : 06/12/2009
Số bài : 1544
CPP : 216
Châm ngôn sống : 18

http://phutu.7forum.net

Về Đầu Trang Go down

[Thắc mắc] Ai fix dùm code load ảnh trước khi chèn input Empty Re: [Thắc mắc] Ai fix dùm code load ảnh trước khi chèn input

Bài gửi by baivong 12/12/2012, 3:18 pm

Lượm ở đâu vậy?
Định làm gì?
baivong
baivong
CPYellowMember
CPYellowMember

Firefox Invision
Ngày đăng ký : 02/04/2010
Số bài : 3114
CPP : 1212
Châm ngôn sống : Sống để được chết một lần.

http://devs.forumvi.com

Về Đầu Trang Go down

[Thắc mắc] Ai fix dùm code load ảnh trước khi chèn input Empty Re: [Thắc mắc] Ai fix dùm code load ảnh trước khi chèn input

Bài gửi by phutu01 12/12/2012, 3:21 pm

Cái chỗ tạo profile .Tính cho load chỗ chèn link ảnh đại diện topic ( mô tả )
phutu01
phutu01
CPPurpleMember
CPPurpleMember

Firefox PunBB
Ngày đăng ký : 06/12/2009
Số bài : 1544
CPP : 216
Châm ngôn sống : 18

http://phutu.7forum.net

Về Đầu Trang Go down

[Thắc mắc] Ai fix dùm code load ảnh trước khi chèn input Empty Re: [Thắc mắc] Ai fix dùm code load ảnh trước khi chèn input

Bài gửi by baivong 12/12/2012, 9:58 pm

Có hình ảnh hay link cụ thể ko, mình ko nhớ là có chỗ nào tạo profile dc?
baivong
baivong
CPYellowMember
CPYellowMember

Firefox Invision
Ngày đăng ký : 02/04/2010
Số bài : 3114
CPP : 1212
Châm ngôn sống : Sống để được chết một lần.

http://devs.forumvi.com

Về Đầu Trang Go down

[Thắc mắc] Ai fix dùm code load ảnh trước khi chèn input Empty Re: [Thắc mắc] Ai fix dùm code load ảnh trước khi chèn input

Bài gửi by phutu01 12/12/2012, 10:53 pm

ông copy code đó bỏ vào html ,lấy link up vào ô đó sẽ rõ thôi .Profile là cái chỗ chèn icon đó chịu

Ông xem thử code js đó chỗ thừa xóa giúp tôi đi
phutu01
phutu01
CPPurpleMember
CPPurpleMember

Firefox PunBB
Ngày đăng ký : 06/12/2009
Số bài : 1544
CPP : 216
Châm ngôn sống : 18

http://phutu.7forum.net

Về Đầu Trang Go down

[Thắc mắc] Ai fix dùm code load ảnh trước khi chèn input Empty Re: [Thắc mắc] Ai fix dùm code load ảnh trước khi chèn input

Bài gửi by baivong 13/12/2012, 1:12 am

Load ảnh trước khi chèn là sao? vừa vào tài tải ảnh ah? vậy thì dùng css background ấy.
Trong code ông đưa chẳng thấy dòng nào như thế cả nóng trog ngừi, chỉ có cái kiểm tra link ảnh thôi, còn chèn đi đâu tùy ông.

Code:
<fieldset class="fieldset_left html-editor" style="margin-top:10px;">
   <input type="text" name="field_icon" value="" style="width:40%" maxlength="90" />
</fieldset>
<script type="text/javascript">
   //<![CDATA[
   $(function () {
      $('.fieldset_left input[name=field_icon]').bind('VerifInput', function () {
         $(this).find('~ img').remove();
         var url = $(this).val();
         $(this).after(new RegExp('^(https?|ftps?)://.+/.+\.(jpe?g|gif|png)$').test(url) ? '<img src="' + url + '" alt="" title="" />' : '');
      }).change(function () {
         $(this).trigger('VerifInput');
      }).keyup(function () {
         $(this).trigger('VerifInput');
      }).focus(function () {
         $(this).trigger('VerifInput');
      }).trigger('VerifInput');
   })
   //]]>   
</script>
baivong
baivong
CPYellowMember
CPYellowMember

Firefox Invision
Ngày đăng ký : 02/04/2010
Số bài : 3114
CPP : 1212
Châm ngôn sống : Sống để được chết một lần.

http://devs.forumvi.com

Về Đầu Trang Go down

[Thắc mắc] Ai fix dùm code load ảnh trước khi chèn input Empty Re: [Thắc mắc] Ai fix dùm code load ảnh trước khi chèn input

Bài gửi by Sponsored content


Sponsored content


Về Đầu Trang Go down

Về Đầu Trang

- Similar topics

 
Permissions in this forum:
Bạn không có quyền trả lời bài viết