Click here to Skip to main content
15,896,606 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
Please any help for my problem i work with visual studio 2016 and when i want to navigate to html page wuth webbrowser control on vb or c# i get a error script number 1028 with this code:
JavaScript
$(function() {		
		initDatePicker()
	});

	/* gestion des calandrier */
	function initDatePicker(){
		$( ".datepicker" ).each(function() {
			if (!$(this).attr('title')){
				/* Calenderier sans interval des années */
			    $(this).datepicker({
			        dateFormat: "dd/mm/yy",
			        changeMonth: true,
			        changeYear: true,
			        showOn: "button",
			        buttonImage: '/GID.Web/styles/img/date.png',
			        buttonImageOnly: true
			    });
			}			
			else {			
				/*
				 * Calenderier sans interval des années et strictement intégré dans
				 * la proprety title ex: [title="2011,2012"}
				 */
				minidate = $(this).attr('title').split(":")[0];
				maxidate = $(this).attr('title').split(":")[1];
				$(this).datepicker({
					    dateFormat: "dd/mm/yy",
					    showOn: "button",
					    changeMonth: true,
					    changeYear: true,
					    buttonImage: '/GID.Web/styles/img/date.png' ,  
					    buttonImageOnly: true,
					    yearRange: $(this).attr('title'),
					    minDate: new Date(minidate, 1 - 1, 1),
					    maxDate: new Date(maxidate, 12 - 1, 31)
				})
			}
			
		});
		
	}

when i load this page with IE or firefox its works but it doesnt work with webbrowser

when i put WebBrowser1.ScriptErrorsSuppressed() = True it give me http 404 error

Please help...

What I have tried:

WebBrowser1.ScriptErrorsSuppressed() = True it give me http 404 error

Please help...
Posted
Updated 14-Jul-17 4:18am
v2
Comments
Afzaal Ahmad Zeeshan 13-Jul-17 14:58pm    
Doesn't 404 mean that the resource you are looking for doesn't exist?

First, a 404 means that the resource (URL) your code is trying to get something from doesn't exist on the web server.

Second, there's no such thing as Visual Studio 2016. It's either 2015 or 2017.
 
Share this answer
 
Unless you modify the registry on every computer where your application runs, the WebBrowser control is stuck in IE7 mode:
Web Browser Control & Specifying the IE Version - Rick Strahl's Web Log[^]

To support that, you'll need to ensure that you stick with the 1.x branch of jQuery:
Browser Support | jQuery[^]

You'll also need to ensure that every other script you use is designed to work in such an old version.

Alternatively, you might want to consider using something like CefSharp[^] instead, which uses the same rendering engine as Chrome.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900