|
|||
Version
www.capesoft.com Updated 16 November 2005 |
|||
Contents | |||
|
|||
|
The FeBrowser Object | ||
Methods - Functional Reference Listed by Usage
(New) |
|||
|
The Templates | ||
|
Useful References | ||
Summary of callback events (Updated) How to load and print a page in the background and then close the FE window Radio buttons - how to determine which one is currently selected on a page. Leveraging the power of the HTML DOM with JavaScript and FileExplorer (New) How to open Word document inside Internet Explorer, and hence inside FileExplorer (New) How to remove parts of a loaded page before displaying it to the user (New) |
|||
Functional Reference - Methods Listed by Usage | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
This list organizations the above methods by their functional use and
describes them briefly. See the list below for an
alphabetized quick reference.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
![]() Back ( ) ,byte,proc ThisViewer.Back()
|
||||||||||||||||||||||||||||||||
ClickByName
( string ElementName, long FrameNumber=0, long NameInstance=0) ,byte,proc
ThisViewer.ClickByName('Button1')
|
||||||||||||||||||||||||||||||||
ClickByRecordNumber
( long pRecordNumber, long pFrameNumber=0 ) ,byte,proc
ThisViewer.ClickByRecordNumber (5)
|
||||||||||||||||||||||||||||||||
Edit (long EditType, long pAction = 0, <string pValue>) , byte, proc The Edit method is used to call various "Editing" commands. These range from command that are in the Edit menu of the browser such as "Copy", "Paste", "Cut", "Undo" and so on to those that are in the File menu, such as "Save", "Print", "Close" and so on. Parameters long EditType
long pAction = 0 (optional)
string pValue (optional)
Return Values Returns a byte indicating success (1) or failure (0). Example: !--- Copy the entire loaded document onto the clipboard ThisViewer.Edit(fe:Browser_SelectAll) ThisViewer.Edit(fe:Browser_Copy) !--- Note that the below example could be done simply by calling the feBrowser.PrintMe() method: !--- Print the document without displaying the "print" dialog box ThisViewer.Edit(fe:Browser_Print, fe:OLECMDEXECOPT_DONTPROMPTUSER) |
||||||||||||||||||||||||||||||||
EventCallback
( long EventID, *cstring EventString, <*cstring
Parm1>, <*cstring
Parm2>, <*cstring Parm3>, <*cstring Parm4>, <*cstring
Parm5>, <*cstring Parm6>, <*cstring Parm7> ) ,long
Typically you would never use this method, FileExplorer provides a number of callback method for you to embed code in that provide a neat and clear approach to responding the events that the Browser control produces. See Summary of callback events for more information. For an example of using a callback method see the "How to Print a web page in the Background" example at the end of this document. Technical Information: Because File Explorer uses COM (not the Clarion OLE control) for this object, callback functionality is not implemented using the standard Clarion "callback embeds". Instead we have made this method, which you can simply override (the templates do this for you). The method is then "called" by File Explorer each time a callback event fires. The logic flow is as follows:
|
||||||||||||||||||||||||||||||||
Forward
( ) ,byte,proc
ThisViewer.Forward()
|
||||||||||||||||||||||||||||||||
GetElementQ
( <string TagName>, fe:QParam_Type
QParm, long FrameNumber=0 ) ThisViewer.GetElementQ ('input', locMyQ ) ! scan for all "input" elements ThisViewer.GetElementQ ( , locMyQ ) ! scan for all elements
|
||||||||||||||||||||||||||||||||
GetHtmlGraphicsInfo
( *string HtmlSource )
,
string ThisViewer.GetInfo() ! updates ThisViewer.Source TempString = ThisViewer.Source ! needed only for the next line ThisViewer.GetHtmlGraphicsInfo (TempString) ! updates the Source and Graphics list properties ThisEmailSend.MessageHtml = ThisViewer.Source ThisEmailSend.EmbedList = ThisViewer.GraphicsList
|
||||||||||||||||||||||||||||||||
GetInfo ( ) or GetInfo ( string Parm1, long FrameNumber=0 ) ,*cstring,proc ( see below for examples )
|
||||||||||||||||||||||||||||||||
GetValueByID
( string ElementID ) ,*cstring MyCStringPtr &= ThisViewer.GetValueByID ('id5')
<input id="id5" type="text" name="LastName" size="20">
|
||||||||||||||||||||||||||||||||
GetValueByName
( string ElementName, long FrameNumber=0 ) ,*cstring
MyCStringPtr &=
ThisViewer.GetValueByName ('LastName')
<input id="id5" type="text" name="LastName" size="20">
|
||||||||||||||||||||||||||||||||
HideControl
( )
ThisViewer.HideControl ()
|
||||||||||||||||||||||||||||||||
Home
( ) ,byte,proc
ThisViewer.Home()
|
||||||||||||||||||||||||||||||||
Init
(long ParentControl, <string
LoadPath>, long Handle1=0, long
Handle2=0, byte SkipCallbacks=false) ,byte,proc ThisViewer.Init (?feControl) ThisViewer.Init (?feControl, 'www.CapeSoft.com',,,true)
|
||||||||||||||||||||||||||||||||
Kill
( byte level=0 ) ,byte,proc
ThisViewer.Kill()
|
||||||||||||||||||||||||||||||||
Load
(string CurrentPath, <long CurrentControl>, <string
pFlags>,
<string pTargetFrameName>, <string pPostData>, <string
pHeaders> ) ,byte,proc
Loads a document (passed as the CurrentPath parameter) into the html viewer control. Parameters
Return Value
Examples
|
||||||||||||||||||||||||||||||||
LoadFromStream
(*cstring szHtml)
Loads the Browser control from a string in memory. This can be used to load web pages stored in BLOB, HTML contents directly back into the browser and using .GetInfo() to retrieve the content, modifying it, and then .LoadFromStream() to update the contents of the browser etc. Parameters *cstring szHtml: A cstring (null terminated string) that contains the HTML to load. This parameter is passed by address, but is not modifying by the function. Return Value
Examples
|
||||||||||||||||||||||||||||||||
NameOfFrame
( long FrameNumber ) ,string
frameName STRING(20)
|
||||||||||||||||||||||||||||||||
NumberOfFrames
( ) ,long
totalFrames
long
|
||||||||||||||||||||||||||||||||
PrintMe
( byte ShowDialog=true ) ,byte,proc
ThisViewer.PrintMe()
|
||||||||||||||||||||||||||||||||
Refresh
(byte Level = fe:Browser_RefreshLevel_Default), byte, proc
Provides the same effect as the "Refresh" button in Internet Explorer. This forces the control to reload the page from the server, the parameter will determine how the refresh is done (for example whether a cached version of the page can be used etc.) Parameters Optionally, you can pass this method a byte (Level), which will determine the "type" / "level" or refreshing you want done. This can be one of the following values: fe:Browser_RefreshLevel_Normal Refresh that does not include sending the HTTP "pragma:nocache" header to the server. The server may return a cached version of the page. fe:Browser_RefreshLevel_Default Behaves in the same manner as fe:Browser_RefreshLevel_Normal. fe:Browser_RefreshLevel_IfExpired Refresh that occurs if the page has expired. This refreshes the page, and if the cached version has expired then a new version will be fetched. fe:Browser_RefreshLevel_Completely Refresh that includes sending a "pragma:nocache" header to the server (HTTP URLs only). This refreshes the actual page, and asks the server not to returned a cached version. This is potentially the slowest (the most data needs to be transferred) however it ensures the current version of the actual page is retrieved. Return Values Returns a byte, indicating success (1), or failure (0)
|
||||||||||||||||||||||||||||||||
Reload
(<long CurrentControl>)
ThisViewer.Reload()
|
||||||||||||||||||||||||||||||||
Resize
( <long ParentControl>,
long XMargin=0, long YMargin=0, long WidthAdjust=0, long HeightAdjust=0
)
ThisViewer.Resize()
|
||||||||||||||||||||||||||||||||
SearchPage
( ) ,byte,proc
ThisViewer.SearchPage()
|
||||||||||||||||||||||||||||||||
SelectElementByID
( string ElementID )
ThisViewer.SelectElementByID(3)
|
||||||||||||||||||||||||||||||||
SelectElementByName
( string ElementName, long FrameNumber=0,
long NameInstance=0 )
ThisViewer.SelectElementByName ('MyField1')
Note: Certain elements (e.g.. FileInputElements) are marked read-only, and cannot be set using methods such as SetValueByName. The following code does work, but is a bit of a hack.. Provided here as an additional example:
|
||||||||||||||||||||||||||||||||
SetFocus
( )
ThisViewer.SetFocus()
|
||||||||||||||||||||||||||||||||
SetValueByID
( string ElementID, string ElementValue)
ThisViewer.SetValueByID ('id5', 'James')
<input id="id5" type="text" name="LastName" size="20">
|
||||||||||||||||||||||||||||||||
SetValueByName
( string ElementName, string ElementValue, long FrameNumber=0,
long NameInstance=0 )
ThisViewer.SetValueByName ('LastName', 'James')
|
||||||||||||||||||||||||||||||||
Stop
( ) ,byte,proc
ThisViewer.Stop()
|
||||||||||||||||||||||||||||||||
SubmitForm
( <string FormName>, long
FrameNumber=0 )
ThisViewer.SubmitForm()
|
||||||||||||||||||||||||||||||||
TranslateEventID
( long EventID ) ,string
TempString STRING(40)
|
||||||||||||||||||||||||||||||||
UnhideControl
( )
ThisViewer.UnhideControl()
|
||||||||||||||||||||||||||||||||
Update
( string Property, string PropValue, byte FrameNumber=0
)
ThisViewer1.Update
('PrinterHeader', 'This is my header')
|
Busy (Byte) | Holds true (1) if a page is still being loaded, or false (0) if not. See the GetInfo method. |
DocumentType (String) | Holds a description of the type of document which you have loaded. See the GetInfo method. |
GraphicsList (String) | See the notes on the GetHtmlGraphicsInfo method. This property contains the list of graphic files found in the loaded html document. |
NewWindow (Byte) | By default this property is set to false (0). Setting it to true (1) prior to calling the Load method results in the url you are loading being loaded into a new window ( your default browser will load and the file will be loaded into that window ). Note that this property will not affect browsing: if you click on a hyperlink the new page will still be loaded into the parent window, unless the hyperlink properties are set to open the page in a new window. |
OuterText (CString) | Holds the currently loaded page's text content. See the GetInfo method. |
PageTitle (String) | The title of the page being displayed, e.g. 'CapeSoft Accessories Home Page'. See the GetInfo method. Note that this property will only hold a title if the page you are viewing has one! If not this property will hold the same thing that the Url property does. |
RootFolder (String) | This property is used in the GetHtmlGraphicsInfo
method, for the following purpose. When
you are trying to establish the list of graphics in an html document
( primarily useful for when
you are using NetTalk to send an email written using File Explorer -
see the
GraphicsList property ) there may be graphics with paths such as
" /MySubfolder/MyImage.gif ". The problem arises that
when you pass NetTalk a graphic path like that ( to embed the graphic
into the email at send-time ), it fails as the path is not "valid".
File Explorer handles this problem as follows: If you have first
set the HtmlRootFolder property, before calling the GetHtmlGraphicsInfo
method, then File Explorer automatically constructs valid paths for these
graphics, using the HtmlRootFolder property
to establish valid paths for these files. Example... Example: ThisViewer1.RootFolder = "c:\My Documents\Website1" ! Here we set this property with the folder that contains the actual html page we're working with. Any graphics in this html file that have no path ( Image1.gif ) or an "incomplete" path ( /Subfoler/Image.gif ) will be assumed to be in this folder or have this folder as their root. ThisViewer1.GetHtmlGraphicsInfo() If you do not set the RootFolder property before calling the GetHtmlGraphicsInfo method, File Explorer will assume that such graphics stem from the exe directory. |
Source (CString) | Holds the html component (source / text) of the loaded page. Updates when you call the GetInfo or the GetHtmlGraphicsInfo methods. |
Url (String) | e.g. http://www.capesoft.com/accessories/index.htm. Holds the URL of the page currently displayed. See the GetInfo method. |
FeBrowser - Events
See the FeBrowser - Summary of callback Events below, which now lists every single callback method, along with the parameters which are passed to it and a full description of what the method does and when it is called.
At this time there is quite an overlap in terms of multiple File Explorer classes being implemented by the same templates. In the future we may revisit this, but for now all templates are covered in the main (FileExplorer.htm) help document, please click here.
See the FeBrowser_Callbacks procedure in the feabc.app example application for more info. This is still a work in progress, we will be adding support for additional callback events as well as improving the existing callbacks. The FE Class has specific callback methods for the events, you can override these methods to implement specific behaviour for callbacks. This is a far easier and cleaner way of responding to callbacks than embedding code directly in the EventCallback() method and checking which equate was passed (although this is still supported if you prefer to take this approach).
Note: For methods that take a pDisp parameter that points to the object that the event relates to it is not advised that this variable is used within your code, it is an internal FE pointer.
Event Name: | Equate | Description: |
BeforeNavigate | fe:WBEvt_BeforeNavigate | This is sent before navigation to give a chance to abort. Remarks This event is obsolete. Use the BeforeNavigate2 event instead. |
BeforeNavigate2 | fe:WBEvt_BeforeNavigate2 | Fired before navigate occurs, as in when a hyperlink is clicked on, a url is entered, or the back or forward buttons are pressed. Syntax The FeBrowser.EventBeforeNavigate2 method is called: Parameters
Remarks The BeforeNavigate2 event replaces the BeforeNavigate and FrameBeforeNavigate events, which should no longer be used. The pDisp parameter that specifies the corresponding WebBrowser object clearly identifies where the navigation is to occur. Microsoft Internet Explorer 3.0 required the FrameBeforeNavigate and a target frame name to identify the target of navigation. However, this solution was potentially ambiguous as frame names are not unique. Note Internet Explorer 4.0 and later continue to fire
the BeforeNavigate and FrameBeforeNavigate events for compatibility
with Internet Explorer 3.0. When reissuing a navigation for the WebBrowser object, the Stop method must first be executed for pDisp. This prevents the display of a web page that declares a cancelled navigation from appearing while the new navigation is being processed. |
ClientToHostWindow | fe:WBEvt_ClientToHostWindow | Fired to request client sizes be converted to host window sizes. |
CommandStateChange | fe:WBEvt_CommandStateChange | Fires when the enabled state of a command changes. The FeBrowser.EventCommandStateChange method is called: Syntax FeBrowser.EventCommandStateChange(long pCommand, bool pEnable) Parameters
CSC_UPDATECOMMANDS (0FFFFFFFFh) CSC_NAVIGATEFORWARD (00000001h) CSC_NAVIGATEBACK (00000002h)
|
DocumentComplete | fe:WBEvt_DocumentComplete | Fired when the document being navigated to reaches ReadyState_Complete. Syntax FeBrowser.EventDocumentComplete (long pDisp, string pURL) Parameters
|
DownloadBegin | fe:WBEvt_DownloadBegin | Download of a page started. Syntax FeBrowser.EventDownloadBegin () Remarks This event is fired shortly after the BeforeNavigate or BeforeNavigate2 event, unless the navigation is canceled. Each DownloadBegin event will have a corresponding DownloadComplete
event. |
DownloadComplete | fe:WBEvt_DownloadComplete | Download of page complete. Syntax FeBrowser.EventDownloadBegin () Remarks Unlike NavigateComplete or NavigateComplete2, which are fired only when a URL is successfully navigated to, this event is always fired after a navigation starts Each DownloadBegin event will have a corresponding DownloadComplete event. |
FileDownload | fe:WBEvt_FileDownload | Fires to indicate that a file download is about to occur. If a file download dialog is to be displayed, this event is fired prior to the display of the dialog. |
FrameBeforeNavigate | fe:WBEvt_FrameBeforeNavigate | See the BeforeNavigate event for a full description. |
FrameNavigateComplete | fe:WBEvt_FrameNavigateComplete | See the NavigateComplete event for a full description. |
FrameNewWindow | fe:WBEvt_FrameNewWindow | |
NavigateComplete | fe:WBEvt_NavigateComplete | In async, this is sent when we have enough to show. Fires after a navigation to a link is completed on either a window or frameSet element. Syntax FeBrowser.EventNavigateComplete2 (long pDisp, string pURL) Parameters
This event is obsolete. Use the NavigateComplete2 event instead. |
NavigateComplete2 | fe:WBEvt_NavigateComplete2 | Fired when the document being navigated to becomes visible
and enters the navigation stack. Fires after a navigation to a link is
completed on either a window or frameSet element.
Syntax FeBrowser.EventNavigateComplete2 (long pDisp, string pURL))
Remarks This event replaces the NavigateComplete and FrameNavigateComplete events, which should no longer be used. Microsoft Internet Explorer 4.0 and Internet Explorer 5 continue to fire the NavigateComplete and FrameNavigateComplete events for compatibility with Internet Explorer 3.0. The document might still be downloading (and in the case of HTML, images might still be downloading), but at least part of the document has been received from the server, and the viewer for the document has been created. |
NewWindow | fe:WBEvt_NewWindow | Fires when a new window is to be created. Remarks This event is obsolete. Use the NewWindow2 event instead. |
NewWindow2 | fe:WBEvt_NewWindow2 | Fires when a new window is to be created.
Create a new, hidden, nonnavigated WebBrowser.
Syntax FeBrowser.EventNewWindow2() Remarks In Microsoft Internet Explorer, the NewWindow2 event is not fired when the user selects Window from the New command on the File menu. This event precedes the creation of a new window from within the WebBrowser. The NewWindow2 event is fired when a window is about to be created, such as during the following actions: The user clicks a link while pressing the SHIFT key.
Your browser application can also trigger this event by calling the Navigate or Navigate2 method with the navOpenInNewWindow flag. The WebBrowser control has an opportunity to handle the new window creation itself. If it does not, a top-level Internet Explorer window is created as a separate (nonhosted) process.
|
OnAddressBar | fe:WBEvt_OnAddressBar | feBrowser.EventOnToolbar() Sent when the address bar should be shown/hidden. |
OnFullScreen | fe:WBEvt_OnFullScreen | feBrowser.EventOnFullScreen() Sent when fullscreen / kiosk mode should be on/off |
OnMenuBar | fe:WBEvt_OnMenuBar | feBrowser.EventOnMenuBar() Sent when the menubar should be shown/hidden |
OnQuit | fe:WBEvt_OnQuit | feBrowser.EventOnQuit() Fired when the application is quiting |
OnStatusBar | fe:WBEvt_OnStatusBar | feBrowser.EventOnStatusBar() Sent when the statusbar should be shown/hidden |
OnTheaterMode | fe:WBEvt_OnTheaterMode | feBrowser.EventOnTheaterMode() Sent when theater mode should be on/off |
OnToolBar | fe:WBEvt_OnToolBar | feBrowser.EventOnToolbar() Sent when the toolbar should be shown/hidden |
OnVisible | fe:WBEvt_OnVisible | feBrowser.EventOnVisible() Sent when the window goes visible/hidden |
ProgressChange | fe:WBEvt_ProgressChange | feBrowser.EventProgressChange() Sent when download progress is updated |
PropertyChange | fe:WBEvt_PropertyChange | feBrowser.EventPropertyChange() Sent when the PutProperty method is called |
Quit | fe:WBEvt_Quit | feBrowser.EventOnQuit() |
SetSecureLockIcon | fe:WBEvt_SetSecureLockIcon | feBrowser.EventSetSecureLockIcon() Fired to indicate the security level of the current web page contents |
StatusTextChange | fe:WBEvt_StatusTextChange | feBrowser.EventStatusTextChange() Statusbar text changed |
TitleChange | fe:WBEvt_TitleChange | feBrowser.EventTitleChange() Sent when the document title changes |
WindowActivate | fe:WBEvt_WindowActivate | Sent when main window has been activated |
WindowClosing | fe:WBEvt_WindowClosing | feBrowser.EventWindowClosing() Fired when the WebBrowser is about to be closed by script |
WindowMove | fe:WBEvt_WindowMove | Sent when main window has been moved |
WindowResize | fe:WBEvt_WindowResize | Sent when main window has been sized |
WindowSetHeight | fe:WBEvt_WindowSetHeight | feBrowser.EventWindowSetHeight() Fired when the host window should change its height |
WindowSetLeft | fe:WBEvt_WindowSetLeft | feBrowser.EventWindowSetLeft() Fired when the host window should change its Left coordinate |
WindowSetResizable | fe:WBEvt_WindowSetResizable | feBrowser.EventWindowSetResizable() Fired when the host window should allow/disallow resizing |
WindowSetTop | fe:WBEvt_WindowSetTop | feBrowser.EventWindowSetTop() Fired when the host window should change its Top coordinate |
WindowSetWidth | fe:WBEvt_WindowSetWidth | feBrowser.EventWindowSetLeft() Fired when the host window should change its width |
Other FileExplorer Specific Event Callbacks | |
feBrowser.EventClick() | Fired when the user clicks in the control. Only traps the click event, no other information is provided (such as what the user clicked on etc.) The FeBrowser.EventBeforeNavigate() event callback can be used to trap mouse clicks that cause a navigation command to execute. |
feBrowser.EventDblClick() | Fired when the user double clicks in the control. |
Using FileExplorer you can load a web page, print it, and close the window that the page is loaded with, without the user having to see anything. You can do this simply by adding a procedure with a FileExplore feBrowser control, and passing it a string as a parameter. This string contains the URL of the website page to print.
This is demonstrated in the BackgroundPrint example in the Clarion\3rdparty\Examples\FileExplorer\BackgroundPrint\ folder. The example allows a file to be selected that is printed using FE in the background. While the example allows a file to be selected and a button to be pressed to print the file, this can be automated using exactly the same technique. Note that you can also specify a web page address (URL) instead of a file name and FE will print it. You can also specify any file type that IE can open - HTML, EML, MHT, PDF etc.
The example uses the following technique to implement background printing, which involves embedding a small amount of code in four embed points.
1) Hide the Window
In the ThisWindow.Init method, after the window has opened, hide it (this is in the embed below SELF.Open(Window)):
! Open the window Open(Window) ! Open window ! [Priority 8030] Window{prop:hide} = 1
2) Load the page. After the call to ThisViewer.Init(), call the
.Load() method to load the page that you want to print. The example application passes
a parameter to the procedure to specify the page to load.
3) Print the page after it has been loaded in the
ThisViewer.EventDocumentComplete() procedure,
after the parent call add the following code:
if Clip(pUrl) <> 'about:blank' ! Ignore the blank page
if Message('Would you like to print the page ' & Clip(pURL) & '?', |
'Print this page?', Icon:Question, Button:Yes + Button:No) = Button:Yes
ThisViewer1.PrintMe(false) ! print the document
end
end
4) Close the window once the print is completed, in the ThisViewer1.EventPrintTemplateTeardown()
method, again after the parent call, add the following:
Post(Event:CloseWindow)
And that is it - you now have a procedure that will print any file or page that Internet Explorer can load, all in the background!
When using Radio button on a web page, all the buttons that need to be in the same "group" should be name the same, and each given a unique value:
<input type="radio" name="R1" value="V1" checked> <input type="radio" name="R1" value="V2"> <input type="radio" name="R1" value="V3">
The problem is determining which radio button is selected before the form is submitted, unfortunately the Checked attribute is not set for radio buttons when getting the value from the IE HTML DOM (although it is used to determine the default selection). However a small amount of JavaScript can be used to assign the selected value to a hidden entry in the form:
<p><input type="radio" name="R1" value="V1" onMouseUp="rSelect.value='V1'" checked></p> <p><input type="radio" name="R1" value="V2" onMouseUp="rSelect.value='V2'"></p> <p><input type="radio" name="R1" value="V3" onMouseUp="rSelect.value='V3'"></p> <input type="hidden" value="" name="rSelect">
The above code assigns the value to the hidden control (rSelect) when the radio button is selected. Using GetElementsQ() will list the selected value for the rRelected element. JavaScript and FileExplorer are an excellent combination for providing additional functionality and providing a rich, dynamic user interface.
<script type="text/javascript"> <!-- function autoTab(input, len, e) { var keyCode = (isNN) ? e.which : e.keyCode; var filter = (isNN) ? [0,8,9] : [0,8,9,16,17,18,37,38,39,40,46]; if(input.value.length >= len && !containsElement(filter,keyCode)) { input.value = input.value.slice(0, len); input.form[(getIndex(input)+1) % input.form.length].focus(); } function containsElement(arr, ele) { var found = false, index = 0; while(!found && index < arr.length ) if(arr[index] == ele) found = true; else index++; return found; } function getIndex(input) { var index = -1, i = 0, found = false; while (i < input.form.length && index == -1) if (input.form[i] == input) index = i; else i++; return index; } return true; } function expandTA(ta) { var maxChars = ta.cols; var theRows = ta.value.split("\n"); var numNewRows = 0; for ( var i = 0; i < theRows.length; i++ ) { numNewRows += ( Math.ceil( theRows[i].length / maxChars ) - 1 ); } if (numNewRows + theRows.length == 0) ta.rows = 1 else ta.rows = numNewRows + theRows.length; } function padout(number) { return (number < 10) ? '0' + number : number; } function SetDate(dayInput, monthInput, yearInput) { var now = new Date(); dayInput.value = padout(now.getDate()); monthInput.value = padout(now.getMonth() + 1); // return from 0 to 11. yearInput.value = now.getYear(); } //--> </script>
<body onload="SetDate(document.ConsultationForm.dayField, document.ConsultationForm.monthField, document.ConsultationForm.yearfieldField);">
<form name="ConsultationForm" id="ConsulationForm">
<input id="DOB_d" size="3" maxlength="2" onKeyUp="return autoTab(this, 2, event);" onFocus=" this.value='';" />
<input id="DOB_m" size="3" maxlength="2" onKeyUp="return autoTab(this, 2, event);" onFocus=" this.value='';" />
<input id="DOB_y" size="5" maxlength="4" onKeyUp="return autoTab(this, 4, event);" onFocus=" this.value='';" />
When a page is loaded using Internet Explorer (or any other web browser) you don't have any control over which parts of the page is displayed, whatever the web server provides is displayed by the web browser. FileExplorer allows you to remove parts of web pages as well as modifying values (such as filling in forms automatically etc.).
You can use the same approach to get and set the values of elements on the
page by calling GetValueByID(),
GetValueByName(),
SetValueByID(),
SetValueByName()
and elements can be "clicked" on using
ClickByRecordNumber().
[end of document]