Taflinks

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How can insert an image into this code to make a tell a friend link thats looks decent
I have an image i'd like to use but i can't figure out how to get rid of the image it creates
Any help would be much appreciated

<script language=javascript>function tellfriend(){yourname=escape(prompt('What is your name?',''));friendname=escape(prompt('What is your friend\'s name?',''));friendemail=escape(prompt('What is your friend\'s email address?',''));tafarea.innerHTML = '<a name=taflink href="mailto:' + friendemail + '?subject=Hey%20' + friendname + ',%20check this out!&body=Hey%20' + friendname + ',%0A%0AI%20just%20found%20the%20most%20amazing%20web%20site!%20%20It\'s%20called \'Northern%20Michigan%20Update.Com\'.%0A%0ACheck%20it%20out%20here:%0Ahttp%3A//www.northernmichiganupdate.com%0A%0AYour Friend,%0A'+yourname+'"></a>'; taflink.click();}</script><form><input type=button value="Tell A Friend" onclick=tellfriend();></form><div id=tafarea></div

This works really nice but hate the button it gives you 8(
 
Try replacing: type=button value="Tell A Friend"
with: img src="imagename.gif" or "imagename.jpg" whichever it is

in the very last line of the script


--
Steve Easton
Microsoft MVP FrontPage
95isalive
This site is best viewed............
........................with a computer

Krauh said:
How can insert an image into this code to make a tell a friend link thats looks decent?
I have an image i'd like to use but i can't figure out how to get rid of the image it creates.
Any help would be much appreciated.

<script language=javascript>function tellfriend(){yourname=escape(prompt('What is your
name?',''));friendname=escape(prompt('What is your friend\'s
name?',''));friendemail=escape(prompt('What is your friend\'s email
address?',''));tafarea.innerHTML = '<a name=taflink href="mailto:' + friendemail +
'?subject=Hey%20' + friendname + ',%20check this out!&body=Hey%20' + friendname +
',%0A%0AI%20just%20found%20the%20most%20amazing%20web%20site!%20%20It\'s%20called
\'Northern%20Michigan%20Update.Com\'.%0A%0ACheck%20it%20out%20here:%0Ahttp%3A//www.norther
nmichiganupdate.com%0A%0AYour Friend,%0A'+yourname+'"></a>';
 
Try...

Change:

<form><input type=button value="Tell A Friend" onclick=tellfriend();></form>

to:

<form><input type="image" src="image2.jpg" name="Tell A Friend" width="100" height="80" border="0"
onclick=tellfriend();></form>

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================


Krauh said:
How can insert an image into this code to make a tell a friend link thats looks decent?
I have an image i'd like to use but i can't figure out how to get rid of the image it creates.
Any help would be much appreciated.

<script language=javascript>function tellfriend(){yourname=escape(prompt('What is your
name?',''));friendname=escape(prompt('What is your friend\'s
name?',''));friendemail=escape(prompt('What is your friend\'s email address?',''));tafarea.innerHTML
= '<a name=taflink href="mailto:' + friendemail + '?subject=Hey%20' + friendname + ',%20check this
out!&body=Hey%20' + friendname +
',%0A%0AI%20just%20found%20the%20most%20amazing%20web%20site!%20%20It\'s%20called
\'Northern%20Michigan%20Update.Com\'.%0A%0ACheck%20it%20out%20here:%0Ahttp%3A//www.northernmichiganu
 
Hey thanks guys ya got me goin on the right track

This works
<script language=javascript>function tellfriend(){yourname=escape(prompt('What is your name?',''));friendname=escape(prompt('What is your friend\'s name?',''));friendemail=escape(prompt('What is your friend\'s email address?',''));tafarea.innerHTML = '<a name=taflink href="mailto:' + friendemail + '?subject=Hey%20' + friendname + ',%20check this out!&body=Hey%20' + friendname + ',%0A%0AI%20just%20found%20the%20most%20amazing%20web%20site!%20%20It\'s%20called \'whatever%20yoursites%20called\'.%0A%0ACheck%20it%20out%20here:%0Ahttp%3A//yoursitename%0A%0AYour Friend,%0A'+yourname+'"></a>'; taflink.click();}</script><form><input type="image" src="yourpicturef" name="Tell A Friend" width="172" height="54" border="0"onclick=tellfriend();></form></form><div id="tafarea"></div><p>&nbsp;</div>

Thanks for the help You guys!!
I'll leave this for anyone else needing it 8)
 
Recommend changing your form name to Tell_A_Friend
- spaces in form names are not supported

--




| Hey thanks guys ya got me goin on the right track
|
| This works
| <script language=javascript>function tellfriend(){yourname=escape(prompt('What is your name?',''));friendname=escape(prompt('What
is your friend\'s name?',''));friendemail=escape(prompt('What is your friend\'s email address?',''));tafarea.innerHTML = '<a
name=taflink href="mailto:' + friendemail + '?subject=Hey%20' + friendname + ',%20check this out!&body=Hey%20' + friendname +
',%0A%0AI%20just%20found%20the%20most%20amazing%20web%20site!%20%20It\'s%20called
\'whatever%20yoursites%20called\'.%0A%0ACheck%20it%20out%20here:%0Ahttp%3A//yoursitename%0A%0AYour Friend,%0A'+yourname+'"></a>';
taflink.click();}</script><form><input type="image" src="yourpicturef" name="Tell A Friend" width="172" height="54"
border="0"onclick=tellfriend();></form></form><div id="tafarea"></div><p>&nbsp;</div>
|
| Thanks for the help You guys!!
| I'll leave this for anyone else needing it 8)
|
 
Back
Top