Hi! I am a developer. I am using jquery to create a modal dialog.
I am using the following code snippets. Please tell what is going wrong:

<link rel="stylesheet" type="text/css" href="jquery-ui-1.8.7.custom.css" />
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="jquery.min.1.4.js"></script>
<script type="text/javascript" src="jquery-ui.min.1.8.js"></script>
<script type="text/javascript" src="jquery.min.1.3.2.js"></script>
<script type="text/javascript" src="jquery-ui.min.1.7.2.js"></script>
$(document).ready(function () {
        height: 'auto',
        width: 'auto',
        modal: true,
        autoOpen: false
    $("#addaccountlink").click(function (e) {

Please help!

7 Years
Discussion Span
Last Post by soft_coder

You have 3 jquery scripts and 2 jquery-ui scripts included. You just need one of each, preferably the latest version.

You should show your HTML too.


Perhaps I should show my full implementation. The following code is an aspx code with the js files in the Scripts:

<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Default.aspx.vb" Inherits="ModalDialogDemoNew._Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<script type="text/javascript" src="Scripts/jquery.js"></script>
<link href="Scripts/jquery-ui-1.8.7.custom.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="Scripts/jquery/1.4/jquery.min.js"></script>
<script type="text/javascript" src="Scripts/jquery-ui/1.8/jquery-ui.min.js"></script>
<script type="text/javascript" src="Scripts/jquery/1.3.2/jquery.min.js"></script>
<script type="text/javascript" src="Scripts/jquery-ui/1.7.2/jquery-ui.min.js"></script>
<script type="text/javascript" src="Scripts/addaccount.js"></script>
    <form id="form1" runat="server">
    <a href="#" id="addaccountlink">Add an account</a>
    <a href="Scripts/testNew.html">Redirect</a>
    <div id="addaccount" style="display: none; padding: 5px"></div>

Please suggest something!


The code works fine when the js files are referenced from internet.
But when I download them in pc and reference locally they don't work properly.
This is the scenario in my case.


Download a theme and put the images folder where the css is.

Does it work if you use the remote scripts, as on the jsbin link ?

Edited by pritaeas: n/a


I did that also it is still not working.
Actually I have to open a web page in side a div tag.
When the dialog is opening automatically, it is working perfectly but when I am opening by using


it is malfunctioning. What is the probable reason?


You are right. I downloaded a new theme and implemented the modal dialog and it is working perfectly.
Can you do me one more favour.
How can I enable the help or "?" icon in the modal dialog.
Thanks in advance.
Have a nice day.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.