ConvincingMail - Email Marketing SoftwareConvincingMail
 
Email Marketing Software

Welcome Guest Search | Active Topics | Members | Log In | Register

problem with autosuggest control in contentpage Options · View
Guest
Posted: Wednesday, May 28, 2008 11:23:10 AM
Rank: Guest
Groups: Guest

Joined: 11/18/2007
Posts: 15
Hi,

I test your control and it works very well in classic page with beacon <form> but when i want to use it in a website with masterpage, i have javascript file problem with the contentplaceholder (<asp:content id="Content1" contentplaceholderid="FlowerText" runat="server">).
The message said that it doesn' found the beacon <form>.
Do you have an idea how i can resolve this problem?

Thanks

Sorry for my English, this is not my mother tongue
trooper
Posted: Wednesday, May 28, 2008 1:56:16 PM
Rank: Administration
Groups: Administration

Joined: 11/18/2007
Posts: 23
Hi ,

Can you provide code samples of the masterpage and contentpages?

Thanks.
Guest
Posted: Thursday, May 29, 2008 2:30:12 AM
Rank: Guest
Groups: Guest

Joined: 11/18/2007
Posts: 15
Here my code :
Site.Master :

<%@ Master Language="VB" CodeFile="Site.master.vb" Inherits="Site" %>

<!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">
<title>Untitled Page</title>
<asp:ContentPlaceHolder id="head" runat="server">
</asp:ContentPlaceHolder>
<style type="text/css">
.style2
{
width: 506px;
}
.style4
{
width: 151px;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<table border="1">
<tr>
<td colspan="3">
<div>Site Title</div>
</td>
<tr>
<td class="style4">
<b>Menu</b><br/>
<br/>
<a href="Page1.aspx">Page 1</a><br/>
<a href="Page2.aspx">Page 2</a><br/>
<a href="Page3.aspx">Page 3</a><br/>
</td>
<td class="style2">
<asp:ContentPlaceHolder id="CONTENT1" Runat="Server"/>
</td>
</tr>
</table>

</form>
</body>
</html>

Classic Page : Default.aspx :
<%@ Page Language="VB" AutoEventWireup="true" CodeFile="Default.aspx.vb" Inherits="_Default" %>

<%@ Register Assembly="ConvincingMail.AdvancedAutoSuggest" Namespace="ConvincingMail.AdvancedAutoSuggest" TagPrefix="cc1" %>

<!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 id="Head1" runat="server">
<title>Ajax autocomplete demo.</title>
<link rel="Stylesheet" href="suggestions.css" type="text/css" />
<script type='text/javascript' language='JavaScript' src="prototype-1.6.0.2.js"></script>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
Numero serie :<asp:TextBox ID="TxtNumSerie" runat="server" AutoCompleteType="none"></asp:TextBox><br />
Type de chariot :<asp:TextBox ID="TxtTypeChariot" runat="server" Enabled="false"></asp:TextBox>
<cc1:AdvancedAutoSuggestExtender TargetControlID="TxtNumSerie" ServiceUrl="~/Suggestions.asmx/ChariotSuggest" UpdateField="TxtTypeChariot" ID="NumTypeChariot" AdditionalFields="TxtNumSerie" runat="server" />
</form>

</body>
</html>

page that works fine.


Page with contentPage : Default2.aspx
<%@ Page MasterPageFile="Site.master" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc2" %>
<%@ Register Assembly="ConvincingMail.AdvancedAutoSuggest" Namespace="ConvincingMail.AdvancedAutoSuggest" TagPrefix="cc1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="CONTENT1" Runat="Server">

<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
Numero serie :<asp:TextBox ID="TxtNumSerie" runat="server" AutoCompleteType="none"></asp:TextBox><br />
Type de chariot :<asp:TextBox ID="TxtTypeChariot" runat="server" Enabled="false"></asp:TextBox>
<cc1:AdvancedAutoSuggestExtender TargetControlID="TxtNumSerie" ServiceUrl="~/Suggestions.asmx/ChariotSuggest" UpdateField="TxtTypeChariot" ID="NumTypeChariot" AdditionalFields="TxtNumSerie" runat="server" />

</asp:Content>

when i launch the default2.aspx i have an error on the javascipt file that said form is undefined and object is waiting.

I think it normal because in content page we haven't beacon form and in the javascript file he look for a beacon form.

I hope you can solve my problem.

Thanks
trooper
Posted: Thursday, May 29, 2008 5:02:26 AM
Rank: Administration
Groups: Administration

Joined: 11/18/2007
Posts: 23
Hi
I think that you forgot to include this in your masterpage header section:

Code:
<link rel="Stylesheet" href="suggestions.css" type="text/css" />
<script type='text/javascript' language='JavaScript' src="prototype-1.6.0.2.js"></script>


It should look like:
Code:

<%@ Master Language="VB" CodeFile="Site.master.vb" Inherits="Site" %>

<!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">
<title>Untitled Page</title>
<link rel="Stylesheet" href="suggestions.css" type="text/css" />
<script type='text/javascript' language='JavaScript' src="prototype-1.6.0.2.js"></script>

<asp:ContentPlaceHolder id="head" runat="server">
</asp:ContentPlaceHolder>
<style type="text/css">
.style2
{
width: 506px;
}
.style4
{
width: 151px;
}
</style>
</head>


or as you have a content placeholder in header section you can add this lines from content page I suppose.

Thanks
Guest
Posted: Thursday, May 29, 2008 6:42:48 AM
Rank: Guest
Groups: Guest

Joined: 11/18/2007
Posts: 15
yes, indeed it was the problem
Thank you very much for your quick response and for your excellent work.
Users browsing this topic
Guest


Forum Jump
You can post new topics in this forum.
You can reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Main Forum RSS : RSS

Powered by Yet Another Forum.net version 1.9.1.8 (NET v2.0) - 3/29/2008
Copyright © 2003-2008 Yet Another Forum.net. All rights reserved.