Click here to Skip to main content
16,004,727 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I'm using jquery dialog in asp .net page I've managed to make it all in arabic right to left direction but still on point I wish that you help me with

the close button in the end of dialog shows in the right side how I can move it to the left side of the dialog
Posted

thank you a lot

and for future reference if any one needs it

this is an aspx page code

<%@ Page Title="" Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false" CodeFile="Default4.aspx.vb" Inherits="Default4" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <script src="Scripts/jquery-2.1.4.min.js"></script>

    <script src="Scripts/jquery-ui-1.11.4.js"></script>

    <link href="Content/themes/base/all.css" rel="stylesheet" />

    <script type="text/javascript">
        function ShowPopup(message, titlea) {
            $(function () {
                $("#dialog").html(message);
                $("#dialog").dialog({
                    title: titlea,
                    modal: true
                     ,
                    buttons: {
                        "إغلاق": function () { $(this).dialog('close'); }
                    }
                });
            });
        };


    </script>

    <style type="text/css">
        .ui-dialog .ui-dialog-title {
            direction: rtl;
            float: right;
            margin: 0.1em 0 0.2em 16px;
        }

        .ui-dialog .ui-dialog-titlebar-close {
            left: 0.3em;
        }

        .ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset {
            float: none;
        }

        .ui-dialog .ui-dialog-buttonpane {
            text-align:left; /* left/center/right */
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <div id="dialog" style="display: none; direction: rtl;"></div>

    <asp:Button ID="btnShowPopup" runat="server" Text="Show Popup" OnClick="btnShowPopup_Click" />


</asp:Content>




and code behind that shows the dialog

Protected Sub btnShowPopup_Click(sender As Object, e As System.EventArgs) Handles btnShowPopup.Click
    Dim message As String = "هذه تجربة لرسالة بالعربية"
    Dim title As String = "عنوان الرسالة"
    ClientScript.RegisterStartupScript(Me.GetType(), "Popup", "ShowPopup('" + message + "', '" + title + "');", True)
End Sub
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900