Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 2 of 2 total
Thread Uncaught ReferencedError: hideTheDiv is not defined
Fri, Jun 17 2016 3:20 PMPermanent Link

Trinione

Shouldn't this work? I have a few external functions that work fine. However, this does not return a value so I am using 'procedure' instead. Don't think I should use a function as no value is returned.

What am I doing wrong here? Thx in advance.


**** the html file has a javascript funciton:

   <script>
      function hideTheDiv() {
         var el = document.getElementById('theDiv');
         el.style.display = 'none';
      }
   </script>


**** I have declared the call to the function as

 external procedure hideTheDiv;


****  Browser1Load event:

procedure TfrmLoggedOut.Browser1Load(Sender: TObject);
begin
 hideTheDiv;
end;
Fri, Jun 17 2016 5:37 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

<< Shouldn't this work? I have a few external functions that work fine. However, this does not return a value so I am using 'procedure' instead. Don't think I should use a function as no value is returned. >>

You can't call JS inside of a TBrowser control from *outside* of the control's execution context (it's document) without some machinations that are above what you can accomplish with the external interfaces in EWB.

Tim Young
Elevate Software
www.elevatesoft.com
Image