Jump to content


Check out our Community Blogs

Register and join over 40,000 other developers!


Recent Status Updates

View All Updates

Photo
- - - - -

This Application Run In Only Internet Explore. I Need To Run This Code In Chrome

html5 javascript html java

This topic has been archived. This means that you cannot reply to this topic.
3 replies to this topic

#1 dilansarith

dilansarith

    CC Lurker

  • Just Joined
  • Pip
  • 2 posts

Posted 10 June 2015 - 09:20 PM

hi

This is demo application of my document camera. but it works only in Internet Explore. I need to run that code in chrome. But when i try to open the camara via chrome browser, it does not working. can anyone help me to fix this please....

 

I attached the html file in below....please help

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">


<script language="JavaScript1.2">
       function Start_camera_onclick()
        {
        var str = captrue.bStartPlay(); 	
        }

         function Stop_onclick()
        {
  	var str=captrue.bStopPlay();
        }

	function SaveJPG_onclick()
	{
        var str=captrue.bSaveJPG("d:\\","JPG");
	}

	function ParaSet_onclick()
	{
		var str=captrue.displayVideoPara();
	}
        
        function AutoFocus_onclick_On()
        {
            
         captrue.vSetFocus(0, true);
           
        }
        
        function AutoFocus_onclick_Off()
        {
            
           captrue.vSetFocus(0, false);
           
        }
        
        function ZoomIn_onclick()
        {
            captrue.vZoomIn();
        }
        
        function ZoomOut_onclick()
        {
            captrue.vZoomOut();
        }
        
        function Set_Highest_Res_onclick()
        {
            capture.vSetResolution(7);
        }
</script>

</head>

<body>

<div style="text-align:center;" >
<object classid="clsid:454C18E2-8B7D-43C6-8C17-B1825B49D7DE" id="captrue"  width="480" height="360" ></object>
</div>

  <br/>
  <form method="POST" action="--WEBBOT-SELF--" name="form1">
  <input type="button" value="Main camera" name="StartBtn" onClick="Start_camera_onclick()">
 
  <input type="button" value="Stop" name="StopBtn" onClick="Stop_onclick()">
  <input type="button" value="JPG" name="SaveJPGBtn" onClick="SaveJPG_onclick()">
  
  <input type="button" value="Set parameter" name="ParaSet" onClick="ParaSet_onclick()">
  
  <input type="button" value="Auto focus On" name="autofocusOn" onClick="AutoFocus_onclick_On()">
  <input type="button" value="Auto focus Off" name="autofocusOff" onClick="AutoFocus_onclick_Off()">
  
  <input type="button" value="Zoom In" name="ZoomIn" onClick="ZoomIn_onclick()">
  <input type="button" value="Zoom Out" name="ZoomOut" onClick="ZoomOut_onclick()">
  
  <input type="button" value="Set resolution" name="set_Highest_Res" onClick="Set_Highest_Res_onclick()">
  
</form>

</body>
</html>

[attachment=11864:test.html][attachment=11864:test.html][attachment=11864:test.html]

 

 

 



#2 WingedPanther73

WingedPanther73

    A spammer's worst nightmare

  • Moderator
  • 17757 posts

Posted 11 June 2015 - 04:03 AM

First thing I noticed: sometimes you use captrue, sometimes capture. Neither appears to be defined anywhere.


Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

My MineCraft server site: http://banishedwings.enjin.com/


#3 PBJ

PBJ

    CC Addict

  • Advanced Member
  • PipPipPipPipPip
  • 176 posts

Posted 13 June 2015 - 09:18 AM

If you plan on building a web application, that is truly cross-browser friendly and maintainable, you're going to want to use some JavaScript framework. For help on picking out the right framework, check out choosing the right JavaScript framework. A framework will take care of a lot of the heavy lifting that goes on behind the scenes for you.


Edited by PBJ, 13 June 2015 - 09:18 AM.


#4 TECHNECK

TECHNECK

    CC Newcomer

  • Member
  • PipPip
  • 12 posts

Posted 10 July 2015 - 07:34 AM

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">


<script>
       function Start_camera_onclick()
        {
        var str = captrue.bStartPlay(); 	
        }

         function Stop_onclick()
        {
  	var str=captrue.bStopPlay();
        }

	function SaveJPG_onclick()
	{
        var str=captrue.bSaveJPG("d:\\","JPG");
	}

	function ParaSet_onclick()
	{
		var str=captrue.displayVideoPara();
	}
        
        function AutoFocus_onclick_On()
        {
            
         captrue.vSetFocus(0, true);
           
        }
        
        function AutoFocus_onclick_Off()
        {
            
           captrue.vSetFocus(0, false);
           
        }
        
        function ZoomIn_onclick()
        {
            captrue.vZoomIn();
        }
        
        function ZoomOut_onclick()
        {
            captrue.vZoomOut();
        }
        
        function Set_Highest_Res_onclick()
        {
            capture.vSetResolution(7);
        }
</script>

</head>

<body>

<div style="text-align:center;" >
<object classid="clsid:454C18E2-8B7D-43C6-8C17-B1825B49D7DE" id="captrue"  width="480" height="360" ></object>
</div>

  <br/>
  <form method="POST" action="--WEBBOT-SELF--" name="form1">
  <input type="button" value="Main camera" name="StartBtn" onClick="Start_camera_onclick()">
 
  <input type="button" value="Stop" name="StopBtn" onClick="Stop_onclick()">
  <input type="button" value="JPG" name="SaveJPGBtn" onClick="SaveJPG_onclick()">
  
  <input type="button" value="Set parameter" name="ParaSet" onClick="ParaSet_onclick()">
  
  <input type="button" value="Auto focus On" name="autofocusOn" onClick="AutoFocus_onclick_On()">
  <input type="button" value="Auto focus Off" name="autofocusOff" onClick="AutoFocus_onclick_Off()">
  
  <input type="button" value="Zoom In" name="ZoomIn" onClick="ZoomIn_onclick()">
  <input type="button" value="Zoom Out" name="ZoomOut" onClick="ZoomOut_onclick()">
  
  <input type="button" value="Set resolution" name="set_Highest_Res" onClick="Set_Highest_Res_onclick()">
  
</form>

</body>
</html>

Try it this way I believe declaring the language is throwing cross-browser encoding issues.






Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download