Using JavaScript to determine if search results appear


so basically, have field in database called "link" , i've coded in layout comes hyperlink:

 

<a href=" {tag_link}">more help</a>

 

the problem is, not every item has link. don't want hyperlink tag show in search results if there no content in database. used code in web app layout:

 

<script language="javascript">

                    var link = "{tag_link}";

                    if (link.length <= "1")

                    {

                         document.getelementbyid("itemhelp").style.display = 'none';

  }

</script>

 

now, hides first "link" item each time search... , there still empty links...

 

please

hey there, need loop. loop through, check , apply.

i highly recomend use jquery projects easy

 

sodu code of want :

 

loop

   if items has href of blank

     remove link



More discussions in Business Catalyst


adobe

Comments

Popular posts from this blog

How to change text Component easybook reloaded *newbee* - Joomla! Forum - community, help and support

After Effect warning: A problem occurred when processing OpenGL commands

Preconditions Failed. - Joomla! Forum - community, help and support