SitePoint Sponsor |
|
User Tag List
Results 1 to 6 of 6
-
Nov 20, 2002, 20:33 #1
- Join Date
- Aug 2002
- Location
- Perth, Western Australia
- Posts
- 759
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
can someone please alter this code for me
We need to modify this code so that it will use both the icon and the label for the link can anyone please chage this so this is accomplished thanks
Code:function generateDocEntry(icon, docDescription, link) { var retString ="" // Change bak to target=folderFrame if (icon==0) retString = "<a href='"+link+"' target=folderFrame><img src='doc.gif' alt='Opens in right frame'" else retString = "<a href='http://"+link+"' target=_new><img src='link.gif' alt='Opens in new window'" retString = retString + " border=0></a><td nowrap><font size=-1 face='Verdana, Arial, Helvetica'>" + docDescription + "</font></a>" return retString }
see this bit of code
Code:if (icon==0) retString = "<a href='"+link+"' target=folderFrame><img src='doc.gif' alt='Opens in right frame'" else retString = "<a href='http://"+link+"' target=_new><img src='link.gif' alt='Opens in new window'" retString = retString + " border=0></a>
Code:<td nowrap><font size=-1 face='Verdana, Arial, Helvetica'>" + docDescription + "</font></a>
Please can someone help me
-
Nov 20, 2002, 22:42 #2
- Join Date
- Jul 2002
- Location
- Dallas, TX
- Posts
- 2,900
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
<rant>
Why don't you have someone from your training dept help you. It says they know HTML and JavaScript.
http://www.trwebdev.com/services/training.html
Maybe you can have them teach you some CSS stuff too, since you're still using <font> tags.
</rant>
Ok, now that I got that out of the way...here's your answer (if I understand you right, which I'm not sure I do...)
Code:function generateDocEntry(icon, docDescription, link) { var a1 = '<a href="'+link+'" target="'+(icon==0)?'folderFrame':'_new'+'">'; var a2 = '</a>'; var img = '<img src="doc.gif" alt="Opens in '+(icon==0)?'right frame':'new window'+'" border="0">'; var td = '<td nowrap><font size="-1" face="Verdana, Arial, Helvetica">'+ a1 + docDescription + a2 + '</font>'; return a1 + img + a2 + td; }
-
Nov 21, 2002, 15:35 #3
Sorry, but telling people to "alter code for me" doesn't make you look very good. Another way to say it is "I've tried everything, can you please help me out?" "Altering code" is what consultants are paid to do, not people trying to help you in the forums.
--Vinnie
-
Nov 21, 2002, 16:54 #4
- Join Date
- Jul 2002
- Location
- Dallas, TX
- Posts
- 2,900
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally posted by vgarcia
Sorry, but telling people to "alter code for me" doesn't make you look very good. Another way to say it is "I've tried everything, can you please help me out?" "Altering code" is what consultants are paid to do, not people trying to help you in the forums.
--Vinnie
-
Nov 21, 2002, 19:56 #5
- Join Date
- Aug 2002
- Location
- Burpengary, Australia
- Posts
- 4,495
- Mentioned
- 0 Post(s)
- Tagged
- 1 Thread(s)
Originally posted by beetle
Why don't you have someone from your training dept help you.
-
Nov 21, 2002, 20:01 #6
Bookmarks