I have my ASP.NET 2.0 AJAX product working fine on my local machine. However, when I upload it to our production server and run it from there, I get the following Javascript error when the page first loads:
IE: "Microsoft JScript runtime error: Object doesn't support this property or method"
Firefox: "this.control.get_text is not a function"
It occurs on line 239 of the Slider control's WebResource.axd:
var _elementValue = Number.parse(this.control.get_text());
When running locally, the runs under the VS2005 built in web server athttp://localhost:xxxx/MyGossip/. The production server's address is ishttp://production/MyGossip/.
The page source is as follows (there are a couple of trivial web service methods in the code behind that are not shown):
<%@dotnet.itags.org. Page Language="C#" AutoEventWireup="true" CodeFile="Search.aspx.cs" Inherits="Search" %>
<%@dotnet.itags.org. Register Assembly="RadTabStrip.Net2" Namespace="Telerik.WebControls" TagPrefix="radTS" %>
<%@dotnet.itags.org. Register src="http://pics.10026.com/?src=Stars.ascx" TagName="Stars" TagPrefix="uc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<link type="text/css" rel="stylesheet" href="http://links.10026.com/?link=Results.css" />
<link type="text/css" rel="stylesheet" href="http://links.10026.com/?link=Default.css" />
<link type="text/css" rel="stylesheet" href="http://links.10026.com/?link=Rating.css" />
<title>MyGossip - Search tours</title>
</head>
<body>
<form id="Form1" runat="server">
<atlas:ScriptManager ID="s1" EnablePartialRendering="true" runat="server">
<Scripts>
</Scripts>
</atlas:ScriptManager>
<table align="center" style='width:800px;'>
<tr>
<td>
Min rating
</td>
<td colspan="2">
Max cost (0 for none)</td>
<td style='width: 199px'>
<atlas:UpdateProgress ID="UpdateProgress1" runat="server">
<ProgressTemplate>
<span id="DivProgress" style='font-size:90%; position:relative; top:-9px; left:200px; background-color:#666699;color:white; font-weight:bold;padding:3px;'>
Loading...
</span>
</ProgressTemplate>
</atlas:UpdateProgress>
</td>
</tr>
<tr>
<td style='width:300px;'>
<asp:DropDownList ID="DropDownListRating" runat="server" AutoPostBack="True" CssClass="textbox" Visible="false">
<asp:ListItem Value="0">All ratings</asp:ListItem>
<asp:ListItem Value="1">At least *</asp:ListItem>
<asp:ListItem Value="2">At least * *</asp:ListItem>
<asp:ListItem Value="3">At least * * *</asp:ListItem>
<asp:ListItem Value="4">At least * * * *</asp:ListItem>
<asp:ListItem Value="5">At least * * * * *</asp:ListItem>
</asp:DropDownList>
<atlasToolkit:Rating ID="RatingMinRating" runat="server"
CurrentRating="0" Direction="LeftToRight" ReadOnly="false" StarCssClass="ratingStar"
WaitingStarCssClass="savedRatingStar" FilledStarCssClass="savedRatingStar" EmptyStarCssClass="emptyRatingStar">
</atlasToolkit:Rating>
</td>
<td style='width:1px;'>
<asp:TextBox ID="SliderMaxCost" runat="server" style='width:80px;' AutoPostBack='true'></asp:TextBox>
</td>
<td style='width:80px;'>
<asp:TextBox ID="TextBoxMaxCost" runat="server" MaxLength="5" Columns="5" AutoPostBack="true" CssClass="textbox"></asp:TextBox>
<atlasToolkit:SliderExtender ID="SliderExtender1" runat="server">
<atlasToolkit:SliderProperties TargetControlID="SliderMaxCost" BoundControlID="TextBoxMaxCost"
Decimals="0" Minimum="0" Maximum="1000" Length="80" /></atlasToolkit:SliderExtender>
AUD
</td>
<td style='text-align:right;'>
<asp:Button ID="Button1" runat="server" Text="Update" />
</td>
</tr>
<tr>
<td colspan="4">
<atlas:UpdatePanel ID="UpdatePanelResultGrid" runat="server">
<Triggers>
<atlas:ControlEventTrigger ControlID="RatingMinRating" EventName="Changed" />
<atlas:ControlEventTrigger ControlID="Button1" EventName="Click" />
</Triggers>
<ContentTemplate>
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataSourceID="SqlDataSource1"
style='width:100%' CellPadding='4' AllowPaging='True' AllowSorting='True'>
<Columns>
<asp:TemplateField HeaderText="Activity" SortExpression="name">
<ItemTemplate>
<span class="ResultTitle">
<asp:Label ID="Label1" runat="server" Text='<%# Bind("name") %>'></asp:Label>
</span>
<br />
<asp:Label ID="Label3" runat="server" Text='<%# Bind("description") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="duration" HeaderText="Duration" SortExpression="duration" />
<asp:BoundField DataField="departs" HeaderText="Departs" SortExpression="departs" />
<asp:BoundField DataField="price" DataFormatString="{0:0.00} AUD" HeaderText="Cost"
SortExpression="price" />
<asp:TemplateField HeaderText="Rating" SortExpression="rating">
<ItemTemplate>
<uc1:Stars ID="Stars1" runat="server" Rating='<%# Eval("rating") %>' />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<ItemTemplate>
<asp:LinkButton ID="LinkButtonShowDetails" runat="server" Text="more"></asp:LinkButton>
<atlasToolkit:ModalPopupExtender ID="ModalPopupExtenderDetails" runat="server">
<atlasToolkit:ModalPopupProperties
TargetControlID="LinkButtonShowDetails"
PopupControlID="PanelPopupDetails"
DynamicControlID="LabelPopupDetailsDynamic"
DynamicContextKey='<%#Eval("name")%>'
DynamicServiceMethod="GetContent"
OkControlID="ButtonPopupDetailsClose"
BackgroundCssClass="ModalBackground" />
</atlasToolkit:ModalPopupExtender>
|
<asp:LinkButton ID="LinkButtonAddToShortlist" runat="server" Text="shortlist"></asp:LinkButton>
<atlasToolkit:ModalPopupExtender ID="ModalPopupExtenderShortlist" runat="server">
<atlasToolkit:ModalPopupProperties
TargetControlID="LinkButtonAddToShortlist"
PopupControlID="PanelPopupShortlist"
DynamicControlID="LabelPopupShortlistDynamic"
DynamicContextKey='<%#Eval("name")%>'
DynamicServiceMethod="AddToShortlist"
OkControlID="ButtonPopupShortlistClose"
BackgroundCssClass="ModalBackground" />
</atlasToolkit:ModalPopupExtender>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</ContentTemplate>
</atlas:UpdatePanel>
</td>
</tr>
</table>
<asp:Panel ID="PanelPopupDetails" runat="server" style='display:none;' CssClass='Popup'>
<h3>
<asp:Button ID="ButtonPopupDetailsClose" runat="server" Text="Close" style='float:right' />
<asp:Label ID="LabelPopupDetailsDynamic" runat="server" />
</h3>
<radTS:RadTabStrip ID="RadTabStrip1" runat="server" MultiPageID="RadMultiPage1" SelectedIndex="0"
Align="justify"
style='margin-bottom: -1px;'>
<Tabs>
<radTS:Tab runat="server" Text="Tour details"></radTS:Tab>
<radTS:Tab runat="server" Text="Reviews"></radTS:Tab>
<radTS:Tab runat="server" Text="Pricing"></radTS:Tab>
</Tabs>
</radTS:RadTabStrip>
<radTS:RadMultiPage ID="RadMultiPage1" runat="server" SelectedIndex="0"
style='BORDER:solid 1px #BBBBBB; width:95%; padding:20px; background-color:#FAFAFA;'>
<radTS:PageView ID="PageView1" runat="server" Width="100%">
<div>
<h3>
<img src="http://pics.10026.com/?src=images/bus.png" style='float:right; margin-left:20px;margin-bottom:10px;' alt='' />
Tour details
</h3>
<ul>
<li class="style4">1 Hour Daintree River Cruise<br />
</li>
<li class="style4">Hand feed kangaroos<br />
</li>
<li class="style4">Lunch at a freshwater creek<br />
</li>
<li class="style4">4WD the "Bloomfield Track"<br />
</li>
<li class="style4">Small & personalised </li>
</ul>
<p class="style14">Your naturalist guide will meet you at your accommodation at around 7am.
The first 1/2 of the journey north is very scenic with beautiful ocean views in contrast with the lush
farmland around Mossman. After morning tea you will learn about the mangrove rainforests, and hopefully
observe local wildlife including the Estuarine Crocodiles on the Daintree River Cruise. </p>
<p class="style14">This tour offers a little more. It takes you beyond Cape Tribulation along the 4WD
only 'Bloomfield Track', allows time for a swim in the Coral Sea at Cape Tribulation (seasonal).
There is no set timetable. You can enjoy elevated walks through the Cape Tribulation National Park
with experienced guides who allow ample time for questions and photographs. While you are taking a swim
in a tranquil freshwater stream the BBQ lunch is prepared then served with home made salads, tropical
fruit and Australian wine. You will probably see fish and turtles in the creek, butterflies and exotic
birds in the trees and often Goannas on the forest floor all at the luncheon site. On the way home enjoy
a short afternoon refreshment stop where you can pat a Kangaroo, scratch a cockatoo, have a cold beer or
sip a cup of local tea. Return to Cairns by 6:30pm. </p>
</div>
</radTS:PageView>
<radTS:PageView ID="PageView2" runat="server" Width="100%">
<div>
<h3>Reviews</h3>
<p><strong>Samantha, 22, Canada</strong>
<img src="http://pics.10026.com/?src=Images/Stars/star_on.png" /><img src="http://pics.10026.com/?src=Images/Stars/star_on.png" /><img
src="http://pics.10026.com/?src=Images/Stars/star_on.png" /><img src="http://pics.10026.com/?src=Images/Stars/star_half.png" /><img src="http://pics.10026.com/?src=Images/Stars/star_off.png" />
</p>
<p>
Our tour guide Geoff was amazing and the size of the group was just right. I would definitely recommend this tour
to backpackers.
</p>
<p>Helpful? <input type="button" value="Yes"/ > <input type="button" value="No"/ ></p>
<p><strong>Keith, 24, Ireland</strong>
<img src="http://pics.10026.com/?src=Images/Stars/star_on.png" /><img src="http://pics.10026.com/?src=Images/Stars/star_on.png" /><img
src="http://pics.10026.com/?src=Images/Stars/star_on.png" /><img src="http://pics.10026.com/?src=Images/Stars/star_on.png" /><img src="http://pics.10026.com/?src=Images/Stars/star_off.png" />
</p>
<p>
I only had two days in cairns, so this tour was perfect for me. If you're looking for a way to pack in as much
as you can in one day this would be the tour for you.</p>
<p>Helpful? <input type="button" value="Yes"/ > <input type="button" value="No"/ ></p>
<p><strong>Felicia, 19, UK</strong>
<img src="http://pics.10026.com/?src=Images/Stars/star_on.png" /><img src="http://pics.10026.com/?src=Images/Stars/star_on.png" /><img
src="http://pics.10026.com/?src=Images/Stars/star_on.png" /><img src="http://pics.10026.com/?src=Images/Stars/star_half.png" /><img src="http://pics.10026.com/?src=Images/Stars/star_off.png" />
</p>
<p>
Make sure you know what the weather is going to be like before you book this tour, it rained the whole time we were
there. But our tour guide made me most of it and was really enternaining.
</p>
<p>Helpful? <input type="button" value="Yes"/ > <input type="button" value="No"/ ></p>
</div>
</radTS:PageView>
<radTS:PageView ID="PageView3" runat="server" Width="100%">
<div>
<h3>Pricing</h3>
<p>All prices shown in Australian Dollars, valid from 1 April 2006 until 31 March 2007</p>
<table width="400" border="0" cellpadding="5" cellspacing="0">
<tr>
<th align="left" ><span class="style15"></span></td>
<th align="center"><span class="style1">Adult</span></td>
<th align="center"><span class="style1">Child</span></td>
<th align="center"><span class="style1">Family</span></td>
</tr>
<tr>
<th align="right"><span class="style1">Safari, Pensioner</span></td>
<td align="center"><span class="style1">$ 135</span></td>
<td align="center"><span class="style1">n/a</span></td>
<td align="center"><span class="style1">n/a</span></td>
</tr>
<tr onmouseover="return escape('Daintree/Cape Tribulation/4WD Bloomfield Track')">
<th align="right"><span class="style1">One Day Safari</span></td>
<td align="center"><span class="style1">$ 145</span></td>
<td align="center"><span class="style1">$ 95</span></td>
<td align="center"><span class="style1">$ 440</span></td>
</tr>
<tr>
<th align="right"><span class="style1">One Day Safari ex Port Douglas</span></td>
<td align="center"><span class="style1">$ 145</span></td>
<td align="center"><span class="style1">$ 95</span></td>
<td align="center"><span class="style1">$ 440</span></td>
</tr>
</table>
</div>
</radTS:PageView>
</radTS:RadMultiPage>
</asp:Panel>
<asp:Panel ID="PanelPopupShortlist" runat="server" style='display:none;' CssClass='Popup'>
<h3>
Trip added!
<asp:Button ID="ButtonPopupShortlistClose" runat="server" Text="Close" style='float:right' />
</h3>
<h4>Your shortlist is as follows:</h4>
<ul>
<asp:Label ID="LabelPopupShortlistDynamic" runat="server" />
</ul>
</asp:Panel>
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:MyGossipConnectionString %>"
ProviderName="<%$ ConnectionStrings:MyGossipConnectionString.ProviderName %>"
SelectCommand="SELECT [name], [description], [duration], [departs], [price], [no_days], [rating] FROM [Tour] WHERE (([rating] >= @dotnet.itags.org.rating) AND (@dotnet.itags.org.price = 0 OR [price] <= @dotnet.itags.org.price))">
<SelectParameters>
<asp:ControlParameter ControlID="RatingMinRating" DefaultValue="0" Name="rating"
PropertyName="CurrentRating" Type="Decimal" />
<asp:ControlParameter ControlID="TextBoxMaxCost" DefaultValue="0" Name="price"
PropertyName="Text" Type="Decimal" />
</SelectParameters>
</asp:SqlDataSource>
</form>
</body>
</html>
Any help appreciated.
Mike
Hi,
since the code is working on the local environment, it doesn't seem a problem related to the Slider, but instead to the production environment. Please check that all the client files are correctly sent to the browser.
I pointed an HTTP sniffer at requests made to both the local and remote sites, but as far as I can see, the same AXD requests are successfully made both on the local and remote machines. A total of 13 MS Ajax / Atlas control kit files are downloaded from h my test server and the production server:
MS client side library (beginningfunction WebForm_PostBackOptions...)Hi,
there seems to be a problem with the markup rendered by the extender:
<control id="SliderMaxCost"> <behaviors> <slider:SliderBehavior ... /> </behaviors></control>This is strange because it should render a textBox element rather than a control (the extender base class takes care of this). Rendering a control means that that the text property is not defined, and it crashes. I'll investigate and follow-up as soon as possible.
Hi,
please check if you' ve got an older version of the Control Toolkit on your production machine. You must have the September release assembly in order to use the Slider extender.
I just file copied the entire project folder structure from the development machine to the production server. The fact that the HTTP sniffer shows the slider behaviour javascript file being downloaded surely indicates that the correct version is installed.
Any other ideas?
Mike
Hi,
it can happen when embedding a new extender in a previous version of the Control Toolkit and then recompiling, for example. However, it seems not your case. I'll continue to investigate.
Thanks for taking the time with this. I simplified the problem and posted it as a new question, which may make your investigations easier:
http://forums.asp.net/thread/1420009.aspx
Cheers,
Mike
No comments:
Post a Comment