Problems with WebServer Behavior ! | | |
Hi. I have the following HTML (snip):
_____________________________________________
<body MS_POSITIONING="GridLayout" onload="Init()">
<form id="frmWebServerAdvanced_1Test" method="post" runat="server">
<div id="service" style="behavior:url(webservice.htc)"
onresult="Service_Result()"></div>
°Fahrenheit: <input id="txtFahrenheit">
<input type="Button" value="Convert !" onclick="Button_Click()">
<hr>
<span id="lblCelsius"></span>
</form>
</body>
_____________________________________________
and the following script:
_____________________________________________
<script language="javascript">
var intCallID=0;
function Init()
{
service.useService("http://localhost/aspnetprojects/vsnet/WebServerAdvanced_1/TemperatureWithBehaviour.asmx?WSDL","TemperatureWi thBehaviour");}function Service_Result(){ //If there is an error, and the call came from the call() in init() if((event.result.error) && (intCallID == event.result.id)) { //Pull the error information from the event.result.errorDetailproperties var xfaultcode = event.result.errorDetail.code; var xfaultstring = event.result.errorDetail.string; var xfaultsoap = event.result.errorDetail.raw; alert(xfaultstring); //Add code to handle specific error codes here } //If there was no error, and the call came from the call() in init() else if((!event.result.error) && (intCallID == event.result.id)) { //Show the result ! lblCelsius.innertext="The result of the conversion is " +event.result.value + " °Fahrenheit" //alert("The result of the conversion is " + event.result.value +"°Fahrenheit"); } else { alert("Something else fired the event!"); }}function Button_Click(){ intCallID = service.TemperatureWithBehaviour.callService("ToCe lsius",txtFahrenheit.value); //intCallID = service.TemperatureWithBehaviour.callService("ToCe lsius",87);}</script>___________________________________________ __I have the following problems -1. Microsoft JScript runtime error: 'txtFahrenheit' is undefinedIf I comment out the line, as above, and enter a fixed value, it works okay.2. lblCelsius.innertext does not work - it does not complain, but it simplydoes not work. However, ALERT works just fine. I obtain"The result of the conversions is 30.55..." etcWhat am I missing here ? I look at the HTML and everything seems to be inorder.Thank you, Alex. | | | | re: Problems with WebServer Behavior !
Sorry, outlook completely messed up my tabs in the previous post. Here it is
again:
Hi. I have the following HTML (snip):
_____________________________________________
<body MS_POSITIONING="GridLayout" onload="Init()">
<form id="frmWebServerAdvanced_1Test" method="post" runat="server">
<div id="service" style="behavior:url(webservice.htc)"
onresult="Service_Result()"></div>
°Fahrenheit: <input id="txtFahrenheit">
<input type="Button" value="Convert !" onclick="Button_Click()">
--------------------------------------------------------------------------------
<span id="lblCelsius"></span>
</form>
</body>
_____________________________________________
and the following script:
_____________________________________________
<script language="javascript">
var intCallID=0;
function Init()
{
service.useService("http://localhost/aspnetprojects/vsnet/WebServerAdvanced_1/TemperatureWithBehaviour.asmx?WSDL","TemperatureWi thBehaviour");}function Service_Result(){ //If there is an error, and the call came from the call() in init() if((event.result.error) && (intCallID == event.result.id)) { //Pull the error information from the event.result.errorDetailproperties var xfaultcode = event.result.errorDetail.code; var xfaultstring = event.result.errorDetail.string; var xfaultsoap = event.result.errorDetail.raw; alert(xfaultstring); //Add code to handle specific error codes here } //If there was no error, and the call came from the call() in init() else if((!event.result.error) && (intCallID == event.result.id)) { //Show the result ! lblCelsius.innertext="The result of the conversion is " +event.result.value + " °Fahrenheit" //alert("The result of the conversion is " + event.result.value +"°Fahrenheit"); } else { alert("Something else fired the event!"); }}function Button_Click(){ intCallID = service.TemperatureWithBehaviour.callService("ToCe lsius",txtFahrenheit.value); //intCallID = service.TemperatureWithBehaviour.callService("ToCe lsius",87);}</script>___________________________________________ _ I have the following twoproblems - 1. Microsoft JScript runtime error: 'txtFahrenheit' is undefinedIf I comment out the line, as above, and enter a fixed value, it works okay.2. lblCelsius.innertext does not work - it does not complain, but it simplydoes not work. However, ALERT works just fine. I obtain "The result of theconversions is 30.55..." etc What am I missing here ? I look at the HTML andeverything seems to be in order. Thank you, Alex. | | | | re: Problems with WebServer Behavior !
Sorry, outlook completely messed up my tabs in the previous post. Here it is
again:
Hi. I have the following HTML (snip):
_____________________________________________
<body MS_POSITIONING="GridLayout" onload="Init()">
<form id="frmWebServerAdvanced_1Test" method="post" runat="server">
<div id="service" style="behavior:url(webservice.htc)"
onresult="Service_Result()"></div>
°Fahrenheit: <input id="txtFahrenheit">
<input type="Button" value="Convert !" onclick="Button_Click()">
--------------------------------------------------------------------------------
<span id="lblCelsius"></span>
</form>
</body>
_____________________________________________
and the following script:
_____________________________________________
<script language="javascript">
var intCallID=0;
function Init()
{
service.useService("http://localhost/aspnetprojects/vsnet/WebServerAdvanced_1/TemperatureWithBehaviour.asmx?WSDL","TemperatureWi thBehaviour");}function Service_Result(){ //If there is an error, and the call came from the call() in init() if((event.result.error) && (intCallID == event.result.id)) { //Pull the error information from the event.result.errorDetailproperties var xfaultcode = event.result.errorDetail.code; var xfaultstring = event.result.errorDetail.string; var xfaultsoap = event.result.errorDetail.raw; alert(xfaultstring); //Add code to handle specific error codes here } //If there was no error, and the call came from the call() in init() else if((!event.result.error) && (intCallID == event.result.id)) { //Show the result ! lblCelsius.innertext="The result of the conversion is " +event.result.value + " °Fahrenheit" //alert("The result of the conversion is " + event.result.value +"°Fahrenheit"); } else { alert("Something else fired the event!"); }}function Button_Click(){ intCallID = service.TemperatureWithBehaviour.callService("ToCe lsius",txtFahrenheit.value); //intCallID = service.TemperatureWithBehaviour.callService("ToCe lsius",87);}</script>___________________________________________ _ I have the following twoproblems - 1. Microsoft JScript runtime error: 'txtFahrenheit' is undefinedIf I comment out the line, as above, and enter a fixed value, it works okay.2. lblCelsius.innertext does not work - it does not complain, but it simplydoes not work. However, ALERT works just fine. I obtain "The result of theconversions is 30.55..." etc What am I missing here ? I look at the HTML andeverything seems to be in order. Thank you, Alex. | | | | re: Problems with WebServer Behavior !
Problems with WebServer Behaviour !
Hi. I have the following HTML (snip):
_____________________________________________
<body MS_POSITIONING="GridLayout" onload="Init()">
<form id="frmWebServerAdvanced_1Test" method="post" runat="server">
<div id="service" style="behavior:url(webservice.htc)"
onresult="Service_Result()"></div>
°Fahrenheit: <input id="txtFahrenheit">
<input type="Button" value="Convert !" onclick="Button_Click()">
<span id="lblCelsius"></span>
</form>
</body>
_____________________________________________
and the following script:
_____________________________________________
<script language="javascript">
var intCallID=0;
function Init()
{
service.useService("http://localhost/aspnetprojects/vsnet/WebServerAdvanced_1/TemperatureWithBehaviour.asmx?WSDL","TemperatureWi thBehaviour");}function Service_Result(){ //If there is an error, and the call came from the call() in init() if((event.result.error) && (intCallID == event.result.id)) { //Pull the error information from the event.result.errorDetailproperties var xfaultcode = event.result.errorDetail.code; var xfaultstring = event.result.errorDetail.string; var xfaultsoap = event.result.errorDetail.raw; alert(xfaultstring); //Add code to handle specific error codes here } //If there was no error, and the call came from the call() in init() else if((!event.result.error) && (intCallID == event.result.id)) { //Show the result ! lblCelsius.innertext="The result of the conversion is " +event.result.value + " °Fahrenheit" //alert("The result of the conversion is " + event.result.value +"°Fahrenheit"); } else { alert("Something else fired the event!"); }}function Button_Click(){ intCallID = service.TemperatureWithBehaviour.callService("ToCe lsius",txtFahrenheit.value); //intCallID = service.TemperatureWithBehaviour.callService("ToCe lsius",87);}</script>___________________________________________ __I have the following two problems -1. Microsoft JScript runtime error: 'txtFahrenheit' is undefinedIf I comment out the line, as above, and enter a fixed value, it works okay.2. lblCelsius.innertext does not work - it does not complain, but it simplydoes not work. However, ALERT works just fine. I obtain"The result of the conversions is 30.55..." etcWhat am I missing here ? I look at the HTML and everything seems to be inorder.Thank you, Alex. | | | | re: Problems with WebServer Behavior !
Problems with WebServer Behaviour !
Hi. I have the following HTML (snip):
_____________________________________________
<body MS_POSITIONING="GridLayout" onload="Init()">
<form id="frmWebServerAdvanced_1Test" method="post" runat="server">
<div id="service" style="behavior:url(webservice.htc)"
onresult="Service_Result()"></div>
°Fahrenheit: <input id="txtFahrenheit">
<input type="Button" value="Convert !" onclick="Button_Click()">
<span id="lblCelsius"></span>
</form>
</body>
_____________________________________________
and the following script:
_____________________________________________
<script language="javascript">
var intCallID=0;
function Init()
{
service.useService("http://localhost/aspnetprojects/vsnet/WebServerAdvanced_1/TemperatureWithBehaviour.asmx?WSDL","TemperatureWi thBehaviour");}function Service_Result(){ //If there is an error, and the call came from the call() in init() if((event.result.error) && (intCallID == event.result.id)) { //Pull the error information from the event.result.errorDetailproperties var xfaultcode = event.result.errorDetail.code; var xfaultstring = event.result.errorDetail.string; var xfaultsoap = event.result.errorDetail.raw; alert(xfaultstring); //Add code to handle specific error codes here } //If there was no error, and the call came from the call() in init() else if((!event.result.error) && (intCallID == event.result.id)) { //Show the result ! lblCelsius.innertext="The result of the conversion is " +event.result.value + " °Fahrenheit" //alert("The result of the conversion is " + event.result.value +"°Fahrenheit"); } else { alert("Something else fired the event!"); }}function Button_Click(){ intCallID = service.TemperatureWithBehaviour.callService("ToCe lsius",txtFahrenheit.value); //intCallID = service.TemperatureWithBehaviour.callService("ToCe lsius",87);}</script>___________________________________________ __I have the following two problems -1. Microsoft JScript runtime error: 'txtFahrenheit' is undefinedIf I comment out the line, as above, and enter a fixed value, it works okay.2. lblCelsius.innertext does not work - it does not complain, but it simplydoes not work. However, ALERT works just fine. I obtain"The result of the conversions is 30.55..." etcWhat am I missing here ? I look at the HTML and everything seems to be inorder.Thank you, Alex. |  | | | | /bytes/about
We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights.
Get the best answers to your questions from over 226,449 network members.
|