Calendar!

A

Adam Knight

Hi all,

I have a page containing a aspx calendar.
This page appears in a pop up window via a javascript open window command.

What i want it to do next (of course) is respond to a users selection by
passing back the value selected
to the calling window.

I don't see why a post back would be necessary, so i am thinking i need to
attach a custom javascript function
to the selection event.

In classic asp i would use this when a user selected a calendar item:
javascript:self.opener.set_date('myFormElement','mydateval');
window.close();

Any ideas on what i need to do or how i can acheive this with .net?

Any suggestions appreciated!

Cheers,
Adam
 
A

Adam Knight

Hi all,

i tried the following but with no success.

<%@ Page Language="VB" %>
<script runat="server">
Sub calPopUp_DayRender (ByVal Sender As Object, ByVal e As
DayRenderEventArgs)

e.Cell.Attributes("onClick") = "javascript:self.opener.set_date('" &
Request.QueryString.Get("jsId") & "','" & e.Day.Date & "'); window.close();"

End Sub
</script>
<html>
<head>
<title>BMA Intranet</title>
<link media="all" href="../../../resources/css/general.css"
type="text/css" rel="stylesheet" />
</head>
<body leftmargin="0" topmargin="0" marginheight="0" marginwidth="0">
<form runat="server">
<asp:Calendar id="calPopUp" onDayRender="calPopUp_DayRender"
runat="server" CssClass="cal" CellPadding="3" Width="100%"
Height="100%"></asp:Calendar>
</form>
</body>
</html>

Any thoughts?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,077
Latest member
SangMoor21

Latest Threads

Top