Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hyperlink problems with tkhtml

Status
Not open for further replies.

fabien

Technical User
Sep 25, 2001
299
AU
Hi!

Has somebody used Tkhtml before? In htmlwidget distribution there is a file called hv.tcl which is a simple browser. I can't get it to work with my html that contains hyperlinks. Those hyperlinks link to places inside the same page using

When I click on the link I get an error "cannot open xxxxxxx#get"

Thanks,

 
I did'nt used Tkhtml but I can try to give you some hints.
In the error message xxxxxxx is a file path and #get is an anchor inside the file.
Did you verified that the file can be read from this path?

HTH

ulis
 
Hi Ulis,

The problem is that the function which parses for the links does not work correctly..
 
I solved the problem by changing HrefBinding function to

proc HrefBinding {x y} {
set link [lindex [.h.h href $x $y] 0]
# puts "link: $link"
if {$link!=""} {

#check if it is a link within the page
set parts [split $link #]
set match [lindex $parts end]
if {$match == $link} {
# external link
LoadFile $new
} else {
# internal link then goto it
.h.h yview $match
}

}

}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top