CFperts:

We are experiencing a JS error, that seems to be permissions based on a
new application. The exact message is:

JavaScript Error:

http://dppserv.pace.edu/lienhard/backoffice/student.cfm/option=search,
line 66:

access disallowed from scripts at
http://dppserv.pace.edu/lienhard/backoffice/student.cfm/option=search to
documents
at another domain.

This happens on the production server, which is brand new. The server is
running Win2k Advanced Server, latest MDAC, CF 4.5.1 SP2 and IIS 5. The
exact same code on another development server produces the same result.

On a workstation, running NT WrkSt 4, personal web server, and CF 4.5.1
SP2 studio & server, the application works perfectly OK. On another
production server, running NT 4, SP4, IIS 4 and CF 4.0.1, the app also
runs perfectly OK.

Execute permissions for scripts are on all of the application's
associated directories. The template in question, which generates JS
code, is appended below.

Any help will be gratefully appreciated. Thank you.

-Gerry

Gerard T. Pauline
Mgr, Internet/DB Applications
Computer Systems, DoIT
Pace University

==================================================================================================


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
        <title>Select A Student</title>
</head>
<body background="images/nurseback.jpg">
<form name="StudentSelectList" method="post">
<!--- SEARCH FOR STUDENT --->
<cfif url.option is 'search'>
    <CFSET thisid='X@Y@Z'>
    <cfoutput>
            <cfif isdefined('url.id')>       
                        <cfset thisid='#url.id#'>
                <cfelseif isdefined('form.findsid.x')>
                    <cfset thisid='#form.sid#'>                 
                </cfif>
        </cfoutput>
        <cfif not thisid is 'X@Y@Z'>
         <CFLOOP INDEX="Table" LIST="StudentInfo,isispin,Lienhard">   
                <CFQUERY name="stud" DATASOURCE="#ConnectToDB#">
                        Select *
                        From #Table#
                        Where SID='#thisid#'
                </CFQUERY>
                <CFIF stud.recordcount GT 0>
                        <CFBREAK>
                </cfif>
        </CFLOOP>       
        <cfelseif isdefined('form.findname.x')>
        <cfif (len(form.lname) GT 0) or (len(form.fname) GT 0)
             or (len(form.mid) GT 0) >
          <cfquery name="stud" datasource="#ConnectTODB#">
                Select  Firstname,lastname,MINIT,SID,PIN,email,emailpace
                from    studentinfo
                where   lastname like '#form.lname#%' AND
                        firstname like '#form.fname#%' AND
                                minit like '#form.mid#%'
                UNION   select Firstname,lastname,MINIT,SID,PIN,email,emailpace FROM
ISISPIN
                                where   lastname like '#form.lname#%' AND
                        firstname like '#form.fname#%' AND
                                minit like '#form.mid#%'
                UNION   select Firstname,lastname,MINIT,SID,PIN,email,emailpace FROM
lienhard
                                where   lastname like '#form.lname#%' AND
                        firstname like '#form.fname#%' AND
                                minit like '#form.mid#%'
                ORDER   BY      LASTNAME,FIRSTNAME,MINIT,SID
          </cfquery>        
        <CFELSE>
            <cfquery name="stud" datasource="#ConnectTODB#">
                   SELECT *
                   FROM studentinfo
                   where SID = '(&)(^*%&$&$'
                </cfquery>
        </cfif>
        </cfif> 
        <cfif stud.recordcount GT 0>
                <cfif stud.recordcount is 1>
                      <CFSET dtables ="">                       
                          <CFLOOP INDEX="Table" LIST="isispin,Lienhard,StudentInfo">   
                        <CFQUERY NAME="Login" DATASOURCE="#ConnectToDB#">
                                Select SID
                                From #Table#
                                Where (SID = '#stud.sid#') 
                        </CFQUERY>
                                 <CFIF Table is 'ISISPIN'>
                                         <CFIF Login.RecordCount Gt 0>
                                                <CFSET dtables = dtables&'ISISPIN'>
                                         </cfif>
                                </cfif>
                                 <CFIF Table is 'Lienhard'>
                                        <CFIF Login.RecordCount Gt 0>
                                                <CFSET dtables = dtables&'lienhard'>
                                        </cfif>
                                </cfif>
                                 <CFIF Table is 'StudentInfo'>
                                     <CFIF Login.RecordCount Gt 0>
                                                <CFSET dtables = dtables&"student">
                                         </cfif>
                                </cfif>  
                        </cfloop>               
                   <cfinclude template="loadsessionvars.cfm">                          
         
                        <CFIF Session.action is "reg">
                        <script language="JavaScript">
                                
parent.topframe.location.href="menu.cfm?select=studentbar";
                        
parent.bottomframe.location.href="addcourse.cfm?option=newreg&deletemsg=false";
                        </script>                                       
                        <CFELSE>
                        <script language="JavaScript">
                                
parent.topframe.location.href="menu.cfm?select=studentbar";
                        </script>
                        </cfif>
                <cfelse>
                        <table width="100%"
                       border="0"
                       cellspacing="1"
                       cellpadding="0"
                       align="center"
                       bgcolor="Black">
                                        <tr bgcolor="#1C0540">
                                                <td><font face='arial' size=2 
color='yellow'>Last Name</font></td>
                                                <td><font face='arial' size=2 
color='yellow'>First
Name</font></td>
                                                <td><font face='arial' size=2
color='yellow'>Middle</font></td>                                               
                                                <td><font face='arial' size=2 
color='yellow'>Pin</font></td>
                                                <td><font face='arial' size=2 
color='yellow'>Email</font></td>
                                                <td><font face='arial' size=2 
color='yellow'>Pace
Email</font></td>               
                                                <td><font face='arial' size=2 
color='yellow'>Student
ID</font></td>          
                                                <td><font face='arial' size=1 
color='yellow'>ISIS</font></td>
                                                <td><font face='arial' size=1 
color='yellow'>Nursing</font></td>
                                                <td><font face='arial' size=1
color='yellow'>Local</font></td>                                                
                                        </tr>                   
                                <cfset rowcolor=1>      
                                <cfoutput query="stud"> 
                                <cfset rowcolor=rowcolor*-1>
                                        <cfif rowcolor GT 0>
                                          <cfset mycolor="DCB9FF">
                                        <cfelse>
                                          <cfset mycolor="BBB5E1">
                                        </cfif>                                        
                                                                
                                        <tr bgcolor="#mycolor#" valign="top">
                                                <td><font face='arial' size=2
color='black'>#lastname#</font>&nbsp;</td>
                                                <td><font face='arial' size=2
color='black'>#firstname#</font>&nbsp;</td>
                                                <td><font face='arial' size=2
color='black'>#minit#</font>&nbsp;</td>                                         
                                                <td><font face='arial' size=2
color='black'>#PIN#</font>&nbsp;</td>
                                                <td><font face='arial' size=2
color='black'>#trim(email)#</font>&nbsp;</td>
                                                <td><font face='arial' size=2
color='black'>#trim(emailpace)#</font>&nbsp;</td>               
                                                <td><a 
href="student.cfm?option=search&id=#SID#"
style="font-family: Arial; font-size: small; color: navy;
text-decoration: underline;">#SID#</a>&nbsp;</td>               
                                                <CFLOOP INDEX="Table" 
LIST="isispin,Lienhard,StudentInfo">   
                                                <CFQUERY NAME="Login" 
DATASOURCE="#ConnectToDB#">
                                                       Select SID
                                                         From #Table#
                                                        Where (SID = '#SID#') 
                                                </CFQUERY>
                                                          <CFIF Table is 'ISISPIN'>
                                                             <CFIF Login.RecordCount 
Gt 0>
                                                                 <td 
align="center"><img src="images/arrow.gif" width=16
height=16 border=0 alt=""></td>
                                                                 <cfelse>
                                                                         
<td>&nbsp;</td>
                                                                 </cfif>
                                                          </cfif>
                                                          <CFIF Table is "Lienhard">   
                                                     
                                                             <CFIF Login.RecordCount 
Gt 0>
                                                                 <td 
align="center"><img src="images/arrow.gif" width=16
height=16 border=0 alt=""></td>
                                                                 <cfelse>
                                                                         
<td>&nbsp;</td>
                                                                 </cfif>
                                                          </cfif>
                                                  <CFIF Table is "StudentInfo">        
                                  
                                                             <CFIF Login.RecordCount 
Gt 0>
                                                                 <td 
align="center"><img src="images/arrow.gif" width=16
height=16 border=0 alt=""></td>
                                                                 <cfelse>
                                                                         
<td>&nbsp;</td>
                                                                 </cfif>
                                                                 
                                                          </cfif>                      
                                    
                                                  
                                                </CFLOOP>                              
                 
                                        </tr>
                                </cfoutput>
                        </table>
                </cfif>
        <cfelse>
        <br><br><br>
                <center><font face='arial' size=3 color='red'>No records found for
this student...</font></center>
        </cfif>
</cfif>
</form>
<!--- END SEARCH FOR STUDENT --->
<!--- SELECT A STUDENT --->
<cfif url.option is 'select'>
<form name="studentselect" action="student.cfm?option=search"
method="post">
        <cfoutput>
                <table width="60%" align="center">
                        <tr>
                                <td Colspan=2><font face="Arial" size="4" 
color="Purple">Search
Options</font></td>
                        </tr>
                        <tr valign="top">
                                <td width="20" align="center"><font face="Arial" 
size="4"
color="purple">1</font></td>
                                <td>
                                        <table width="90%" border="0" cellspacing="0" 
cellpadding="0">
                                                <tr>
                                                        <td align="right" width=23><img
src="images/topschcurv.jpg"border=0></td>
                                                        <td align="center" 
bgcolor="##79559D"><font face="Arial" size="2"
color="black"><b>By Student ID Number</b></font></td>
                                                        <td bgcolor="##79559D" 
align="right"><img
src="images/toprightschcurv.jpg"border=0></td>
                                                </tr>
                                                <tr valign="bottom">
                                                        <td align="right" width=23><img
src="images/block.jpg"border=0></td>
                                                        <td colspan=2 
bgcolor="##79559D"><font face="Arial" size="2"
color="white"><b>Id Number</b></font></td>
                                                </tr>
                                                <tr valign="bottom">
                                                        <td align="right" width=23><img
src="images/schcurv.jpg"border=0></td>
                                                        <td valign="bottom" 
bgcolor="##79559D"><font face="Arial"
size="2" color="red"><input type="text"
name="sid"></font>&nbsp;&nbsp;<input type="image" name="findsid"
src="images/select2.jpg" border="0"></td>
                                                        <td bgcolor="##79559D" 
align="right"><img
src="images/lowrightschcurv.jpg"border=0></td>
                                                </tr>
                                        </table>
                                </td>
                        </tr>
                        <tr valign="top">
                                <td width="20" align="center"><font face="Arial" 
size="4"
color="purple"><b>2</b></font></td>
                                <td>
                                        <table width="90%" border="0" cellspacing="0" 
cellpadding="0">
                                                <tr>
                                                        <td align="right" width=23><img
src="images/topschcurv.jpg"border=0></td>
                                                        <td align="center" 
bgcolor="##79559D"><font face="Arial" size="2"
color="black"><b>By Student Name</b></font></td>
                                                        <td bgcolor="##79559D" 
align="right"><img
src="images/toprightschcurv.jpg"border=0></td>
                                                </tr>
                                                <tr valign="bottom">
                                                        <td align="right" width=23><img
src="images/block.jpg"border=0></td>
                                                        <td colspan=2 
bgcolor="##79559D"><font face="Arial" size="2"
color="white"><B>First Name</b></font></td>
                                                </tr>
                                                
                                                <tr valign="bottom">
                                                        <td align="right" width=23><img
src="images/block.jpg"border=0></td>
                                                        <td colspan=2 
bgcolor="##79559D"><font face="Arial" size="2"
color="red"><input type="text" name="fname"></font></td>
                                                </tr>
                                                <tr valign="bottom">
                                                        <td align="right" width=23><img
src="images/block.jpg"border=0></td>
                                                        <td colspan=2 
bgcolor="##79559D"><font face="Arial" size="2"
color="white"><B>Middle Initial</b></font></td>
                                                </tr>
                                                <tr valign="bottom">
                                                        <td align="right" width=23><img
src="images/block.jpg"border=0></td>
                                                        <td colspan=2 
bgcolor="##79559D"><font face="Arial" size="2"
color="red"><input type="text" name="mid" size=1></font></td>
                                                </tr>                                  
         
                                                <tr valign="bottom">
                                                        <td align="right" width=23><img
src="images/block.jpg"border=0></td>
                                                        <td colspan=2 
bgcolor="##79559D"><font face="Arial" size="2"
color="white"><b>Last name</b></font></td>
                                                </tr>
                                                <tr valign="bottom">
                                                        <td align="right" width=23><img
src="images/schcurv.jpg"border=0></td>
                                                        <td bgcolor="##79559D"><font 
face="Arial" size="2"
color="red"><input type="text" name="lname"></font>&nbsp;&nbsp;<input
type="image" name="findname" src="images/select2.jpg"
border="0"></td>                                                        
                                                        <td bgcolor="##79559D" 
align="right"><img
src="images/lowrightschcurv.jpg"border=0></td>
                                                </tr>
                                                
                                        </table>
                                </td>
                        </tr>
                </table>
        </cfoutput>
</form> 
</cfif>
<!--- END SELECT A STUDENT --->
</body>
</html>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to