Jump to content

adding alt and title tag


sandbudd

Recommended Posts

Hey guys I am trying to add title tags to a link... something like title="$something then more information"; but can't get it to work.  Here is the working code without the title attribute.  Any help would be great

 

<?php
if(empty($row_Recordset1['fb'])){
   //empty() returned true : so there is nothing
   echo 'FB';
}else{
   //empty() returned false so it is NOT true that there is nothing
   //so we can print it out:
   echo '<a href="javascript://" onClick="popupfunction(\'/highschool/schedules/' . $row_Recordset1['fb']  . '\');" class="style3">FB</a>';
}
?>

Link to comment
Share on other sites

Okay this works and displays correctly the next question is I want to add onto the title statement with some copy example $row_Recordset1['high_school'] then add something else....

 

Here is the code that works so far

 

<?php

if(empty($row_Recordset1['fb'])){
   //empty() returned true : so there is nothing
   echo 'FB';
}else{
   //empty() returned false so it is NOT true that there is nothing
   //so we can print it out:
   echo '<a href="javascript://" onClick="popupfunction(\'/highschool/schedules/' . $row_Recordset1['fb']  . '\'" title="' . $row_Recordset1['high_school'] . '");" class="style3" >FB</a>';

}
?>

Link to comment
Share on other sites

Never mind I got it...long day

 


<?php

if(empty($row_Recordset1['fb'])){
   //empty() returned true : so there is nothing
   echo 'FB';
}else{
   //empty() returned false so it is NOT true that there is nothing
   //so we can print it out:
   echo '<a href="javascript://" onClick="popupfunction(\'/highschool/schedules/' . $row_Recordset1['fb']  . '\'" title="' . $row_Recordset1['high_school'] . 'whats up");" class="style3" >FB</a>';

}
?>

Link to comment
Share on other sites

will thought I had it but now the popup function does not work argh...

 


<?php

if(empty($row_Recordset1['fb'])){
   //empty() returned true : so there is nothing
   echo 'FB';
}else{
   //empty() returned false so it is NOT true that there is nothing
   //so we can print it out:
   echo '<a href="javascript://" onClick="popupfunction(\'/highschool/schedules/' . $row_Recordset1['fb']  . '\'" title="' . $row_Recordset1['high_school'] . ' Football Schedule");" class="style3" >FB</a>';

}
?>

Link to comment
Share on other sites

just had to swap them around this works and thanks again for the help

 

  <?php

if(empty($row_Recordset1['fb'])){
   //empty() returned true : so there is nothing
   echo 'FB';
}else{
   //empty() returned false so it is NOT true that there is nothing
   //so we can print it out:
   echo '<a href="javascript://" " title="' . $row_Recordset1['high_school'] . ' Football Schedule" onClick="popupfunction(\'/highschool/schedules/' . $row_Recordset1['fb']  . '\');" class="style3" >FB</a>';

}

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.