can anyone tell me why this is getting a runtime error?

<%@ Page Language="VB" ContentType="text/html" ResponseEncoding="windows-1251" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.Odbc" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ Register TagPrefix="uc1" TagName="links1" Src="/includes/_header.ascx" %>
<%@ Register TagPrefix="uc2" TagName="links2" Src="/includes/_nav.ascx" %>  
<%@ Register TagPrefix="uc3" TagName="links3" Src="/includes/_footer.ascx" %>  
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Best Practices in Laboratory Medicine | Home</title>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251" />
<link rel="stylesheet" type="text/css" href="/style/main_css.css" />
<script type="text/javascript" src="/js/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="/js/jquery.innerfade.js"></script>
<script type="text/javascript" src="/js/js.js"></script>
<script type="text/javascript">
	$(function(){
		$('#fp_gallery').innerfade({
			speed: 'slow', 
			timeout: 4000, 
			type: 'sequence', 
			containerheight: '250px' 
		});
	});
</script>
</head>

<body>

<div id="wrapper">
    
	<div id="header">
		<uc1:links id="links1" runat="server"/>
	</div>
    
	<uc2:links id="links2" runat="server" />
    
	<div id="topimage-block">
		<div id="fp_gallery">
	    	<img alt="Toddler and Doctor" src="/img/pic2.jpg" />
		</div>
		<div class="register-block">
        	<a href="/get_involved/register/">Register</a>
        </div>
        <a href="/about/news_and_events/"><img src="/img/news-and-announcements.png" alt="news and announcements" /></a>
    	<img class="dots" src="/img/dots.png" alt="Dots" />
    </div>
	
    <div id="content-wrapper">
        <div id="breadcrumb">
			> <a href="/get_involved/">Get Involved</a> > Register
		</div>
        
      <div id="content">
        	<h1>Register</h1>
            
            <div id="register"><form id="form1" runat="server" action="#" method="post">
            	<label>Name</label>
                <asp:TextBox runat="server" id="reg_name" name="reg_name"></asp:textbox>
                <label>Position</label>
                <asp:TextBox runat="server" id="reg_potision" name="reg_potision"></asp:textbox>
                <label>Institution</label>
                <asp:TextBox runat="server" id="reg_institution" name="reg_institution"></asp:textbox>
                <label>Organization/Department</label>
                <asp:TextBox runat="server" id="reg_department" name="reg_department"></asp:textbox>
                <label>Phone Number</label>
                <asp:TextBox runat="server" id="reg_phone" name="reg_phone"></asp:textbox>
                <label>E-Mail</label>
                <asp:TextBox runat="server" id="reg_email" name="reg_email"></asp:textbox>
                <label>Address</label>
                <asp:TextBox runat="server" id="reg_address" name="reg_address"></asp:textbox>
                <label>City</label>
                <asp:TextBox runat="server" id="reg_city" name="reg_city"></asp:textbox>
                <label>State</label>
                <asp:DropDownList runat="server" id="reg_state" name="reg_state">
					<asp:ListItem value="AK" id="ak" runat="server">AK</asp:ListItem >
					<asp:ListItem value="AL" id="AL" runat="server">AL</asp:ListItem >
					<asp:ListItem value="AR" id="ar" runat="server">AR</asp:ListItem >
					<asp:ListItem value="AZ" id="az" runat="server">AZ</asp:ListItem >
					<asp:ListItem value="CA" id="ca" runat="server">CA</asp:ListItem >
					<asp:ListItem value="CO" id="co" runat="server">CO</asp:ListItem >
					<asp:ListItem value="CT" id="ct" runat="server">CT</asp:ListItem >
					<asp:ListItem value="DC" id="dc" runat="server">DC</asp:ListItem >
					<asp:ListItem value="DE" id="de" runat="server">DE</asp:ListItem >
					<asp:ListItem value="FL" id="fl" runat="server">FL</asp:ListItem >
					<asp:ListItem value="GA" id="ga" runat="server">GA</asp:ListItem >
					<asp:ListItem value="HI" id="hi" runat="server">HI</asp:ListItem >
					<asp:ListItem value="IA" id="ia" runat="server">IA</asp:ListItem >
					<asp:ListItem value="ID" id="id" runat="server">ID</asp:ListItem >
					<asp:ListItem value="IL" id="il" runat="server">IL</asp:ListItem >
					<asp:ListItem value="IN" id="in" runat="server">IN</asp:ListItem >
					<asp:ListItem value="KS" id="ks" runat="server">KS</asp:ListItem >
					<asp:ListItem value="KY" id="ky" runat="server">KY</asp:ListItem >
					<asp:ListItem value="LA" id="la" runat="server">LA</asp:ListItem >
					<asp:ListItem value="MA" id="ma" runat="server">MA</asp:ListItem >
					<asp:ListItem value="MD" id="md" runat="server">MD</asp:ListItem >
					<asp:ListItem value="ME" id="me" runat="server">ME</asp:ListItem >
					<asp:ListItem value="MI" id="mi" runat="server">MI</asp:ListItem >
					<asp:ListItem value="MN" id="mn" runat="server">MN</asp:ListItem >
					<asp:ListItem value="MO" id="mo" runat="server">MO</asp:ListItem >
					<asp:ListItem value="MS" id="ms" runat="server">MS</asp:ListItem >
					<asp:ListItem value="MT" id="mt" runat="server">MT</asp:ListItem >
					<asp:ListItem value="NC" id="nc" runat="server">NC</asp:ListItem >
					<asp:ListItem value="ND" id="nd" runat="server">ND</asp:ListItem >
					<asp:ListItem value="NE" id="ne" runat="server">NE</asp:ListItem >
					<asp:ListItem value="NH" id="nh" runat="server">NH</asp:ListItem >
					<asp:ListItem value="NJ" id="nj" runat="server">NJ</asp:ListItem >
					<asp:ListItem value="NM" id="nm" runat="server">NM</asp:ListItem >
					<asp:ListItem value="NV" id="nv" runat="server">NV</asp:ListItem >
					<asp:ListItem value="NY" id="ny" runat="server">NY</asp:ListItem >
					<asp:ListItem value="OH" id="oh" runat="server">OH</asp:ListItem >
					<asp:ListItem value="OK" id="ok" runat="server">OK</asp:ListItem >
					<asp:ListItem value="OR" id="or" runat="server">OR</asp:ListItem >
					<asp:ListItem value="PA" id="pa" runat="server">PA</asp:ListItem >
					<asp:ListItem value="RI" id="ri" runat="server">RI</asp:ListItem >
					<asp:ListItem value="SC" id="sc" runat="server">SC</asp:ListItem >
					<asp:ListItem value="SD" id="sd" runat="server">SD</asp:ListItem >
					<asp:ListItem value="TN" id="tn" runat="server">TN</asp:ListItem >
					<asp:ListItem value="TX" id="tx" runat="server">TX</asp:ListItem >
					<asp:ListItem value="UT" id="ut" runat="server">UT</asp:ListItem >
					<asp:ListItem value="VA" id="va" runat="server">VA</asp:ListItem >
					<asp:ListItem value="VT" id="vt" runat="server">VT</asp:ListItem >
					<asp:ListItem value="WA" id="wa" runat="server">WA</asp:ListItem >
					<asp:ListItem value="WI" id="wi" runat="server">WI</asp:ListItem >
					<asp:ListItem value="WV" id="wv" runat="server">WV</asp:ListItem >
					<asp:ListItem value="WY" id="wy" runat="server">WY</asp:ListItem >
                </asp:DropDownList>
                <label>Zip/Postal Code</label>
                <asp:TextBox runat="server" id="reg_zip" name="reg_zip"></asp:textbox>
                <p>I am interested in:</p>
                <table>
                	<tr>
                		<td><asp:CheckBox runat="server" id="reg_topics" name="reg_topics"></asp:CheckBox></td>
    					<td><label style="padding:0 0 10px 20px;">being notified of future topics for which we might contribute data</label></td>
                	</tr>
                	<tr>
                		<td><asp:CheckBox runat="server" id="reg_findings" name="reg_findings"></asp:CheckBox></td>
    					<td><label style="padding:0 0 10px 20px;">being notified when findings or recommendations are issued</label></td>
                	</tr>
                	<tr>
                		<td><asp:CheckBox runat="server" id="reg_updates" name="reg_updates"></asp:CheckBox></td>
                		<td><label style="padding:0 0 10px 20px;">receiving periodic updates on the status of Laboratory Medicine Best Practices</label></td>
                	</tr>
				</table>
                <asp:ImageButton runat="server" id="submit" name="submit" ImageUrl="/img/next.png" style="margin-top:10px;"></asp:ImageButton>
            </form></div>

        </div>
    
    	<div id="rightcol">
            
            <div id="rightmenu">
            	<ul>
                	<li><a href="/get_involved/">Get Involved</a></li>
                	<li><a href="/get_involved/register/">Register</a></li>
                	<li><a href="/get_involved/data_submission/">Data Submission</a></li>
                	<li><a href="/get_involved/suggest_topics/">Suggest Topics</a></li>
                	<li><a href="/get_involved/network/">Network</a></li>
                	<li class="last"><a href="/get_involved/public_comments/">Public Comments</a></li>
                </ul>
            </div>
            
        </div><!-- InstanceEndEditable -->
        
		<div class="clear"><!-- --></div>
    
	</div>
    
  <div id="footer"><div>
    <uc3:links id="links3" runat="server"/>
  </div>
  </div>

</div>

</body>
</html>

Dani AI

Generated

Good catch by — removing the rotate call stopped the runtime error. That matches a common pattern: a jQuery plugin init will fail whenever the environment isn’t what the plugin expects (plugin file not loaded or loaded in the wrong order, selector returns no or too few nodes, option types mismatch, or a JS name collision in the page). A small defensive check around the initialization avoids hard failures and makes the page tolerant of a single image or a missing plugin.

Helpful diagnostic steps:

  • Inspect the browser console and copy the exact error and stack trace; that shows whether the failure is “undefined is not a function”, a type error, or something else.
  • Confirm the plugin script is actually loaded and that jQuery is loaded before the plugin (Network tab and script ordering).
  • Confirm the selector finds the expected elements (count images with the console).
  • Look for naming collisions (for example, form controls named submit will shadow form.submit() in JavaScript and can break scripts).

A simple, robust init pattern:

$(function() {
  // only call innerfade when the plugin exists and there is more than one image
  if ($.fn && $.fn.innerfade && $('#fp_gallery img').length > 1) {
    $('#fp_gallery').innerfade({
      speed: 'slow',
      timeout: 4000,
      type: 'sequence'
      // containerheight: 250  // check the plugin docs for expected type (number vs. "250px")
    });
  }
});

Extra notes: avoid naming form inputs submit; place scripts after DOM markup where practical or rely on $(document).ready; and consult the innerfade docs for option types (some plugins expect numeric values, not strings with “px”). These measures make the rotation feature fail-safe and prevent runtime errors when there’s just one image or the plugin is absent.

since i'm not actually rotating banner images on this page, i probably shouldn't try to call the javascript with just one photo to use!

took out the function and we're in business now!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.