passing parameters from winform to html document

new2this

Member
Joined
Nov 20, 2009
Messages
15
Location
Durban, KwaZulu-Natal, South Africa
Programming Experience
Beginner
hi guys

i have a windows form that has a web browser control.

i need to pass the value from the windows form to the html doc.

here is my problem.... can pass the value across to to a function in the html page but when i try to pass the same value to an image tag in the same document it does not read the value.

here is my code from the winform
VB.NET:
    If e.Url.Equals(wb1.Url) Then
            wb1.Document.InvokeScript("fetchImage", New Object() {path})
        End If

it passes through the variable 'path' to a function in the html doc.

heres the code for the html doc.... this part of the code works

VB.NET:
 function fetchImage(path) {
        var now = new Date();
        var zm_image = new Image();
        zm_image.src = path + '&' + now.getTime();

        document['zmImage'].src = zm_image.src;
    }

here is where my problem lies.

when i pass the parameter 'path' to an image tag in the html doc it doesn't read the value

VB.NET:
<img name="zmImage" src=path alt="Cam1" border="0" width="320" height="240">

basically i need to know how to pass through the value 'path' to the image tag :confused:

thanks
 
Back
Top