activate the links present in the html documents.

Ken Ray kray at sonsothunder.com
Sat Jul 10 11:56:58 EDT 2004


Yogananth,

Well, to load the html page into the field, you do:

  set the htmlText of fld 1 to url ("file:" & pathToFileOnDisk)

This will cause Rev to render the HTML the best that it can. Keep in mind
that Rev can't display all HTML tags, but only things you could normally
have in a field (for example you can't have HTML tables because Rev can't
display tables in a field, but you CAN have font, size, style, image, links,
etc.).

Links should automatically be displayed with a blue underline (or whatever
the "linkColor" is - see the Transcript Dictionary (TD)). Make sure the
field is locked (so you can get mouse events) and then you are able to click
on links. Now all that will happen without scripting is that the link will
change color to its visited state (see "linkVisitedColor" in the TD). In
order to make it activate, you need to write this script in the field or
somewhere in the message passing hierarchy:

on linkClicked pLink
  if pLink is not empty then revGoURL pLink
end linkClicked

In the script above, 'pLink' is the text of whatever is in the href of the
HTML link you clicked.

Hope this helps,

Ken Ray
Sons of Thunder Software
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/


> -----Original Message-----
> From: use-revolution-bounces at lists.runrev.com 
> [mailto:use-revolution-bounces at lists.runrev.com] On Behalf Of 
> yogananth jayapal
> Sent: Monday, July 05, 2004 1:38 AM
> To: use-revolution at lists.runrev.com
> Subject: RE:activate the links present in the html documents.
> 
> 
>   
> hi ,
>        I am new user to revolution.The is to 1.load a html 
> page from harddisk 2. display all form of special entities 
> correctly 3.to be able to activate the link present in the html file.
> 
>       I finished loading the html page.can you give me codes 
> for proceeding with the next two tasks.
> 
> 
> thanks ,
> yogananth.j
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com 
> http://lists.runrev.com/mailman/listinfo/use-revolution
> 




More information about the use-livecode mailing list