www.Inmagic.com    Inmagic Forums    Inmagic Forums  Hop To Forum Categories  Scripting    Do not display Fields that have the same contents
Go
New
Find
Notify
Tools
Reply
  
-star Rating Rate It!  Login/Join 
Posted
Is there a way to not display a field in webpublisher if it has exactly the same content as another field.

eg. if the title and description field are the same then only display the description.

I have this so far but carriage returns and the like are messing up the comparison.

var description = new String ("DocDescription");
var title = new String ("Title");

if (description.length == title.length)
{
document.write("")
}
else
{
document.write("<tbody><tr><td class=field>Title</td><td class=entry colspan=2>" + title + "</td></tr></tbody")
}

//--></SCRIPT>

This message has been edited. Last edited by: JennM,
 
Posts: 153 | Registered: Tue June 08 2004Reply With QuoteEdit or Delete MessageReport This Post
 Previous Topic | Next Topic powered by eve community  
 

www.Inmagic.com    Inmagic Forums    Inmagic Forums  Hop To Forum Categories  Scripting    Do not display Fields that have the same contents