I get this from the source code:
I get this from firebug:HTML Code:<div class="row-fluid"> <div class="span12 "> <div class="control-group"> <label class="control-label" for="firstName">Description</label> <div class="controls"> <textarea class="m-wrap span12 wysiwyg" style="height:300px;" id="listing_description" name="listing_description"> </textarea> </div>
My source code looks like this:HTML Code:<label class="control-label" for="firstName">Description</label> <div class="controls"> <div class="redactor_box"> <ul id="redactor_toolbar_0" class="redactor_toolbar"> <iframe frameborder="0" style="width: 100%; min-height: 200px; height: 400px;"> <html> <head> </head> <body contenteditable="true" dir="ltr"> <p></p> 'NOTE: This is where manual typing appears </body> </html> </iframe> <textarea id="listing_description" class="m-wrap span12 wysiwyg" name="listing_description" style="height: 300px; display: none;" dir="ltr"> </textarea>
Doesn't work. I even tried this...Code:If (WebBrowser1.Document IsNot Nothing) Then Dim Elems As HtmlElementCollection = WebBrowser1.Document.GetElementsByTagName("textarea") For Each elem As HtmlElement In Elems Dim NameStr As String = elem.GetAttribute("id") If NameStr = "listing_description" Then elem.SetAttribute("value", Form1.TextBoxReturns.Text & Form1.TextBoxExtra.Text) Next End If
No results either. What am I not doing?Code:If (WebBrowser1.Document IsNot Nothing) Then Dim Elems As HtmlElementCollection = WebBrowser1.Document.GetElementsByTagName("iframe") For Each elem As HtmlElement In Elems Dim NameStr As String = elem.GetAttribute("style") If NameStr = "width: 100%; min-height: 200px; height: 400px;" Then elem.SetAttribute("value", Form1.TextBoxReturns.Text & Form1.TextBoxExtra.Text) Next End If


Reply With Quote
