Yes Jeff I have used JavaScript inside the <%IF% (%MATCH% statements. 

The best way to do this in your situation since the tag is processed before the 
Javascript, is to create a <script> </script> inside the iteration, but before the IF 
block. In that script before the IF block, within the same iteration of your "loop 
concept" tags i.e., List tags, make your javascript variable equal to what ever 
getvalue tag you want from what's up gold.  Then, create your What's Up Gold code 
using javascript.  See the document.write below to see how I created my what's up gold 
code. This is cut from one of my custom pages.

 

document.write("<%DEVICE% HOST_TYPE>"); inside a java script, assuming the syntax is 
correct and it is within a device list loop, will cause host type will appear on the 
page for every loop of the list tag.

Hope this helps.

<%START_WHATEVER_LIST%>
<script>
var getBuilding;
function goMap(getBuilding)
 {
   
   getBuilding=("<%URL_VALUE% getBuilding>");
   document.write("<%CURRENT_MAP% (%URL_VALUE% getBuilding>");
   return getBuilding;
   //window.location="/PortUseSingleBuilding_Startcount.asp";
    
 }
 function turnon(getBuilding)
  {
  getBuilding=goMap(getBuilding);
   var getBuilding;
  var urlstring="/PortUseSingleBuilding_Startcountwarning.asp?getBuilding=";
  var wholething=urlstring + getBuilding;
  window.location=wholething;
  
  }
 
   
function turnoff(getBuilding)
  {
  getBuilding=goMap(getBuilding);
   var getBuilding;
  var urlstring="/PortUseSingleBuilding_Stopcount.asp?getBuilding=";
  var wholething=urlstring + getBuilding;
  window.location=wholething;
     }
 
document.write("<%IF% (%MATCH% (%MAP% NAME, getBuilding))>");
 
document.write("Put your code in similar to this."):
 
document.write("<%ENDIF%>");

</script>
 
 
 
<%END_WHATEVER_LIST%>

        -----Original Message----- 
        From: Jeff Cook [mailto:[EMAIL PROTECTED] 
        Sent: Wed 7/2/2003 3:51 PM 
        To: '[EMAIL PROTECTED]' 
        Cc: 
        Subject: RE: [WhatsUp Forum] JavaScript variable
        
        

        WUG processes the %IF% before you browser could process the JavaScript.  If
        you can write JavaScript you could have a page that WUG writes into
        JavaScript variables.  Then use JavaScript to do your if statements.  I have
        not done this my self.  I do remember someone else on the list doing this to
        create a sorted list by name or IP of all of the devices in WUG.
        
        Good Luck
        
        Jeff Cook
        Network Administrator
        Whatcom Educational Credit Union
        
        -----Original Message-----
        From: Glatt, Robert [mailto:[EMAIL PROTECTED]
        Sent: Wednesday, July 02, 2003 1:23 PM
        To: wug (E-mail)
        Subject: [WhatsUp Forum] javscript variable
        
        
        Has anyone used a javascript variable inside an %IF% (%MATCH%) statement ???
        
        I am trying to be able to get a list of all my maps that end with a specific
        5 characters. I get the list of all but not of a specific variable.
        
        
        Any help would be greatly appreciated.
        
        Please visit http://www.ipswitch.com/support/mailing-lists.html
        to be removed from this list.
        
        An Archive of this list is available at:
        http://www.mail-archive.com/whatsup_forum%40list.ipswitch.com/
        
        Please visit http://www.ipswitch.com/support/mailing-lists.html
        to be removed from this list.
        
        An Archive of this list is available at:
        http://www.mail-archive.com/whatsup_forum%40list.ipswitch.com/
        

<<winmail.dat>>

Reply via email to