Error expected javascript :(
Bonjour,
J'ai une érreur absolument incompréhensible, j'ai une page aspx qui me permet de communiquer avec un WebService.
Tout fonctionne TRES BIEN quand je lance mon IE avec un compte qui a un grand nombre de droits.
Et quand je lance avec un autre compte qui a moins de droit j'ai une erreur (sur IE) "Object expected".
Si vou pouviez m'aider ... j ne comprends pas cette différence avec 2 comptes ou l'un fonctionne parfaitement et l'autre ne m'utilise pas ma fonction ajax ....
Si vous pouviez m'aider ca serait ....
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113
| <%@ Page Language="C#" CodeFile="Default.aspx.cs" Inherits="SamplePage" AutoEventWireup="true" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.SqlClient" %>
<html>
<head>
<title> Remove Computer </title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js"></script>
<link rel="stylesheet" href="Styles/Styles1.css" type="text/css" />
<script type="text/javascript">
$(document).ready(function () {
$("#btnCallWebService").click(function (event) {
jQuery.support.cors = true;
var wsUrl = "http://org33nt:8080/SCCM.asmx?op=RemoveComputerFromCollection";
var soapRequest =
'<?xml version="1.0" encoding="utf-8"?> \
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" \
xmlns:xsd="http://www.w3.org/2001/XMLSchema" \
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> \
<soap:Body> \
<RemoveComputerFromCollection xmlns="http://maikkoster.com/Deployment"> \
<macAddress>' + $("#macAddress").val() + '</macAddress>\
<UUID>' + $("#UUID").val() + '</UUID>\
<CollectionID>' + $("#ResultID").val() + '</CollectionID>\
<ComputerName>' + $("#ComputerName").val() + '</ComputerName>\
</RemoveComputerFromCollection>\
</soap:Body> \
</soap:Envelope>';
$.ajax({
type: "POST",
url: wsUrl,
contentType: "text/xml",
dataType: "xml",
data: soapRequest,
success: processSuccess,
error: processError
});
alert("Your computer now start your OSD installation");
});
});
function processSuccess(data, status, req) {
if (status == "success")
$("#response").text($(req.responseXML).find("RemoveComputerFromCollection").text());
}
function processError(data, status, req) {
alert(req.responseText + " " + status);
}
</script>
</head>
<body>
<div id="bloc_page">
<div id ="header">
<h1> Remove Computer </h1>
<div id="FirstTime">
<SCRIPT LANGUAGE="JavaScript">
function PopupImage(img) {
w=open("",'image','weigth=toolbar=no,scrollbars=no,resizable=yes, width=900, height=650');
w.document.write("<HTML><BODY><IMG src='"+img+"'>");
w.document.write("</BODY></HTML>");
w.document.close();
}
</script>
First time ? Click here <img onclick="javascript:PopupImage('images/Explanation.png')" src="images/help.png" alt="">
</div>
</div>
<form id="form1" runat="server">
<div id ="macAddressForm">
MacAddress : <asp:TextBox ID="macAddress" runat="server"></asp:TextBox>
<asp:Button id="Button2" runat="server" onclick="Button2_Click" Text="Check" > </asp:Button>
</div>
<div id ="UUIDForm">
UUID : <asp:TextBox ID="UUID" runat="server"></asp:TextBox>
</div>
<div id ="ComputerNameForm">
ComputerName : <asp:TextBox ID="ComputerName" runat="server"></asp:TextBox>
<asp:Button id="Button3" runat="server" onclick="Button3_Click" Text="Check" > </asp:Button>
</div>
<div id ="collectiongroup">
<div id ="CollectionIDForm">
Search Collection : <asp:TextBox ID="Collection" runat="server"></asp:TextBox>
<asp:Button id="Button1" runat="server" onclick="Button1_Click" Text="Search" > </asp:Button>
</div>
<div id ="SearhCollectionForm">
<asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True" onselectedindexchanged="DropDownList1_SelectedIndexChanged"></asp:DropDownList>
</div>
<div id="ResultIDform">
CollectionID : <asp:TextBox ID="ResultID" runat="server"></asp:TextBox>
</div>
</div>
<div id ="CallForm">
<input id="btnCallWebService" value="Send" type="button" />
</div>
</form>
</div>
</body>
</html> |