Jump to content
Sign in to follow this  
bhs76b

Finding fields on a jsp form with tinymce sections.

Recommended Posts

bhs76b

I have the following and need to populate the text area of a tinymce form within a jsp page.

Jon (edit): Removed propriatary code at owners request.

I tried this:

#region --- ScriptWriter generated code Start ---
Opt("WinWaitDelay",100)
Opt("WinTitleMatchMode",4)
Opt("WinDetectHiddenText",1)
Opt("MouseCoordMode",0)
 
#include <ie.au3>
 
$oIE = _IECreate("https://aci.custkb.com/aci/app/common/popups/contributeeditor.jsp")
 
;$frames = _IEFrameGetCollection($oIE);
;  $oFrames = _IEFormGetCollection ($oIE, 0)
;  $oQuery = _IEFormElementGetCollection ($oForm, 2)
 
;$numFrames = @extended ; number of frames
;ConsoleWrite("var=" & $numFRAMES & @CRLF)
;For $i = 0 to ($numFrames -1)
;   $oFrame = _IEFrameGetCollection($oIE, $i)
;   ConsoleWrite("ITEM " & $i & " " & _IEBodyReadText($oFrame) & @CRLF)
;   ConsoleWrite("ITEM " & $i & " " & $oFrame.name & @CRLF)
;Next
;$oIE = _IECreate ("http://www.google.com")
$oForm = _IEFormGetObjByName ($oIE, "editorform")
$oQuery = _IEFormElementGetObjByName ($oForm, "Aud_DIM_ProductsAndOfferings")
consolewrite("value " & " " & $oQuery.value & @CRLF)
consolewrite("id " & " " & $oQuery.id & @CRLF)
_IEFormElementOptionselect ($oQuery, "D1_Enguard", 1, "byValue")
 
$oQuery = _IEFormElementGetObjByName ($oForm, "Aud_DIM_ProductsAndOfferings")
consolewrite("value " & " " & $oQuery.value & @CRLF)
consolewrite("id " & " " & $oQuery.id & @CRLF)
 
$oQuery = _IEFormElementGetObjByName ($oForm, "Keywords")
 
_IEFormElementSetValue ($oQuery, "coach_abdallahe" & @CRLF & "swiftb")
consolewrite("value " & " " & $oQuery.value & @CRLF)
consolewrite("id " & " " & $oQuery.id & @CRLF)
 
$oDesc = _IEFormElementGetObjByName ($oForm, "Description")
$sHTML = ""
$sHTML &= "<HTML>" & @CRLF
$sHTML &= "<b>PROBLEM DESCRIPTION:</b><br>" & @CRLF
$sHTML &= " " & @CRLF
$sHTML &= "<b>ENVIRONMENT:</b>" & @CRLF
$sHTML &= "Redhat Linux" & @CRLF
$sHTML &= "</HTML>"
; Local $oFrameMain = _IEFrameGetObjByName ($oIE, "Main")
; _IEBodyWriteHTML ($oDesc, $sHTML)
_IEFormElementSetValue ($oDesc, $sHTML)
 
;_IEFormSubmit ($oForm)

The early fields set fine, the ones I have issues with are the tinymce fields.

Edited by Jon
Removed code

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.