Re: Return from JavaScript is System.__ComObject - Help! :)
From: Chaz Bo*** [MVP] (chaz_at_ave.nu)
Date: 02/26/04
- Next message: Axel: "Re: problem: http authentication"
- Previous message: Justin Echternach: "resizing and flickering"
- In reply to: Justin Echternach: "Re: Return from JavaScript is System.__ComObject - Help! :)"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 26 Feb 2004 20:28:14 +0000
Hey Justin,
Thanks for your reply!
I tried that, which didn't work sadly, but gave me a bit more information.
Now I get "Cast from 'JScriptTypeInfo' to 'String' is invalid...."
So the object type that I'm getting is really one of these strange
"JScriptTypeInfo" ones, on which I can't find any useful information!
Anyone got an idea how I can cast that object to a String? :)
I know it must be possible as Microsoft have an application which calls
into JavaScript functions and uses the return value.
Thanks again,
> Chaz <
Justin Echternach wrote:
> Hi Chaz,
>
> I believe you need to cast what is returned to a string.
>
> result = CStr(AxWebBrowser1.Document.parentWindow.getSomething())
>
> Justin
>
> "Chaz Bo*** [MVP]" <chaz@ave.nu> wrote in message
> news:eYaVhvm%23DHA.392@TK2MSFTNGP12.phx.gbl...
>
>>Hi guys,
>>
>>I'm calling a JavaScript function in a HTML page from VB.NET, i.e.
>>
>>function getSomething()
>>{
>>return "something";
>>}
>>
>>Calling it like this from VB.NET:
>>
>>AxWebBrowser1.Document.parentWindow.getSomething()
>>
>>The Type of the returned object though is "System.__ComObject" - I'm
>>guessing the function is actually returning a pointer to the data?
>>
>>Is there any way to get at that returned data from VB.NET? :|
>>
>>Calling the JavaScript functions work great, and I can read global
>>JavaScript variables fine; I've even got JavaScript calling my VB.NET
>>functions! It is just this one I'm stumped on...
>>
>>Would greatly appreciate any help :)
>>
>>Many thanks,
>>Chaz Bo***.
>
>
>
- Next message: Axel: "Re: problem: http authentication"
- Previous message: Justin Echternach: "resizing and flickering"
- In reply to: Justin Echternach: "Re: Return from JavaScript is System.__ComObject - Help! :)"
- Messages sorted by: [ date ] [ thread ]