Loading a script within a Master page does not work at all. I get the following error from IE7 when loading the page:
error: 'ResetForm' is undefined
Code: 0
URL: http://localhost:.........
In the master page is the following code
<telerik:RadScriptManager ID="RadScriptManager1" Runat="server">
<Scripts>
<asp:ScriptReference Path="~/Scripts/common.js" />
</Scripts>
</telerik:RadScriptManager>
The script file (common.js) is:function ResetForm(sender, eventArgs) {
document.forms[0].reset();
return false;
}
I am thinking that the masterpage is loaded after the content. so, in that case why is there a script manager
in the master page?? Or should I be loading my script in the content page?? I haven't seen an answer to this
seemingly common problem anywhere.
thank you!
<
P
style
=
"TEXT-ALIGN: center; MARGIN: 0cm 0cm 10pt"
class
=
MsoNormal
align
=
center
><
SPAN
style
=
"COLOR: #00b050"
><
FONT
face
=
Calibri
>This is an extremely sophisticated newsletter<?
xml:namespace
prefix
=
o
ns
=
"urn:schemas-microsoft-com:office:office"
/><
o:p
></
o:p
></
FONT
></
SPAN
></
P
>
<
P
style
=
"TEXT-ALIGN: center; MARGIN: 0cm 0cm 10pt"
class
=
MsoNormal
align
=
center
><
SPAN
style
=
"COLOR: #00b050"
><
FONT
face
=
Calibri
>DOCUMENT<
o:p
></
o:p
></
FONT
></
SPAN
></
P
>
<
P
style
=
"TEXT-ALIGN: center; MARGIN: 0cm 0cm 10pt"
class
=
MsoNormal
align
=
center
><
o:p
><
FONT
face
=
Calibri
> </
FONT
></
o:p
></
P
>
<
telerik:RadTabStrip
ID
=
"RadTabStrip1"
runat
=
"server"
Skin
=
"Telerik"
MultiPageID
=
"RadMultiPage1"
>
<
Tabs
>
<
telerik:RadTab
runat
=
"server"
Text
=
"Order Setup"
Value
=
"OrderSetup"
PageViewID
=
"rpvOrderSetup"
Selected
=
"true"
/>
<
telerik:RadTab
runat
=
"server"
Text
=
"Patient Information"
Value
=
"PatientInformation"
PageViewID
=
"rpvPatientInformation"
Enabled
=
"false"
/>
<
telerik:RadTab
runat
=
"server"
Text
=
"Order Information"
Value
=
"OrderInformation"
PageViewID
=
"rpvOrderInformation"
Enabled
=
"false"
/>
</
Tabs
>
</
telerik:RadTabStrip
>
<
telerik:RadMultiPage
ID
=
"RadMultiPage1"
runat
=
"server"
>
<
telerik:RadPageView
ID
=
"rpvOrderSetup"
runat
=
"server"
Selected
=
"true"
>
<
hr
style
=
"margin: 0px; padding: 0px; width: 100%;"
/>
<
local:OrderSetup
runat
=
"server"
ID
=
"OrderSetup"
/>
</
telerik:RadPageView
>
<
telerik:RadPageView
ID
=
"rpvPatientInformation"
runat
=
"server"
>
<
hr
style
=
"margin: 0px; padding: 0px; width: 100%;"
/>
<
local:PatientInformation
runat
=
"server"
ID
=
"PatientInformation"
/>
</
telerik:RadPageView
>
<
telerik:RadPageView
ID
=
"rpvOrderInformation"
runat
=
"server"
>
<
hr
style
=
"margin: 0px; padding: 0px; width: 100%;"
/>
<
local:OrderInformation
runat
=
"server"
ID
=
"OrderInformation"
/>
</
telerik:RadPageView
>
</
telerik:RadMultiPage
>
void
OrderSetup_Click(EventArgs e)
{
RadTabStrip1.FindTabByValue(
"OrderSetup"
).ImageUrl =
"~/images/Ok.png"
;
IList<RadTab> tabs = RadTabStrip1.GetAllTabs();
foreach
(RadTab tab
in
tabs) tab.Enabled =
true
;
RadTabStrip1.FindTabByValue(
"PatientInformation"
).Selected =
true
;
RadMultiPage1.FindPageViewByID(
"rpvPatientInformation"
).Selected =
true
;
// RadMultiPage1.SelectedIndex = RadMultiPage1.FindPageViewByID("rpvPatientInformation").Index;
}
I need to show upcoming appointments from today to 7 days ahead. This works fine when the appointment is not recurring.
This works fine for non recurring appointments:
For Each a In RadScheduler1.Appointments.GetAppointmentsInRange("2011-03-21", "2011-03-28")
...add appointment data to table.
Next
For Each a In RadScheduler1.Appointments
...add appointment data to table.
Next
rcbSearchOffices.trackChanges();
rcbSearchOffices.set_value(defaultOfficeId.value);
var
rcbSearchOffices.set_selectedItem(item);
rcbSearchOffices.updateClientState();
rcbSearchOffices.commitChanges();
However, when the combo box is displayed, the item that I am trying to select is not visibly selected unless I click on the combo box. If I click on the combo box, I am automatically taken to that item. What I want to happen is that the item is automatically displayed as the selected item in the combo box.
How do I do this?
Thanks!
Protected Sub LoadDock(ByVal sender As Object, ByVal e As CommandEventArgs)
Dim id As String = e.CommandName
lblErr.Text = id.ToString
Dim ds As New DataSet
ds = odata.ReturnDS(
"sp_GadgetsByGadgetName", "@GadgetName", id.ToString)
If LoadedGadgets(ReturnUserName() & "_" & ds.Tables("Generic").Rows(0).Item("GN")) = "False" Then
'Create Dock
Dim dock As New RadDock()
Dim widget As New UserControl
widget = LoadControl(ds.Tables(
"Generic").Rows(0).Item("GadgetContent"))
Dim X As Integer = (ResolutionX / 2) - (CInt(ds.Tables("Generic").Rows(0).Item("GadgetWidth")) / 2)
Dim Y As Integer = (ResolutionY / 2) - (CInt(ds.Tables("Generic").Rows(0).Item("GadgetHeight")) / 2)
With dock
.ID = ReturnUserName() &
"_" & ds.Tables("Generic").Rows(0).Item("GN")
.Title = ds.Tables(
"Generic").Rows(0).Item("GN")
.Skin =
"WebBlue"
.UniqueName = Guid.NewGuid().ToString()
.Width =
CInt(ds.Tables("Generic").Rows(0).Item("GadgetWidth"))
.Height =
CInt(ds.Tables("Generic").Rows(0).Item("GadgetHeight"))
.Left = X
.Top = Y
.Resizable =
False
.Pinned =
False
.OnClientDragEnd =
"Moved"
.OnClientDragStart =
"OnClientDragStart"
.DockHandle = DockHandle.TitleBar
.DockMode = DockMode.Floating
.BorderStyle = BorderStyle.None
.Attributes.Add(
"style", "filter:progid:DXImageTransform.Microsoft.Shadow(direction=145, color=#4b4b4b, strength=5) progid:DXImageTransform.Microsoft.Alpha(opacity=95);")
.OnClientCommand =
"OnClientCommand"
.EnableViewState =
False
End With
RadDockLayout1.Controls.Add(dock)
dock.ContentContainer.Controls.Add(widget)
PlaceGadgetInternal(ds.Tables(
"Generic").Rows(0).Item("GN"), X.ToString, Y.ToString, ReturnUserName)
End If
ds.Clear()
ds.Dispose()
ds =
Nothing
End Sub