Jump to content

rrock

User
  • Posts

    36
  • Joined

  • Last visited

Everything posted by rrock

  1. На оскорбление от невежества обращать внимание не будем. Данную проблему решил следующим образом. Если кто може написать поизящнее, милости просим, буду признателен. 2хомм, вот что я ожидал от адекватных и грамотных форумчан function show_port_select(port) { var port_image = ''; var switch_id; var curent_port = ''; port = port.replace('\n',''); port = port.replace('\r',''); port = port.replace('\t',''); port_image = "Prt_"+port+"_Img"; switch_id = "switch_"+port.split('_')[0]; var node = document.getElementById(switch_id).getElementsByTagName('IMG'); for(var i=0; i<node.length; i++) { curent_port = node[i].getAttribute('id'); if(curent_port && curent_port == port_image) { document.getElementById(curent_port).style.opacity = 1; }else if (curent_port){ document.getElementById(curent_port).style.opacity = .1; }else{ } } } PS тему можно закрыть.
  2. 2homm вот исходный код, пожалуйста ознакомьтесь внимательно ... <tr> <td><div id="switchs"><table width="100%" cellspacing="5"> <tbody><tr><td><div id="switch_2"><!-- Start switch view --> <!-- #Web_DisplaySwitchView USAGE=2~ --> <table width="740" bgcolor="#999999" border="0" cellpadding="0" cellspacing="0"> <tbody><tr> <td colspan="5"><table width="100%" background="base.php_files/p_stripe_y.gif" border="0" cellpadding="0" cellspacing="0"> <tbody><tr> <td valign="top"><img src="base.php_files/p_atil_y1.gif" width="55" height="16"></td> <td width="100%" background="base.php_files/p_stripe_y.gif"></td> <td align="right" bgcolor="#999999"><nobr><b>**AT-8550GB**</b></nobr></td> </tr> </tbody></table></td> </tr> <tr> <td colspan="4"><img src="base.php_files/spacer.htm" width="1" height="5"></td> </tr> <tr> <td><table align="center" bgcolor="#999999" border="0" cellpadding="0" cellspacing="0"> <tbody><tr> <td><p class="h5">49</p> <img style="opacity: 1;" src="base.php_files/p_g_pln1.gif" alt="Port 0/49" id="Prt_2_00_49_Img" onclick="click_port(this);" onmouseover="on_port(this);" onmouseout="out_port(this);" width="37" border="0" height="22"></td> </tr> <tr> <td [color="#FF0000"][size=5](это надо сделать opacity: 1;)[/size][/color]><img src="base.php_files/p_g_pln1.gif" alt="Port 0/50" id="Prt_2_00_50_Img" onclick="click_port(this);" onmouseover="on_port(this);" onmouseout="out_port(this);" width="37" border="0" height="22"> <p class="h5">50</p></td> </tr> </tbody></table></td> <td><table align="center" bgcolor="#999999" border="0" cellpadding="0" cellspacing="0"> <tbody><tr> <td><p class="h5">01</p> <img style="opacity: 1;" src="base.php_files/p_t_pln1.gif" alt="Port 0/1" id="Prt_2_00_01_Img" onclick="click_port(this);" onmouseover="on_port(this);" onmouseout="out_port(this);" width="21" border="0" height="22"></td> <td><p class="h5">03</p> <img style="opacity: 1;" src="base.php_files/p_t_pln1.gif" alt="Port 0/3" id="Prt_2_00_03_Img" onclick="click_port(this);" onmouseover="on_port(this);" onmouseout="out_port(this);" width="21" border="0" height="22"></td> <td><p class="h5">05</p> <img style="opacity: 1;" src="base.php_files/p_t_pln1.gif" alt="Port 0/5" id="Prt_2_00_05_Img" onclick="click_port(this);" onmouseover="on_port(this);" onmouseout="out_port(this);" width="21" border="0" height="22"></td> <td><p class="h5">07</p> <img style="opacity: 1;" src="base.php_files/p_t_pln1.gif" alt="Port 0/7" id="Prt_2_00_07_Img" onclick="click_port(this);" onmouseover="on_port(this);" onmouseout="out_port(this);" width="21" border="0" height="22"></td> <td><p class="h5">09</p> ... не меняя исходников напиши скрипт для получения положительного результата if script.good ? alert('БЫЛ НЕ ПРАВ!!!')' : alert('НЕ РАБОТАЕТ ВАШЕ ПРЕДЛОЖЕНИЕ ПО РЕШЕНИЮ ДАННОЙ ЗАДАЧИ. ПОУЧИТЕСЬ ЧТОБЫ ОТВЕЧАТЬ НА ДАННЫЙ ВОПРОС И НЕ ВВОДИТЬ ПУБЛИКУ В ЗАБЛУЖДЕНИЕ ') Перед всеми другими извиняюсь за данный текст
  3. Спасибо огромное для себя отметил что НЕ ЗАБЫВАТЬ СТАВИТЬ ЗАРАНЕЕ ТИП ПЕРЕМЕННОЙ.
  4. есть код var out; var parentDiv = document.getElementById(div_id).getElementsByTagName('IMG'); for(var i=0; i<parentDiv.length; i++) { if(parentDiv[i].getAttribute('id')) {out += parentDiv[i].getAttribute('id')+"/"; } alert(out); есть таблица с папой parentDiv в ней дети, есть с id есть без id. всего 59 img из них 51 с id на выходе. undefinedPrt_2_00_49_Img/Prt_2_00_50_Img/Prt_2_00_01_Img/Prt_2_00_03_Img/Prt_2_00_05_Img/Prt_2_00_07_Img/Prt_2_00_09_Img/Prt_2_00_11_Img/Prt_2_00_13_Img/Prt_2_00_15_Img/Prt_2_00_17_Img/Prt_2_00_19_Img/Prt_2_00_21_Img/Prt_2_00_23_Img/Prt_2_00_25_Img/Prt_2_00_27_Img/Prt_2_00_29_Img/Prt_2_00_31_Img/Prt_2_00_33_Img/Prt_2_00_35_Img/Prt_2_00_37_Img/Prt_2_00_39_Img/Prt_2_00_41_Img/Prt_2_00_43_Img/Prt_2_00_45_Img/Prt_2_00_47_Img/Prt_2_00_02_Img/Prt_2_00_04_Img/Prt_2_00_06_Img/Prt_2_00_08_Img/Prt_2_00_10_Img/Prt_2_00_12_Img/Prt_2_00_14_Img/Prt_2_00_16_Img/Prt_2_00_18_Img/Prt_2_00_20_Img/Prt_2_00_22_Img/Prt_2_00_24_Img/Prt_2_00_26_Img/Prt_2_00_28_Img/Prt_2_00_30_Img/Prt_2_00_32_Img/Prt_2_00_34_Img/Prt_2_00_36_Img/Prt_2_00_38_Img/Prt_2_00_40_Img/Prt_2_00_42_Img/Prt_2_00_44_Img/Prt_2_00_46_Img/Prt_2_00_48_Img/ откуда undefined и если так как избавиться Заранее благодарен за ответ
  5. Можно сделать. Используя onkeypress, onkeyup, onkeydown Почитай
  6. Если будешь внимательнее то поймешь что этим проблема не решается О твоем варианте и сам догадался. только так не катит (код выходящий на экран можно посмотреть выше) нужно чтобы В БАЛЬШОЙ РАЗНО ШОРСТНОЙ ТАБЛИЦЕ все было 0.5 а конкретно одна картинка должна быть полностью видна. .... <div id='БАЛЬШАЯ_ТАБЛИЦА_1'> ОТКРЫВАЕТСЯ БАЛЬШАЯ ТАБЛИЦА .... <div id='id_1_1'>картинка_1</div> .... <div id='id_1_2'>картинка_2</div> .... <div id='id_1_n'>картинка_n</div> .... ЗАКРЫВАЕТСЯ БАЛЬШАЯ ТАБЛИЦА </div> ..... И таких таблиц многа!!!! у всех конечно id разные Спасибо. Заранее извиняюсь перед остальными что приходится повторяться
  7. Нужно перенести из данного раздела... Нечего новичкам такое читать... ИМХО
  8. Сорри за оффтоп Посмотри на адрес google.com.ua
  9. Страница не может быть на двух таблицах. Подразумевалось наверное наоборот Самый простой способ использовать FRAME пример <frameset rows="80,*" frameborder="no" border="0" framespacing="0"> <frame src="top.php" name="topFrame" scrolling="No" noresize="noresize" id="topFrame" title="topFrame" /> <frame src="main.php" name="mainFrame" id="mainFrame" title="mainFrame" /> </frameset> загружать тогда не в <td> а в <frame id="...">
  10. В будущем вообще данное действие должно происходить при старте функции что запускается наведением мыши на совершенно другой элемент содержащий информацию о нужном теге(использую $.post - уже работает) делая запрос в базу данных Спасибо
  11. Нужно чтобы при наведении мыши на соответствующую ячейку она полностью отображалась а все что у папы в div id=table было темно к сожалению поставить на td соответствующий стиль будет очень проблематично так как это достаточно большая таблица идущая исходно без классов и частично заполнена (причём таких таблиц много) вот пример таблицы выданной на экран ... <tr> <td><div id="switchs"><table width="100%" cellspacing="5"> <tbody><tr><td><div id="switch_2"><!-- Start switch view --> <!-- #Web_DisplaySwitchView USAGE=2~ --> <table width="740" bgcolor="#999999" border="0" cellpadding="0" cellspacing="0"> <tbody><tr> <td colspan="5"><table width="100%" background="base.php_files/p_stripe_y.gif" border="0" cellpadding="0" cellspacing="0"> <tbody><tr> <td valign="top"><img src="base.php_files/p_atil_y1.gif" width="55" height="16"></td> <td width="100%" background="base.php_files/p_stripe_y.gif"></td> <td align="right" bgcolor="#999999"><nobr><b>**AT-8550GB**</b></nobr></td> </tr> </tbody></table></td> </tr> <tr> <td colspan="4"><img src="base.php_files/spacer.htm" width="1" height="5"></td> </tr> <tr> <td><table align="center" bgcolor="#999999" border="0" cellpadding="0" cellspacing="0"> <tbody><tr> <td><p class="h5">49</p> <img style="opacity: 1;" src="base.php_files/p_g_pln1.gif" alt="Port 0/49" id="Prt_2_00_49_Img" onclick="click_port(this);" onmouseover="on_port(this);" onmouseout="out_port(this);" width="37" border="0" height="22"></td> </tr> <tr> <td><img src="base.php_files/p_g_pln1.gif" alt="Port 0/50" id="Prt_2_00_50_Img" onclick="click_port(this);" onmouseover="on_port(this);" onmouseout="out_port(this);" width="37" border="0" height="22"> <p class="h5">50</p></td> </tr> </tbody></table></td> <td><table align="center" bgcolor="#999999" border="0" cellpadding="0" cellspacing="0"> <tbody><tr> <td><p class="h5">01</p> <img style="opacity: 1;" src="base.php_files/p_t_pln1.gif" alt="Port 0/1" id="Prt_2_00_01_Img" onclick="click_port(this);" onmouseover="on_port(this);" onmouseout="out_port(this);" width="21" border="0" height="22"></td> <td><p class="h5">03</p> <img style="opacity: 1;" src="base.php_files/p_t_pln1.gif" alt="Port 0/3" id="Prt_2_00_03_Img" onclick="click_port(this);" onmouseover="on_port(this);" onmouseout="out_port(this);" width="21" border="0" height="22"></td> <td><p class="h5">05</p> <img style="opacity: 1;" src="base.php_files/p_t_pln1.gif" alt="Port 0/5" id="Prt_2_00_05_Img" onclick="click_port(this);" onmouseover="on_port(this);" onmouseout="out_port(this);" width="21" border="0" height="22"></td> <td><p class="h5">07</p> <img style="opacity: 1;" src="base.php_files/p_t_pln1.gif" alt="Port 0/7" id="Prt_2_00_07_Img" onclick="click_port(this);" onmouseover="on_port(this);" onmouseout="out_port(this);" width="21" border="0" height="22"></td> <td><p class="h5">09</p> ... нужно чтобы при наведении на порт всё остальное становилось полупрозрачным вариант с <td> мне кажется не подойдет Спасибо
  12. Данную проблему решил появилась другая Сделал новый топ. ПРОБЛЕМА ТУТ
  13. Молодец. Значит ты решить данную проблему не в состоянии
  14. Надо предков оставить как есть то есть 0.5 а bot4 сделать 1
  15. есть таблица <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> </head> <body> <div class="top" id="table" style="opacity: 0.5"> TABLE <table border="1"> <tr> <td><div id="bot1" style="opacity: 0.4">BOT1</div></td> <td><div id="bot2" style="opacity: 0.6" >BOT2</div></td> </tr> <tr> <td><div id="bot3" style="opacity: 0.8" >BOT3</div></td> <td><div id="bot4" style="opacity: 1" >BOT4</div></td> </tr> </table> </div> </body> </html> что нужно указать для BOT4 чтобы было видно целиком данный div id="bot4", а не 0.5, что устанавлен для div id="table"; заранее благодарен.
  16. Нужна помощь по JS (не безвозмездно) ICQ 193737244
  17. Если бы был савсем умным то не просил прочитать
  18. Помогите прочитать jQuery(function( $ ){ $.easing.elasout = function(x, t, b, c, d) { var s=1.70158;var p=0;var a=c; if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3; if (a < Math.abs©) { a=c; var s=p/4; } else var s = p/(2*Math.PI) * Math.asin (c/a); return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b; }; $('button').click(function(){ var index = parseInt( $(this).prev('input').val() ) || 0; var $c = $(this).parent().next(); $c.stop().scrollTo('li:eq('+index+')', {speed:2500, easing:'elasout',axis:$c.attr('id')}); }); $('#btn_screen').click(function(){ $.scrollTo( $('#txt_screen').val(), {speed:2500} ); }); $('div.container a').click(function(){ var $c = $(this).parents('.container'); $c.stop().scrollTo( 0, {speed:2000,axis:$c.attr('id'), queue:true} ); return false; }); }); поставте коменты для каждой строки хочу понять что тут происходит. Я не очень силен JS
  19. rrock

    scrollTo

    нашел положение div abonents по вертикали относительно родительского блока (выше него только document) Видимая часть его известна так как сам ее и задавал только не пойму что значит "установить родителю scrollTop на такую величину чтобы div abonents был по середине" может имелось в виду div abonent_bla_bal а не div abonents и кому устанавливать scrollTop? Подскажите пожалуйста синтаксис.
  20. Нужен пример того что есть а то на пальцах как то не получается тебя понять Стяни сайт и выложи html и css
  21. rrock

    !DOCTYPE

    попробуй doctype вааще убрать. пока не сталкивался с проблемой нехватки doctype пишу под IE и FF
  22. Если код выводит php то $text = str_replace('<p>', '', $text); и $text = str_replace('<\/p>', '', $text); помойму так насчет экранирующего символа могу ошибаться
  23. Вижу никто справиться не может
  24. rrock

    scrollTo

    ладно попробую разобраться. Спасибо
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. See more about our Guidelines and Privacy Policy