Showing posts with label functionality. Show all posts
Showing posts with label functionality. Show all posts

Monday, March 26, 2012

Prototype and Rico library port of Rounded Corner functionality

Good morning!

As an exercise, I recently ported the rounded corner feature provided by theRico javascript libraries based on the open sourceprototype libraries. I ported that function as an Extender in Atlas, and I it turned out pretty well. I was wondering if anyone here would be interested in checking it out. If so, I will post it on myweb site for interested parties to download.

Check out the Rico link above and view the "Rounded Corner" samples to see the functionality I am talking about.

Answer here to let me know if there is interest, so I know to do it.

I would be very interested in seeing that - please post to your site if you don't mind.

-Josh


yes, please share - sounds good!
Very cool!
Okay, everyone! I will post a link to an example later tonight!

Okay! I was a little late, because I had to fix a bug in the Rico library related to padding! But here it is atmy web site!

Feel free to check it out and tell me what you think! It implements all the semantics of the Rico rounded corner library exactly.


Fantastic work!

I will be playing around with this over the weekend.


Awesome... this is great to see... and a great example of what behaviors are all about.

Wednesday, March 21, 2012

Questions - ModalPopup sample code

Hello, I'm trying to replicate the functionality presented here specific to the ModalPopup control:

http://ajax.asp.net/ajaxtoolkit/ModalPopup/ModalPopup.aspx

I've created a C# Ajax-enabled website project, have added the ScriptManager, ModalPopup, Panel and various Button controls, but although I've bound the ModalPopup to the button I want to have it use to activate my modal Panel, and though the project builds successfully, it doesn't react in the same way as the sample.

Here's the code from my skin file:

1<%@dotnet.itags.org. Page Language="C#" trace="true" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
23<%@dotnet.itags.org. Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>45<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
6<html xmlns="http://www.w3.org/1999/xhtml">
7<head>
8 <title>Untitled Page</title>
9</head>
10<body>
1112 <form runat="server">
1314 <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="true"></asp:ScriptManager>
15
16 <asp:Panel ID="Panel1" runat="server" Height="50px" Width="125px" Visible="False" >
17
18 <asp:Button ID="OkButton" runat="server" Text="OK"></asp:Button>
19 <asp:Button ID="CancelButton" runat="server" Text="Cancel"></asp:Button>
2021 </asp:Panel>
22
23 <ajaxToolkit:ModalPopupExtender ID="ModalPopupExtender1" runat="server"24 TargetControlID="btnAddServer"25 PopupControlID="Panel1"26 BackgroundCssClass="modalBackground"27 DropShadow="true"28 OkControlID="OkButton"29 OnOkScript="onOk()"30 CancelControlID="CancelButton" />
31
32 <br />
33 <center>
3435
36 <asp:Panel ID="PanelMain" runat="server" Height="25px" Width="125px" HorizontalAlign="Center">
37
38 <asp:Button ID="btnAddServer" runat="server" Text="Add" Width="33px" /></td>
39
40 </asp:Panel>
41
42 </form>
43
44</body>
45</html>
46

At this point, I'm guessing that the missing piece of the puzzle lies with the CSS stuff and/or the master page, as that I haven't brought over from the sample project utilizing ModalPopup. Can someone please help me pinpoint what I'm missing that is preventing this from working?

Thanks in advance for any help. Smile

I found a fix which appears to work, but I'm still too much of a newbie to understand why. If someone could please explain I'd appreciate it.

After adding this to the "httpHandlers" section of my site project's Web.config file, my ModalPopup works:

<addverb="GET"path="ScriptResource.axd"type="Microsoft.Web.Handlers.ScriptResourceHandler"validate="false"/>

Thanks to this blogger: http://www.thecodinghumanist.com. The error I was encountering in the Javascript console (Firefox) was "Sys not defined", and the above appears to have addressed that, enabling the popup to work... somehow. Smile