Hyperlink with Image

This is a clip that I wrote a while back, but enhanced as a result of this post to the ntp-clips list:

Hi all,

Was wondering if anyone knew of a clip which provided more options 
when inserting links into pages?

Specifically, I'm seeking a clip which gives me the option of 
inserting the following anchor info:

*  IMG HEIGHT   Ideally these two would be completed
*  IMG WIDTH   / for me, based on the IMG SRC.

Is there such an HTML clip?

Many thanks!


So here goes nothing, a clip to insert an image surrounded by a hyperlink that allows you to set the following attributes:

  1. target for the link
  2. name for the image (or did she mean for the hyperlink?)
  3. name for the link (see her comment below)
  4. image border
  5. image alignment

All of the other things she wanted are standard in the clips shipped with notetab.

So here is the clip …. note that there is one very long line in this clip that will break if you email it to someone.

; by: don at htmlfixit dot com
; creates a hyperlink from an image to a file
; fills in info about the image and prompts for
; target/name/alt/border/align attributes
; copy stored at: http://htmlfixit.com/blog/index.php?p=326

;I would like to get this running in one wizard
^!SetWizardLabel "Pick a File To Link To and Enter Value for Attributes"
; long line next (it needs to be unwrapped if you copy this)
^!InsertWizardHtml <A ^?[(T=T;F="Link Files|*.*htm*;*.php;*.pl;*.cgi")&Select the File to Link To] NAME="^?{Link &name=^&}" TARGET='^?[&Target (transitional)=blank^=_blank|parent^=_parent|self^=_self|top^=_top]'><IMG ^?{(T=T;F="Image Files|*.gif;*.png;*.jpg;*.jpeg")&browse to find image} NAME="^?{Image &name=^&}" BORDER="^?[(T=C)border level==_0|1|2|3|4|5|6]" ALIGN="^?[(T=C)align imgage==_left|right]" ALT="^?{Image text &description=^&}"></A>
; end of long line
; replace any double quotes with single
; better form to only use double when necessary
^!Replace " >> ' ATHS


Leave a Reply

Recent Posts