That is cool but it is not what I'm looking for....
I have a <div class="move-right" id="OnlineUsers"> </div> in the _Layout.cshtml file that is poplulated by an Ajax.ActionLink(...) in the Index View. This calls out to the HomeController method: OnlineUsers which returns a PartialView.
It is this OnlineUsers <div> that I need to close or hide, unless that sites dialog box can be used in place of the <div>. If this is the case, please let me know.
And I just noticed that there are scripts in that demo that I don't have and have zero idea of where to get.
Specifically, the jquery.bigframe-2.1.1.js is the one I don't have. Where would I obtain this from???
But
in Fiddler 2 that file keeps coming up with a 404 HTML Error Code.
I've
check the permissions on the Scripts folder and on that specific file and they are Everyone has View & Execute privileges on the directory and file. I've tripple checked the file name as well.
eric2820
Contributor
2777 Points
1161 Posts
Looking for JavaScript code to close an AJAX display
Dec 30, 2012 08:34 PM|LINK
I have a AJAX form that users can expand but I also want the to be able to close it as well.
I'm not sure about how to accomplish this task, but I suspect that JavaScript may be required.
I don't know much (read: anything) about JavaScript so any assistance will be greatly appreciated.
http://www.my-msi.net/Admin
blog
If a post helps you, please mark it as Ansered, thank-you.
Dan Bracuk
Contributor
3970 Points
1096 Posts
Re: Looking for JavaScript code to close an AJAX display
Dec 30, 2012 09:03 PM|LINK
What is the code that allows them to expand the form?
eric2820
Contributor
2777 Points
1161 Posts
Re: Looking for JavaScript code to close an AJAX display
Dec 30, 2012 09:06 PM|LINK
The form is created by a link that is Unobtrusive AJAX enabled.
I'm thinking that jquery could do the job but am having problems finding an example that I can 'tweak' for my own purposes.
http://www.my-msi.net/Admin
blog
If a post helps you, please mark it as Ansered, thank-you.
raju dasa
Star
14320 Points
2440 Posts
Re: Looking for JavaScript code to close an AJAX display
Dec 31, 2012 04:36 AM|LINK
Hi,
That dialog form is created using AspNet Ajax control or Jquery UI control?
check this Jquery UI dialog:
http://jqueryui.com/dialog/
rajudasa.blogspot.com || blog@opera
eric2820
Contributor
2777 Points
1161 Posts
Re: Looking for JavaScript code to close an AJAX display
Dec 31, 2012 12:47 PM|LINK
That is cool but it is not what I'm looking for....
I have a <div class="move-right" id="OnlineUsers"> </div> in the _Layout.cshtml file that is poplulated by an Ajax.ActionLink(...) in the Index View. This calls out to the HomeController method: OnlineUsers which returns a PartialView.
It is this OnlineUsers <div> that I need to close or hide, unless that sites dialog box can be used in place of the <div>. If this is the case, please let me know.
And I just noticed that there are scripts in that demo that I don't have and have zero idea of where to get.
Specifically, the jquery.bigframe-2.1.1.js is the one I don't have. Where would I obtain this from???
http://www.my-msi.net/Admin
blog
If a post helps you, please mark it as Ansered, thank-you.
eric2820
Contributor
2777 Points
1161 Posts
Re: Looking for JavaScript code to close an AJAX display
Dec 31, 2012 03:10 PM|LINK
I'm trying to use the jquery ui dialog, but I'm having a problem:
I my _Layout.cshtml page I have this:
<script src="@Url.Content( "~/Scripts/jquery-ui-1-9.2.js")" type="text/javascript"></script>
But in Fiddler 2 that file keeps coming up with a 404 HTML Error Code.
I've check the permissions on the Scripts folder and on that specific file and they are Everyone has View & Execute privileges on the directory and file. I've tripple checked the file name as well.
http://www.my-msi.net/Admin
blog
If a post helps you, please mark it as Ansered, thank-you.
eric2820
Contributor
2777 Points
1161 Posts
How to close/hide a div?
Dec 31, 2012 03:27 PM|LINK
I have a <div> on my _Layout.cshtml page that gets popululated by Unobtrusive AJAX.
That is working well enough, but I'm looking for a way to make that data dissapear.
Question: Any suggestion?
http://www.my-msi.net/Admin
blog
If a post helps you, please mark it as Ansered, thank-you.
Afzaal.Ahmad...
Contributor
2660 Points
1039 Posts
Re: Looking for JavaScript code to close an AJAX display
Dec 31, 2012 04:16 PM|LINK
Aaaa try using jQuery to hide the div when the user presses some button. Or when state changes to 4.
This way your code will be executed and the div will be hidden too.
~~! FIREWALL !~~
eric2820
Contributor
2777 Points
1161 Posts
Re: Looking for JavaScript code to close an AJAX display
Dec 31, 2012 07:35 PM|LINK
And how would I accomplish that?
I have worked out the jquery code to hid the div, but don't exactly know how to use it with a button.
If you have a generic example of jquery use with a button, that would help me along a lot.
http://www.my-msi.net/Admin
blog
If a post helps you, please mark it as Ansered, thank-you.
Afzaal.Ahmad...
Contributor
2660 Points
1039 Posts
Re: Looking for JavaScript code to close an AJAX display
Jan 01, 2013 08:49 AM|LINK
Just simple use those items you used while hiding a div.
An ID to work on. Use that id for that button. While pressing do the ajax too and the jQuery
~~! FIREWALL !~~