| re: WebServer "Behavior" question
Fantastic :-))))
1. It was innerText, not innertext !
2. For some (very obscure to me) reason,
intCallID = service.TemperatureWithBehaviour.callService("ToCe lsius",
document.all["txtFahrenheit"].value);
works, but
intCallID = service.TemperatureWithBehaviour.callService("ToCe lsius",
txtFahrenheit.value);
doesn't - it says that 'txtFahrenheit' is undefined.
(Even the debugger says the same thing - that 'txtFahrenheit' is undefined.
However, when I tried with document.all["txtFahrenheit"].value, it showed my
value (32) correctly. Hmmmmm......)
Something else, please, I see that you're *very* knowledgeable, if I may:
1. If I have another webservice which returns an image (a jpeg) as a byte
array (and it works fine), how could I show the picture in a frame (or, even
better, in a "img" element) ? Right now I have the code:
Dim objBinaryWebService As New localhost.ImagesWebService()
Response.Clear()
Response.ClearHeaders()
Response.ContentType = "image/jpeg"
Response.BinaryWrite(objBinaryWebService.GetRandom Image)
objBinaryWebService.Dispose()
which works, but all my controls on the form are not even considered,
because of the Content-Type, I assume. My intent is to use this to show
random thumbnails of the "Products" in the Products table - so I plan to
stop using the web reference but use a behaviour instead, and use
setInterval("GetRandomImage()",5000) to change the images every 5 secs !
2. A simpler one - will this code I'm fighting with right now work with
Mozilla ?
Thanks again ! :-)))
Alex.
"Derek Harmon" <loresayer@msn.com> wrote in message
news:uVh6Bq9EFHA.2756@TK2MSFTNGP15.phx.gbl...[color=blue]
> "Alex Nitulescu" <REMOVETHIScuca_macaii2000@yahoo.com> wrote in message
> news:%23eQWf%238EFHA.1292@TK2MSFTNGP10.phx.gbl...[color=green]
>> intCallID = service.TemperatureWithBehaviour.callService("ToCe lsius",
>> txtFahrenheit.value);[/color]
> : :[color=green]
>> 1. Microsoft JScript runtime error: 'txtFahrenheit' is undefined[/color]
>
> Double check (a) you don't have a typo, and (b) txtFahrenheit has a value,
> as it works for me. If nothing else occurs to you, try rummaging through
> document.all to retrieve the IHTMLElement by it's id attribute value like
> this [unverified],
>
> intCallID = service.TemperatureWithBehaviour.callService( "ToCelsius",
> document.all["txtFahrenheit"].value);
>
> or look at what Visual Studio .NET debugger tells you when you put
> txtFahrenheit into the Watch window during a debug session.
>[color=green]
>> 2. lblCelsius.innertext does not work - it does not complain, but it
>> simply does not work.[/color]
>
> It's always permissible to add an extra attribute on a client-side DOM
> element.
> Whether the browser interprets the attribute you've invented is another
> matter.
>
> Use
>
> lblCelsius.innerText = "The result of the conversion is " +
> event.result.value + " °Fahrenheit";
>
> instead (note the camel case).
>
>
> Derek Harmon
>[/color] |