
    Новые сообщения [новые:0]
  
  Дайджест 
  
  Горячие темы
    Избранное [новые:0]
  
Форумы 
 
Пользователи 
Статистика 
Статистика нагрузки 
    Мод. лог 
  
  Поиск 
| 
 | 
| 23.01.2007, 15:27 | |||
|---|---|---|---|
| (Javascript) Ошибка на странице | |||
| #18+ Скажите пожалуйста, почему в таком скрипте мне выдается ошибка на странице, когда я пытаюсь нажать на ссылку? По ходу дела есть какая-то ошибка в  Javascript. Заранее благодарен. автор<html> <head> <META HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=windows-1251'> <script language="JavaScript" type="text/javascript"> function loadPages(ww){ document.getElementById('main').src='about_palmers1.php?code=ww'; document.getElementById('type_tripe').src='type_tripe.php'; } </script> <LINK HREF='style.css' TYPE='text/css' REL='stylesheet'> </head> <body bgcolor='#FCF4E7'> <br><br><table border='0' cellpadding='0' cellspacing='0' width='530'> <?php require('main.php'); require(INC_DIR); db_connect(); $result = mysql_query ("select id, date, name, comment from `schedule1` order by id") or die("Проблемма с запросом"); $num_fields= mysql_num_fields($result); while ($row = mysql_fetch_array($result)) { echo "<tr><td valign='top' width='300' height='40'><a CLASS='menubar' HREF=javascript:loadPages("; echo $row["id"]; echo ")"; echo " target='main'><font class='tahbol' style='COLOR:#765043; font-weight:700'>"; echo $row["name"]; echo "</a></font></td><td valign='top' width='230' height='40' align='right'><font class='tahbol' style='COLOR:#765043; font-weight:700' size='4'>"; echo $row["date"]; echo "</font></td></tr>"; } ?> </table> </body> </html> ... | |||
| : 
 Нравится:
     Не нравится:
     | |||
|  | 
| 23.01.2007, 16:12 | |||
|---|---|---|---|
| (Javascript) Ошибка на странице | |||
| #18+ vahмне выдается ошибка на странице Вот и выложили бы страницу, а не то как вы её генерируете ... | |||
| : 
 Нравится:
     Не нравится:
     | |||
|  | 
| 26.01.2007, 13:10 | |||
|---|---|---|---|
| 
 | |||
| (Javascript) Ошибка на странице | |||
| #18+ document.getElementById('main') выдает, поскольку нет на странице элемента с таким id. ... | |||
| : 
 Нравится:
     Не нравится:
     | |||
|  | 
| 26.01.2007, 13:21 | |||
|---|---|---|---|
| (Javascript) Ошибка на странице | |||
| #18+ У меня main формируется в другом php ... | |||
| : 
 Нравится:
     Не нравится:
     | |||
|  | 
| 29.01.2007, 12:34 | |||
|---|---|---|---|
| (Javascript) Ошибка на странице | |||
| #18+ У меня один ПХП вставлен в другой ПХП. Как можно из JavaScript второго ПХП обратиться к 'main' первого пхп? ПХП1: автор<HTML> <HEAD> <TITLE></TITLE> <LINK HREF="style.css" TYPE="text/css" REL="stylesheet"> <STYLE TYPE="TEXT/CSS"> BODY { SCROLLBAR-FACE-COLOR: #7C98A6; SCROLLBAR-HIGHLIGHT-COLOR: #ffffff; SCROLLBAR-SHADOW-COLOR: #cccccc; SCROLLBAR-3DLIGHT-COLOR: #ffffff; SCROLLBAR-ARROW-COLOR: #f8f8f8; SCROLLBAR-TRACK-COLOR: #f8f8f8; SCROLLBAR-DARKSHADOW-COLOR: #000000 } </STYLE> <style type="text/css"> <!-- img { border: none; } .tah10 { font-family: Tahoma; font-size: 10px; text-decoration: none; } .tah11 { font-family: Tahoma; font-size: 11px; text-decoration: none; } .ver10 { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; text-decoration: none; } .ver11 { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; text-decoration: none; } --> </style> <style type="text/css"> <!-- .spec { background-repeat: repeat-x; background-position: bottom; } --> </style> <style type="text/css"> <!-- .tahbol { font-family: Tahoma; font-size: 11px; text-decoration: none; font-weight: bold; color: 636363; } --> </style> <style type="text/css"> <!-- .tops { background-repeat: repeat-x; background-position: top; } --> </style> </head> <body leftmargin="0" topmargin="0" rightmargin="0" bottommargin="0" marginwidth="0" marginheight="0"> <table border="0" cellpadding="0" cellspacing="0" width="1024" height="893"> <!-- MSTableType="layout" --> <tr> <td valign="top" colspan="3" height="72"> <!-- MSCellType="ContentHead" --> <img border="0" src="img/cap.gif" width="1024" height="72" align="bottom"></td> </tr> <tr> <td valign="top" width="143" background="img/left.gif"> <!-- MSCellType="NavBody" --> <p> </p> <p> </p> <p align="left"> <b> <a CLASS="menubar" HREF="palmers1.php" target="main"> <font face="Verdana"> ПОЕЗДКИ </font> </a> </b> </p> <p align="left"> <span lang="ru"> <b> <a CLASS="menubar" HREF="temp.php" target="main"> <font face="Verdana">ГАЛЕРЕЯ</font> </a> </b> </span> </p> <p align="left"> <span lang="ru"> <b> <a CLASS="menubar" HREF="temp.php" target="main"> <font face="Verdana">ФОРУМ</font> </a> </b> </span> </p> <p align="left"> <span lang="ru"> <b> <a CLASS="menubar" HREF="temp.php" target="main"> <font face="Verdana"> КЛУБ </font> </a> </b> </span> </p> <p align="left"> <b> <span lang="ru"> <a CLASS="menubar" HREF="contact.php" target="main"> <font face="Verdana">КОНТАКТЫ</font> </a> </span> </b> </td> <td valign="top" width="573"> <!-- MSCellType="ContentBody" --> <iframe src="about_us.php" name="main" width="573" height="711" frameborder="no" id="main"> Ваш браузер не поддерживает iframe! </iframe> </td> <td valign="top" height="720" width="308" background="img/right.gif"> <p align="center"> <iframe src="fon.php" name="type_tripe" width="180" height="20" frameborder="no" scrolling="no"> Ваш браузер не поддерживает iframe! </iframe> </p> <span lang="ru"> </span> <p> </p> <p> </p> <p align="center"> <p align="center"> </td> </tr> <tr> <td valign="top" colspan="3" height="101"> <!-- MSCellType="ContentFoot" --> <img border="0" src="img/down.gif" width="1024" height="101"></td> </tr> </table> </body> </html> ПХП2: автор<html> <head> <META HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=windows-1251'> <script language="JavaScript" type="text/javascript"> function loadPages(a){ document.getElementById('main').src=a; document.getElementById('type_tripe').src='type_tripe.php'; } </script> <LINK HREF='style.css' TYPE='text/css' REL='stylesheet'> </head> <body bgcolor='#FCF4E7'> <br><br><table border='0' cellpadding='0' cellspacing='0' width='530'> <?php require('main.php'); require(INC_DIR); db_connect(); $result = mysql_query ("select id, date, name, comment from `schedule1` order by id") or die("Проблемма с запросом"); $num_fields= mysql_num_fields($result); while ($row = mysql_fetch_array($result)) { echo "<tr><td valign='top' width='300' height='40'><a CLASS='menubar' HREF=javascript:loadPages('about_palmers1.php?code="; echo $row["id"]; echo "')";echo "><font class='tahbol' style='COLOR:#765043; font-weight:700'>"; echo $row["name"]; echo "</a></font></td><td valign='top' width='230' height='40' align='right'><font class='tahbol' style='COLOR:#765043; font-weight:700' size='4'>"; echo $row["date"]; echo "</font></td></tr>"; } ?> </table> </body> </html> ... | |||
| : 
 Нравится:
     Не нравится:
     | |||
|  | 
| 
 | 

| start [/forum/topic.php?fid=22&tablet=1&tid=1458884]: | 0ms | 
| get settings: | 8ms | 
| get forum list: | 12ms | 
| check forum access: | 3ms | 
| check topic access: | 3ms | 
| track hit: | 37ms | 
| get topic data: | 10ms | 
| get forum data: | 2ms | 
| get page messages: | 42ms | 
| get tp. blocked users: | 1ms | 
| others: | 15ms | 
| total: | 133ms | 

 
    | 0 / 0 | 
