Scrollbars in modal prevent user action in Chrome - html

I have a modal dialog that loads an apsx page within it. I've got a table in my aspx page that list some customers. It's working well in Internet Explorer, however when I open it up using Google Chrome, it gives me two scrolls bar and I'm unable to select the item, note that it only happen with the first item, if I have more than two customers a can select by the second one on!
I really have no idea what it can be.
Running in IE.
Running in Google Chrome
CODE:
1. Opening Dialog
var dialogwindow = new Mscrm.CrmDialog(Mscrm.CrmUri.create(webresourceurl), window, 598, 298);
dialogwindow.setCallbackReference(function (result) { alert(result) });
dialogwindow.show();
2. HTML Page to load aspx page
<form id="myForm" runat="server">
<iframe width="590" height="280" id="IFrameCheckList" frameborder="0" scrolling="yes"></iframe>
</form>
3. Aspx page
.record_table {
border-collapse: collapse;
}
.highlight {
background-color: rgb(177, 214, 240);
}
<form id="form1" runat="server">
<div>
<asp:Table ID="MainTable" class="record_table" runat="server">
<asp:TableRow BackColor="White">
<asp:TableCell CssClass="Titulo" Width="10px">
<label></label>
</asp:TableCell>
<asp:TableCell CssClass="Titulo" Width="250px">
<label>Proponente</label>
</asp:TableCell>
<asp:TableCell CssClass="Titulo" Width="130px">
<label>Tipo de Participação</label>
</asp:TableCell>
<asp:TableCell CssClass="Titulo" Width="90px">
<label> Participação</label>
</asp:TableCell>
</asp:TableRow>
</asp:Table>
</div>
<asp:Button CssClass="ConfirmButton" Style="padding: 0 0 0 0; border-radius:5px" ID="btnConfirmar" Text="Confirmar" runat="server" OnClientClick="btnConfirmarOnClick(); return false;" />
</form>

Related

Why my link is not working on Asp.Net Master Page?

I have a given two link on side navbar. but It's not working why?
Here is my code:
Admin.Master
<div class="w3-sidebar w3-bar-block w3-collapse w3-card-2 w3-animate-left" style="width: 200px; padding-top: 50px;" id="mySidebar">
<button type="button" class="w3-bar-item w3-button w3-large w3-hide-large" onclick="w3_close()">Close ×</button>
Create User
Security
<%--Link 3--%>
</div>
<div class="w3-main" style="margin-left: 200px; padding-top: 50px;">
<div class="w3-container">
<asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
</asp:ContentPlaceHolder>
</div>
</div>
UPDATE
<asp:LinkButton ID="linkCreateUser" runat="server" PostBackUrl="https://www.google.co.in/?gws_rd=ssl" CssClass="w3-bar-item w3-button">Create User</asp:LinkButton>
<asp:HyperLink ID="HyperLink1" runat="server" Text="Create User hyper" NavigateUrl="CreateUser.aspx" CssClass="w3-bar-item w3-button" ></asp:HyperLink>
Security
It appears on chrome browser for above code
Chrome browser
<a id="HyperLink1" class="w3-bar-item w3-button" href="CreateUser.aspx">Create User hyper</a>
<a id="linkCreateUser" class="w3-bar-item w3-button active" href='javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions("ctl00$linkCreateUser", "", false, "", "https://www.google.co.in/?gws_rd=ssl", false, true))'>Create User</a>
Security
Jquery Click event
$('.w3-sidebar a').click(function (e) {
e.preventDefault(); // it's not working because of this. But how can I set class = active for clicking link?
$('.w3-sidebar a').removeClass('active');
$(this).addClass('active');
})
Try using asp.net control either it works or no like:
<asp:LinkButton ID="linkCreateUser" runat="server" PostBackUrl="CreateUser.aspx" CssClass="w3-bar-item w3-button">Create User</asp:LinkButton>
<asp:HyperLink ID="linkCreateUser" runat="server" Text="Create User" NavigateUrl="CreateUser.aspx" CssClass="w3-bar-item w3-button" ></asp:HyperLink>
if still not working please share final html of anchor tag by inspect element which is showing on web page?
if your pages are in root of the project just put "/" before your internal link:
Create User
Security

How to align the container to the right?

My current code renders like Picture 1, how can I get the output to render like Picture 2?
I tried to search the web but most of the results I have found show how to do this in css
Pic one,
Pic two,
<ext:Container id="Container1" runat="server" layout="HBoxLayout" width="2000" marginSpec="0 0 10 0" >
<Items>
<ext:Panel ID="panel_cms004_view" Title="Document Control Profile" runat="server" AutoScroll="true" Region="East" Height="180" Width="700" Split="true">
<Loader ID="cms004_view" runat="server" Url="../CMS/cms004_view.aspx" Mode="Frame" AutoLoad="true" >
<LoadMask ShowMask="true"></LoadMask>
</Loader>
</ext:Panel>
<ext:Panel ID="panel_cms004d_audit" Title="Document Control Number - Audit" runat="server" AutoScroll="true" Region="East" Height="180" Width="428" Split="true">
<Loader ID="cms004d_audit" runat="server" Url="../CMS/cms004d_audit.aspx" Mode="Frame" AutoLoad="true" >
<LoadMask ShowMask="true"></LoadMask>
</Loader>
</ext:Panel>
</Items>
</ext:Container>
<ext:Container id="Container8" runat="server" layout="HBoxLayout" width="2000" marginSpec="0 0 0 0">
<Items>
<ext:Panel ID="docControlNum" Title="Document Control Number" runat="server" AutoScroll="true" Region="East" Height="265" Width="700" Split="true">
<Loader ID="cms004d_view" runat="server" Url="../CMS/cms004d_view.aspx" Mode="Frame" AutoLoad="true" >
<LoadMask ShowMask="true"></LoadMask>
</Loader>
</ext:Panel>
</Items>
</ext:Container>
<ext:Container id="Container1" runat="server" Height="700" marginSpec="0 0 0 0" Layout="VBoxLayout" >
<Items>
<ext:Panel ID="panel_cms004_view" Title="Document Control Profile" runat="server" AutoScroll="true" Height="180" Width="700" Layout="VBoxLayout">
<Loader ID="cms004_view" runat="server" Url="../CMS/cms004_view.aspx" Mode="Frame" AutoLoad="true" Height="200">
<LoadMask ShowMask="true"></LoadMask>
</Loader>
</ext:Panel>
<ext:Panel ID="docControlNum" Title="Document Control Number" runat="server" AutoScroll="true" Height="248" Width="700" Layout="VBoxLayout">
<Loader ID="cms004d_view" runat="server" Url="../CMS/cms004d_view.aspx" Mode="Frame" AutoLoad="true" Height="700">
<LoadMask ShowMask="true"></LoadMask>
</Loader>
</ext:Panel>
</Items>
</ext:Container>
<ext:Container id="Container8" runat="server" marginSpec="0 0 0 700" Layout="VBoxLayout" Height="700" Width="430">
<Items>
<ext:Panel ID="panel_cms004d_audit" Title="Document Control Number - Audit" runat="server" AutoScroll="true" Height="425" Width="433" Layout="VBoxLayout">
<Loader ID="cms004d_audit" runat="server" Url="../CMS/cms004d_audit.aspx" Mode="Frame" AutoLoad="true" Height="700" Width="430" >
<LoadMask ShowMask="true"></LoadMask>
</Loader>
</ext:Panel>
</Items>
</ext:Container>
Did some editing. Found out that need to add in the layout for the panel and the container.
whats the problem with CSS?
do something like this :
.right {
position: absolute;
right: 0px;
}
and then :
<div class="right">
// your html
</div>
instead of creating a .css I would recommend you to use preexisting css like twitter bootstrap css or even a frontend framework which they have function and features that works very well.
With Bootstrap it comes a Grid System where you can place your elements like you want.

Ajax Accordion Style Issue

I am having a few style issues with an accordion, when the screen is rendered the accordion is displayed properly, however whenever the expanded pane is changed the bottom of the last accordion pane is hidden.
The accordion is stored in a content placeholder within a master page, the content placeholder on the master page is within a div with no height specified.
EDIT - It seems the accordion is calculating its height incorrectly, so when using the developer toolbar in IE you can see the accordion height automatically updates whenever the tab is changed, incorrectly.
When the screen is rendered -
After clicking on a different pane -
The HTML is -
Page with the issue -
<asp:Content runat="server" ContentPlaceHolderID="ContentPlaceHolderMain">
<h2 style="width: 836px">Manage Fields</h2>
<br />
<cc1:Accordion ID="uxAccordion" runat="server" SelectedIndex="2">
<Panes>
<cc1:AccordionPane ID="pane1" runat="server" ContentCssClass="accordionContent" HeaderCssClass="accordionHead" BorderStyle="Solid" BorderWidth="1" BorderColor="Black">
<Header>
<h3>> Custom Categories</h3>
</Header>
<Content>
<div class="accordionInnerContainer">
<uc1:CustomCategories ID="CustomCategories1" runat="server" />
</div>
</Content>
</cc1:AccordionPane>
<cc1:AccordionPane ID="pane2" runat="server" ContentCssClass="accordionContent" HeaderCssClass="accordionHead" BorderStyle="Solid" BorderWidth="1" BorderColor="Black">
<Header>
<h3>> Custom Fields</h3>
</Header>
<Content>
<div class="accordionInnerContainer">
<uc2:CustomFields ID="CustomFields1" runat="server" />
</div>
</Content>
</cc1:AccordionPane>
<cc1:AccordionPane ID="pane3" runat="server" ContentCssClass="accordionContent" HeaderCssClass="accordionHead" BorderStyle="Solid" BorderWidth="1" BorderColor="Black">
<Header>
<h3>> Custom Help</h3>
</Header>
<Content>
<div class="accordionInnerContainer">
<uc3:CustomHelp ID="CustomHelp2" runat="server" />
</div>
</Content>
</cc1:AccordionPane>
</Panes>
</cc1:Accordion>
</asp:Content>
Master Page -
<body class="onecol">
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
<div id="bodyContainer">
<div id="headerContainer">
<uc2:UserPanel id="UserPanel1" runat="server"></uc2:UserPanel>
<uc3:PrimaryNav ID="PrimaryNav1" runat="server" />
</div>
<div id="mainContainer">
<asp:ContentPlaceHolder ID="ContentPlaceHolderMain" runat="server">
</asp:ContentPlaceHolder>
</div>
<div id="subNav">
<p> </p>
</div>
<div id="sideContainer">
</div>
<div id="footer">
<uc1:footer ID="Footer1" runat="server" />
</div>
</div>
</form>
</body>
Css -
body{font: 72% arial,sans-serif;text-align:center}
div#bodyContainer{text-align:left;width:900px;margin:0 auto;background-color:#FFF;}
div#headerContainer{background:url(../images/headerbackgrad.jpg) repeat-x;height:116px;}
div#mainContainer{float:left;width:100%}
div#contentContainer{margin: 0 470px 0 0}
div#subNav{float:left;width:150px;margin-left:-700px}
div#subNav{display:none;}
div#sideContainer{float:left;width:400px;margin-left:-420px}
div#footer{clear:left;width:100%}
div#mainContainer{min-height:400px;_height:400px;}
.accordionHead
{
padding: 1px;
font-weight:bold;
background-color:#ceeffe;
border-bottom: 1px solid black;
}
.accordionContent
{
}
.accordionInnerContainer
{
width: 850px;
padding-left: 5px;
}
Thanks in advance for any help.
Found a solution, setting the following on the accordion sorts the problem -
AutoSize="Limit"

Setting textbox's clickable background

I need to set textbox background image that is clickable so i used div(position:absolute) tag above textbox in which i included image, but the problem is that image is located above text, i tried to set z-index of image to -1 but then image got behind textarea
#smiley {
position:absolute;
z-index:1;
}
<telerik:RadPane ID="Radpane5" runat="server" Height="100%" Scrolling="None" Width="100%">
<div id="smiley">
<img src="https://fbcdn-sphotos-e-a.akamaihd.net/hphotos-ak-prn1/1013130_10200305067254687_188481208_n.jpg" alt="Smiley face" height="40" width="40">
</div>
<telerik:RadTextBox ID="chatBox" runat="server" TextMode="MultiLine" Resize="Both" Rows="100" Width="100%"
EmptyMessage="type here" AutoPostBack="true" BorderStyle="None" Style="z-index:5; border: none; margin: 0 auto; outline: none">
</telerik:RadTextBox>
Try this
HTML
<input type="text" id="smiley" />
<input type="text" id="smiley1" />
CSS
#smiley:focus{background: red;}
#smiley1:focus{background: url("http://surrey-arg.org.uk/SARG/08000-TheAnimals/Images/Prey/Small_fish.jpg");}
LINK

Programmatically removing CSS class files - jQuery

I am using the jQueryUI library to take advantage of tabs on my page and the CSS styles of the tabs are being applied to the content within the div tags.
When I use the Chrome Developer tools I have narrowed it down to the following CSS classes in in the jquery-ui.css class:
.ui-widget {
/*font-family: Verdana,Arial,sans-serif;*/
font-size: 1.1em/*{fsDefault}*/;
}
.ui-widget .ui-widget {
font-size: 1em;
}
How do I remove these CSS styles from my div content containers. I tried the following jQuery snippet and it did not work.
$("#nameSearch").removeClass("ui-widget");
Here is a snippet of my HTML page:
<div id="searchTabs">
<ul>
<li>Name</li>
<li>Case Number</li>
</ul>
<div id="nameSearch">
<b>First Name:</b> <asp:TextBox ID="txtFirstNameSearch" runat="server" CssClass="txt" /><br />
<b>Last Name:</b> <asp:TextBox ID="txtLastNameSearch" runat="server" CssClass="txt" /><br />
<b>Date of Birth:</b> <asp:TextBox ID="txtDateOfBirth" runat="server" CssClass="txt" /><br />
</div>
<div id="caseNumberSearch">
<b>Case Number:</b> <asp:TextBox ID="txtCaseNumberSearch" runat="server" CssClass="txt" /><br />
</div>
</div>
If you know the position of those CSS rules, then:
IE
document.styleSheets[0].removeRule(i);
//i = position of the rule.
Other Browsers
document.styleSheets[0].deleteRule(i);