Results 1 to 3 of 3

Thread: calendar on button image NEVER comes up

  1. #1

    Thread Starter
    Banned jhermiz's Avatar
    Join Date
    Jun 2002
    Location
    Antarctica
    Posts
    2,492

    calendar on button image NEVER comes up

    I cant understand this user control I keep working on.
    All I'm doing is creating a user control and I want the button to have a calendar gif on it. I tried everything and nothing seems to work to put this image on a button.

    I do not just want to use an image, I really need this to be a button with an image on it.

    I have zipped it up can someone take a look? Just add these files to a project and drag and drop the user control. If anyone has any ideas please help me this is urgent .

    Willing to pay 1 whole dollar

    http://www.jakrauseinc.com/jhermiz/calendar.zip

  2. #2
    Frenzied Member dj4uk's Avatar
    Join Date
    Aug 2002
    Location
    Birmingham, UK Lobotomies: 3
    Posts
    1,131
    Why not use the imagebutton web control? or have I misunderstood what you want to do?

    DJ

  3. #3

    Thread Starter
    Banned jhermiz's Avatar
    Join Date
    Jun 2002
    Location
    Antarctica
    Posts
    2,492
    Originally posted by dj4uk
    Why not use the imagebutton web control? or have I misunderstood what you want to do?

    DJ
    several reasons...

    1) an image button doesnt really have a button beneath it...
    I need a BUTTON behind that image. An Image Button is actually just an image you click on.

    2) makes a trip to the server (i know this can be disabled)

    I can see the image in the code / design view..but when I run the project nothing:

    Code:
    <%@ Control Language="vb" AutoEventWireup="false" Codebehind="CalendarControl.ascx.vb" Inherits="ims.jakah.com.CalendarControl" TargetSchema="http://schemas.microsoft.com/intellisense/ie5" %>
    <asp:textbox id="txtIssueClosed" Width="96px" runat="server"></asp:textbox>
    <INPUT style="BACKGROUND-POSITION-X: center; BACKGROUND-IMAGE: url(../images/calendar.gif); WIDTH: 24px; BACKGROUND-REPEAT: no-repeat; FONT-FAMILY: Arial, SansSerif, Verdana; HEIGHT: 24px"
    	onclick="OnClick()" value="..." type="button">
    <br>
    <div id="divCalendar" style="DISPLAY: none; POSITION: absolute"><asp:calendar id="Calendar1" Width="200px" runat="server" CellPadding="4" BorderStyle="Outset"
    		BorderColor="#C7D6E4" Font-Names="Arial" Font-Size="8pt" Height="180px" ForeColor="Black" BackColor="White" BorderWidth="2px">
    		<TodayDayStyle ForeColor="Black" BackColor="#CCCCCC"></TodayDayStyle>
    		<SelectorStyle BackColor="#CCCCCC"></SelectorStyle>
    		<NextPrevStyle VerticalAlign="Bottom"></NextPrevStyle>
    		<DayHeaderStyle Font-Size="7pt" Font-Bold="True" BackColor="#CCCCCC"></DayHeaderStyle>
    		<SelectedDayStyle Font-Bold="True" ForeColor="White" BackColor="#666666"></SelectedDayStyle>
    		<TitleStyle Font-Bold="True" BorderColor="Black" BackColor="#999999"></TitleStyle>
    		<WeekendDayStyle BackColor="#FFFFCC"></WeekendDayStyle>
    		<OtherMonthDayStyle ForeColor="Gray"></OtherMonthDayStyle>
    	</asp:calendar></div>
    <script>
    function OnClick()
    {
      if( divCalendar.style.display == "none")
        divCalendar.style.display = "";
      else
        divCalendar.style.display = "none";
    }
    </script>
    Use my image and change the path to fit your needs...
    you'll see the image but it still doesnt work...

    Jon

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width