Jump to content
COMFIED

Accessing W3IFrameHTMLElement URL Clicks

Recommended Posts

I have a W3IFrameHTMLElement with content that contains URL links.

Is there a way to format the URL links in W3IFrameHTMLElement content so that I can click on them and access within the web app?

Share this post


Link to post
Share on other sites
25 minutes ago, COMFIED said:

I have a W3IFrameHTMLElement with content that contains URL links.

Is there a way to format the URL links in W3IFrameHTMLElement content so that I can click on them and access within the web app?

Another way of asking the same question: Can I pass parameters via URL without reloading the web app?

Share this post


Link to post
Share on other sites
uses
  W3C;

...

  MyDiv.InnerHtml:='<a id="MyLink1" href="www.example.com/whatever">Click in me</a>';
  var MyHandle:=BrowserAPI.document.getElementById('MyLink1');
  if (MyHandle) then begin
    MyHandle.onclick:=procedure(event: JEvent)
    begin
      WriteLn('Click!');
      event.preventDefault;
    end;
  end;

Edit: And you can get the link by accessing MyHandle.href when that event fires.

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

×