Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Javascript syntax

Posted on 2011-10-07
2
Medium Priority
?
271 Views
Last Modified: 2012-05-12
I have the code below which checks for existance of records then redirects, this is ASP Classic.VBScript. I need this for an ASPClassic/Javascript version of a page.
------------------------
<% If Not Assignedattorney.EOF Or Not Assignedattorney.BOF Then %>
                   <% If Assignedtocase.EOF And Assignedtocase.BOF Then %>
               <script language="javascript">
window.location.href="Cases/Noaccess.asp?caseid=<%=(Casesjoin.Fields.Item("Id").Value)%>";
</script>
  <% End If ' end Assignedtocase.EOF And Assignedtocase.BOF %>
  <% End If ' end Not Assignedattorney.EOF Or NOT Assignedattorney.BOF %>

----------------

Thanks.
0
Comment
Question by:Aleks
2 Comments
 
LVL 61

Accepted Solution

by:
HainKurt earned 2000 total points
ID: 36933339
try
<% if (!Assignedattorney.EOF || !Assignedattorney.BOF){ %>
  <% if (Assignedtocase.EOF && Assignedtocase.BOF){ %>
<script language="javascript">
window.location.href="Cases/Noaccess.asp?caseid=<%=(Casesjoin.Fields.Item("Id").Value)%>";
</script>
  <% } // end Assignedtocase.EOF And Assignedtocase.BOF %>
<% } // end Not Assignedattorney.EOF Or NOT Assignedattorney.BOF %>

Open in new window

0
 

Author Comment

by:Aleks
ID: 36934007
Thanks I will try this code tonight.
0

Featured Post

[Webinar] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
With User Account Control (UAC) enabled in Windows 7, one needs to open an elevated Command Prompt in order to run scripts under administrative privileges. Although the elevated Command Prompt accomplishes the task, the question How to run as script…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

564 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question