I have a website that I am trying to automaticaly update.
Not sure if this is important or not, but just to provide all of the facts: it uses FCKeditor for the editing tool.
I have the following field I am trying to update:
<textarea name="fx_DESC2a" style="display:none">Find Me</textarea>
Here is the code (being called in a class) that finds the item:
Public Function SetTextarea(Caption As String) As Boolean
' finds the element containing text Caption or returns false if item cannot be found
Dim Element As HTMLButtonElement
On Error Resume Next 'for trouble shooting only til I find the right mechinism to find the textarea
11210 SetTextarea = True
11220 For Each Element In brs.document.all '.getElementsByTagName("Input")
Dim z As String
Dim x As String
Dim V As String
Dim r As String
Dim s As String
z = Element.className
x = Element.Name
V = Element.ID
r = Element.innerHTML
s = Left(Element.Value, 7) ' this will find the correct field - will be replaced with name & classname one validated more.
11230 If s = "Find Me" Then 'And InStr(r, "<td>firstTierQty</td>") > 0 Then 'z = Caption Or x = Caption Or V = Caption Or InStr(r, "firstTierQty") > 0 Then
Element.body.Value = "gotcha!" 'last test to try stuffing value....
11250 Exit Function
11260 End If
11270 Next Element
11280 SetTextarea = False
I want to be able to replace "Find Me" with some different text like:
(Ideally, I want to get into the "Source" mode and put a html table in the box. - But I have not been able to activate the button to toggle "Source" mode.) it's code is
<DIV class="TB_Button_Off" title="Source" unselectable="on">
<TABLE cellSpacing="0" cellPadding="0" unselectable="on">
<DIV class="TB_Button_Image" unselectable="on">
<IMG style="TOP: 0px" src="http://timberturners.com/i/t/hed/editor/skins/ezot/fck_strip.gif" unselectable="on" />
<TD class="TB_Button_Text" noWrap unselectable="on">
<IMG class="TB_Button_Padding" src="http://timberturners.com/i/t/hed/editor/images/spacer.gif" width="3" height="22" unselectable="on" />
This is my webstore page for the product I am trying to edit as a sample:
but for obvious reasons, I cannot supply username/pass word to get to the editing page
I maybe able to make a "copy" of the page available, but not sure if I would get all of the supporting parts/scripts etc.
For my ease of use, I am using VBA (excel) but I imagine most langages would have similiar concept to stuff a value into a site using automation.
Thanks for any help!