I'm trying to use jquery to animate between two images, fading one out then fading the other in.However, I cannot get them to act syncronously, the fadeIn() always gets called before the fadeOut() is complete:
$(function() {
var tabContainers = $('#tabwrap > div');
var listItems = $('#tabwrap ul.tabnav li');[code]....
[EDIT] This is running in an ASP website, if that makes any difference whatsoever?
I have a Menu page. If a user selects an Menu Item it opens a new IE Window using JavaScript. So user can open different parts of applications in multiple IE Windows. These Windows have the same Session.
My issue is that these pages are accessed synchronously? If one of the child window is waiting for an action to be finished no other request from any other child window is processed. Is it because of using Session variables?
Update: This is only happening to the windows having the same parent. If I have IE child windows from different parent windows then this issue is not there.
I am using RequireJS in ASP.NET. There is a user control that includes a script file, and registers a startup script in order to initialize itself. Here's the generated code:
So, the problem is that startup script runs before the myctrl.js file has had a chance to run. Currently, the require call uses a callback function, which obviously doesn't run until later, and this is the problem... the script returns and the browser continues to the startup script before MyCtrl has been created.
I have tried simply calling require(['script/dep1', 'script/dep2']); at the top of the file, but that doesn't block either, and the script fails because the dependencies haven't loaded yet. The dependencies are modules, by the way, e.g. they use define().Is there a way to load a script file synchronously with RequireJS? The API documentation says that "Using RequireJS in a server-side JavaScript environment that has synchronous loading should be as easy as redefining require.load()",
I have this label that i want to fadeOut after button event clicked. I am using a MasterPage. And the Script Manager is declared on MasterPage. In Defaulst.aspx i have:
On click of "ValidateUser" button, I do check whether user is valid or not. Based on some condition I do need hide "AuthenticateUser" div tag and show "ForceToChangePassword" div tag. I really like the jQuery fadeIn/fadeOut effect. I can easily do that on client side. But how can I give that effect after executing server side code?
I tried to call javascript method from code behind that method has a fadeIn/fadeOut logic but it seems like that javaScript method is never been called.
The problem is that I don't want to force the user to always click the 'close' button, because these messages popup relatively frequently. I was thinking that a timed fade out would be a good option to follow. However, I can't work out how to call a timer to do a fadeout from my codebehind -- ie. Currently the codebehind sets 'display=block' to show the error, but I am not away that it can also launch some JS to fade out a box.
BTW, I am using Telerik controls, so would prefer to extend those rather than use the ASP Ajax fading extensions from Microsoft (I couldn't get them to work either, as it came up with a conflict with Telerik controls).
Im not very experienced with JavaScript or Ajax so i want to know how simple is it to do my idea and is there any tools that will help me.
I have a folder with images, banners, which i have a c# code block that goes through and makes a list of all the files and their URLS.
I want these images to rotate automaticaly every 5 sec as the websites main banner.
No buttons, no mouse over, nothing more is necesary. The only thing is that it has to be dynamic, when the user has uploaded more images into the folder, these new files must be used as well.
So im asking all the great experts here. What is the easiest way to go?
I have a page on which the user can define a query. When done, the user enters a name for the query and presses a button. I'd like to process the button click, make a text label (or Span) visible for a few seconds and then have it fade out.
Since it is a postback, I can turn an ASP:Label control to visible - that's easy. Now how do I get jquery to make the label fade away after a few seconds? In a broader sense, how do you get a postback to trigger a jquery method?
I would like to make a custom accordion, in which I have 2 panes, but where you couldn't open the second one until you clicked a validation button in the first one that would open the second...
I tried to just make a button that would hide the first pane but I cant get to make it work.
I have a user control is shown through a SimpleModal popup (JQuery), this user control gets some data from database and displays them (the details of a record).
The problem is that this user control makes a round-trip to gets the data every PostBack for the parent page even it's hidden.
I wonder if I could make it gets its data only if the popup is appeared.
I tried to put it inside a Panel with false for Visible property and change it to true when I open the popup, but it stil call Page_Load which gets the data from database!
I just want to do soemthing simple with properties and usercontrols, I started it but I cant get it to work. I am not at my PC now so I cant past the code, I have a website that catches everything in the 404 error page and useing a baseclass show the content based on upto four folders after the domain - it will works fine. I have various sections of the base class full of options to display usercontrols, so of the User controls use the DAL to get the content. What I want to be able to do is pass a string back to the bredcrums lable in the header based on another usercontrols response from the DAL. Both the header UC and the user control accessing the DAL have properties setup, so in theory it is easy, but I cant get it to work. I want to be able to say something like this Header {Propertyname} = FAQs {DAL value} - the bit I think I am struggling with is how to make the DAL value visable from outside of the UC.
I have properties like
FAQ.ID = 123 > this is going in towards the UC FAQ.Name = xxx < this needs to be exposed one the DAL has been accessed. I am sure it is somthing to do with the get and set, but I am stuck
CustomerService service; public CustomerService Service { get { if (this.service == null) { this.service = new CustomerService(); } return this.service; } } public DataTable GetCustomers() { return this.Service.GetCustomers(); }
Now the question is: if I wrote the above method as follow (without "this"), it's giving me an error : instance is not reference to an object.
public DataTable GetCustomers() { return Service.GetCustomers(); // this will spell the error "instance is not reference to an object" }
Does anyone know? also it only happens while running via IIS and not from casini web server (VS 2010).
perhaps it's my exposure to php frameworks, but asp.net mvc makes perfect sense to me. the logic is there to build a well organized website, and it really doesn't seem more difficult than using web forms. is it wise for me to jump straight into asp.net mvc from php or would you recommend I learn web forms first?
using (StreamWriter streamWriter = File.CreateText(@"C:File.Html")) { streamWriter.WriteLine(TextBox2.Text); }
This code opens File.Html and copies the value of TextBox2 But When I open File.Html all characters are on one line, even though there were multple lines of text in the TextBox
I am trying to make a website in C# ASP.NET. I have been given some code as well as visual studio 2010. The code I was given was written in ASP.NET 4.0, so I obviously want to code in that, but my web hosting only supports ASP.NET 2.0. If I upgrade to 4.0 what's the difference as far as compatibility issues with all browsers, or any draw backs to using 4.0. I am using 1&1 hosting so it is a pretty commercial hosting, maybe there is a reason why they do not have 4.0 standard on their servers?
Now a days my company started using some third party tool in our web application they aslo instructed to our team to make the dll for every web application
The steps for creating the dll for web application?