user3797460
user3797460

Reputation: 1

How to use font-awesome tags in my .js file

I want to replace the image with font-awesome icons in my .js file.

My file is as follows

"</head>"+
"<body bgcolor=\"White\">"+

"<table width=\"100%\" height=\"100%\" cellpadding=0 cellspacing=0 border=0>"+
"<tr height=\"100%\" bgcolor=\"#FFFFFF\"><td valign=top>"+

"<table class=\"clsOTable\" cellspacing=\"0\" border=\"0\" width=\"100%\">\n"+
"<tr><td bgcolor=\"#4E4E4E\">\n"+
"<table cellspacing=\"1\" cellpadding=\"3\" border=\"0\" width=\"100%\">\n"+
"<tr>\n "+
"   <td height='60px' align=left bgcolor=\"#4E4E4E\" colspan=\"7\">"+
"<table width=100% height=40 border=\"0\"><tr><td width=50 ><a href=\"dateconsole.jsp?controlname="+

 str_target+"&date="+ dt2dtstr(dt_prev_year)+dt2tmstr(dt_datetime)+"\">"+
 "<img src=\"../images/prevpopyr.gif\" width=\"50px\" height=\"50px\" border=\"0\""+
 " alt=\"previous year\"></a></td><td width=50 ><a href=\"dateconsole.jsp?controlname="+
 str_target+"&date="+ dt2dtstr(dt_prev_month)+dt2tmstr(dt_datetime)+"\">"+
 **"<img src=\"../images/prevpop.gif\**" width=\"50px\" height=\"50px\" border=\"0\""+
 " alt=\"previous month\"></a></td><td align=center ><font color=\"white\" face=\"tahoma, verdana\" size=\"4\">"+
 arr_months[dt_datetime.getMonth()]+" "+dt_datetime.getFullYear()+"</font>+"

I tried putting in the head tag

<head>

"<link rel='stylesheet' href='<util:getAbsoluteURL URL="css/font-awesome.css" />' type="text/css" media="screen">+"

</head>

and replacing the

<img src=\"../images/prevpopyr.gif\" width=\"50px\" height=\"50px\" border=\"0\""+
    " alt=\"previous year\">

with the

<i class="fa fa-forward"></i>

font-awesome tag.

but it does not work? Please suggest.

Upvotes: 0

Views: 833

Answers (1)

lbrazier
lbrazier

Reputation: 2654

Have you tried following the instructions for Getting Started with font awesome? http://fortawesome.github.io/Font-Awesome/get-started/

Try replacing the link you've got in your head tag with

<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css" rel="stylesheet">

and see if that works. If it does, then we know the issue is with your local css font awesome location.

Upvotes: 1

Related Questions