Click here to Skip to main content
15,881,248 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
i have a accordion.aspx page which i need to open in jquery dialog using javascript function at the same time making the calling page inaccessible as long as dialog is open.

for try outs my code is as follows :

HTML
<head>
    <title></title>

JavaScript
<script type="text/javascript" src="Scripts/jquery-1.7.1.js"></script>
        <script type="text/javascript" src="Scripts/jquery-ui-1.8.20.js"></script>
        <script type="text/javascript">
            function Load()
            {
                $('#someDiv').load("WebForm1.aspx").dialog('open').dialog(
                    {
                        autoOpen: true,
                        position: 'center',
                        draggable: false,
                        width: 300,
                        height: 40,
                        resizable: false,
                        modal: true,
                    });
            }
        </script>

HTML
</head>
    <body  önload="Load();">
        <div id="someDiv"></div>
        <button id="btn1">Click me</button>
    </body>
    </html>


js function load will be same.
but the problem is I can still access the calling page i.e I can still click on btn1 I need to avoid this. Also there is an link "close" button which automatically is appearing and closes the dialog. I need to avoid this too.

Can anyone please help?

Thanks in advance.
Posted
Comments
kishore sharma 1-Jul-13 1:26am    
which dialog you are using ,i think its Ui dialog there is thick box dialog check with that

1 solution

There is no such thing as "external aspx page". Generally, ASPX pages do not exist on client size, they only exist in code on the server side and are transformed to some resources (HTTP or anything else) in response to HTTP request. The question is simply incorrect; you need first learn how Web, HTTP and ASP.NET work.

—SA
 
Share this answer
 
Comments
pratik_g2006 1-Jul-13 1:45am    
@SA please don't suggest any solution if you don't have not understand question. please put comments to clear whatever doubts you have regarding question.
In my case, i need to open a whole page in jquery dialog the way it is done using showmodalpopup or ajax modalpopupextender.
Sergey Alexandrovich Kryukov 1-Jul-13 2:24am    
I agree with you idea on understanding a question, but you shouldn't blame me along. You need to pose question more accurately. The mention of "ASPX page" is confusing, as there is no such notion. There is no a notion of "calling page", even though I can understand what you possibly mean by that. From the JavaScript standpoint, there is no difference how a page was created on the server side, so "aspx" is irrelevant at best.

Anyway, thank you for the clarification...

Now, are you saying that the dialog rendered the HTML in question, but does not behave like modal?

—SA
Pratik Gaikwad 1-Jul-13 15:45pm    
yes...
Sergey Alexandrovich Kryukov 1-Jul-13 15:58pm    
Well, it sounds strange. I tested dialog plug-ins they all worked correctly. Anyway, if you still have a problem with that, will you post a link to the Scripts/jquery-ui-1.8.20.js plug-in page?
—SA
Pratik Gaikwad 3-Jul-13 16:40pm    
http://blog.jqueryui.com/2012/04/jquery-ui-1-8-20/

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