За последние 24 часа нас посетили 18229 программистов и 1611 роботов. Сейчас ищут 1924 программиста ...

Как часть обьекта разворачивать на всю страницу

Тема в разделе "JavaScript и AJAX", создана пользователем dslychko, 26 май 2009.

  1. dslychko

    dslychko Активный пользователь

    С нами с:
    14 июн 2007
    Сообщения:
    144
    Симпатии:
    0
    Есть скрипт

    Код (Text):
    1. <html>
    2. <title>Live Video from AXIS Camera</title>
    3. <style type="text/css"> <!-- BODY { margin: 0px; } A IMG { border: none;  border-width: 0px;} FORM { margin: 0px;} --> </style>
    4. <body>
    5. <center>
    6. <SCRIPT LANGUAGE="JavaScript">
    7. function doSubmit() { document.forms.form1.submit() }
    8. var BaseURL = "http://ip/";
    9. var Camera = "";
    10.   var ImageResolution = "704x576";var DisplayWidth = "704";var DisplayHeight = "576";
    11. var File = "axis-cgi/mjpg/video.cgi?resolution="+ImageResolution;
    12. if (Camera != "") {File += "&camera=" + Camera;}
    13. var output = "";
    14. if ((navigator.appName == "Microsoft Internet Explorer") &&
    15. (navigator.platform != "MacPPC") && (navigator.platform != "Mac68k"))
    16. {
    17. output = '<OBJECT ID="Player" width='
    18. output += DisplayWidth;
    19. output += ' height=';
    20. output += DisplayHeight;
    21. output += ' CLASSID="CLSID:DE625294-70E6-45ED-B895-CFFA13AEB044" ';
    22. output += 'CODEBASE="';
    23. output += BaseURL;
    24. output += 'activex/AMC.cab">';
    25. output += '<PARAM NAME="MediaURL" VALUE="';
    26. output += BaseURL;
    27. output += File + '">';
    28. output += '<param name="MediaType" value="mjpeg-unicast">';
    29. output += '<param name="ShowStatusBar" value="0">';
    30. output += '<param name="ShowToolbar" value="0">';
    31. output += '<param name="AutoStart" value="1">';
    32. output += '<param name="StretchToFit" value="0">';
    33. output += '<BR><B>Axis Media Control</B><BR>';
    34. output += 'The AXIS Media Control, which enables you ';
    35. output += 'to view live image streams in Microsoft Internet';
    36. output += ' Explorer, could not be registered on your computer.';
    37. output += '</OBJECT>';
    38. } else {
    39. theDate = new Date();
    40. output = '<IMG SRC="';
    41. output += BaseURL;
    42. output += File;
    43. output += '&dummy=' + theDate.getTime().toString(10);
    44. output += '" HEIGHT="';
    45. output += DisplayHeight;
    46. output += '" WIDTH="';
    47. output += DisplayWidth;
    48. output += '" ALT="Camera Image">';
    49. }
    50. document.write(output);
    51. document.Player.ToolbarConfiguration = "play,+snapshot,+fullscreen";
    52. </SCRIPT>
    53. </body>
    54. </html>
    показывает видео с видеосервера AXIS.
    Картинка разбита на 9 частей (3x3).
    Можно ли переделать скрипт таким образом, чтобы при двойном клике на одной из частей она разворачивалась на весь обьект (704x576) ?
    Куда копать ?