How To Optimize The Tab Loading In JavaScript

Sep 8, 2010

My colleagues have create a website and there is a webpage which contains a Tab.

He Implement the tab with the following method:

1.Load all content of the page
2.Use javascript to display those group content as block and organize them into tabs.
3.when user click one tab, then acitve it, and hide all other tabs.

And these functions works very well, but the performance is bad:

1.Load all contents cost lots of time
2.It will show all content at first, and then shrink to a tab control. When the user see this, it might think this is a bug of our system.

View 1 Replies


Similar Messages:

AJAX :: Loading AutoCompleteExtender Is Too Late / How To Optimize

Oct 21, 2010

I posted a question about using AutoCompleteExtender. It simply shows users all available email addresses when they type in a letter(prefix).

It works, but the problem is it loads to late :( takes around 5 seconds to pull out the list.

So I would like to optimize this

The part I would like to optimize speed is:

[Code]....

View 11 Replies

Silverlight - Optimize Loading An XAP File With A Website?

Jun 10, 2010

I've been developing a game using Silverlight 4 and silversprite (http://silversprite.codeplex.com/)

This game is HEAVILY content dependent, using a lot of audio and images. My content folder is around 90 mbs worth of stuff. And because of that, my XAP file is around 60 MB, and takes 5 minutes to download from the website before any user can start playing.

I am using Visual Web Developer 2010 to create my site and load the XAP. Is there a way where I can take content out of my XAP and put it in my ASP.net site project? Or perhaps upload my content files to the site's storage?

This would make my XAP file much quicker to download.

View 2 Replies

Log Slow Loading Pages / How To Optimize Speed

Jan 11, 2011

Do you know of a library/httpmodule for logging slow loading pages (perhaps for a specific treshold) in an ASP.NET environment?

Google did not yield any results.

It would not be too hard to implement on my own, but why re-invent the weel.

View 4 Replies

Loading Value To .net Control Using Javascript?

Jan 21, 2010

iam into problem of reading the value of the control which i alterd using javascript the sequence goes like this i got the text box control by using its id ,cleared the value of the text box,make the control disabled.when i tried to retrive the value of the textbox in aspx.cs.iam still getting the old value of the text box which i actualy cleared in the javascript

View 2 Replies

MVC :: Javascript File Not Loading?

Jul 1, 2010

I am currently trying to develop an application based on the NerdDinner sample and integrating some other stuff.

This is a very basic thing but i just cant seem to get it working.

In the site.master page, i have included the following script and other standard script files.

[Code]....

View 4 Replies

AJAX :: Too Many Javascript Files Loading?

Sep 28, 2010

I recently ran yslow on a page i have (master paged etc) and it returned that there were far too many javascript files included (most of which I haven't added).

I guess my question is that given i have v1.0.20229.0 of the toolkit.dll (over .net 2)

I'm wondering if subsequent releases have fixes for this sort of thing?

View 2 Replies

Javascript - Redirect To Page With Loading Animation?

Aug 17, 2010

I already know this solution. (transfer the slow loading page to a loading-interim-page which shows the animation and then redirects to the actual page)But I would really like to solve this without a redirecting page.

View 2 Replies

Javascript - Loading Webpages That Contain Google Adsense?

Nov 11, 2010

I have been experiencing some issues loading some web pages from my development machine. They were painfully slow. I disregarded this until I tried running my own site and found that the culprit was the show.ad.js file provided by google adsense.

Using firebug I see that the page hangs on the loading of this file and then aborts after about 5-10seconds. If I am calling multiple database records to a page it will load one, hang, abort and then load another.

Trouble shooting I have done and things I can rule out are:

My router or any other external peripheral. If I go to any other PC in the house the page loads fine and very quickly. I have tried cabled and wireless. The problem appears to be something unique with my machine.
It is not just my website, it is all websites with google adsense. I have turned off my firewall and shutdown anti virus. No change. It is from all browsers on this PC. I have tried chrome, safari, firefox and ie. No change. I do not have any ad blocker software installed that I know about.

I know there could be a million reasons why I could be having this problem but I thought someone out there may have had a similar experience. Failing that, is there any way I can trace the problem as I have no idea where to start.

View 2 Replies

C# - Javascript Loading Before Serverside Image Is Deployed?

Mar 22, 2011

Here is my Javascript

<%-- script to load the default image--%>
<script type="text/javascript"><!--
window.addEventListener('load', function () {
// Get the canvas element.

[Code]....

If you look at the img.src at the very bottom, it loads the defaultImage.ClientId from the server which is suppose to get the image on the page. If I use a normal url it works, but if I use document.getElementById(imgid).src it just doesnt load an image. I am assuming its because the javascript loads before the serverside code is ran. How can I get around this?

View 2 Replies

Web Forms :: Loading Usercontrol From The Menu Gives Javascript Errors?

Mar 14, 2011

I have an asp.net page that has menu which loads user control dynamically when the menu item is clicked.Now in the user control i have some buttons calling javascript on clientClick.When i click this button,it throws javascript error

Microsoft JScript runtime error: '(function name)' is undefined

Here is the code snippet:

function CheckUpload() {
var flag = validatePage();
var Checktext = $("#HyperLinkUploadFile").val();
if (Checktext != '' && flag)
flag = true;
return flag;
}
<asp:LinkButton ID="btnNotifyOA" runat="server" Text="Recommend Award and Notify OA & AO"
ValidationGroup="Notify" OnClick="btnNotifyOA_Click" OnClientClick="return CheckUpload();" />

The above linkbutton and javascript is inside a usercontrol.

View 4 Replies

When The Page Is Loading, The Image Gets Really Big, Then Shrinks Down Being Called By The Javascript?

Feb 16, 2010

I have an image control that puts user's photo in it. Once it's loaded, I resize it using the javascript.But the thing is, when the page is loading, the image gets really big, then shrinks down being called by the javascript. Is there a way for me to pre-load the image before displaying it? I do'nt want to set the image control's width and height to fixed pixels at this point.

View 8 Replies

Deferred Loading Of Page Content Using Javascript Or JQuery?

Jan 14, 2011

I have seen few website where their home page is too big and when user scroll down to read the content the of the page then few area of that page load dynamically. how they design their page. as example the site is http://blog.rainbird.me/ where you can see the effect. please give me idea to achieve it via jquery & ajax.

View 3 Replies

Stop HTML/JavaScript Page From Loading Mid Initialization

Dec 21, 2010

So imagine a piece of Javascript as the first script on a page along the lines of

var MySuperObject = new (function () {
this.SuperObjectInit();
})();

Now imagine that everything that proceeds this script (or a large portion therein) requires the SuperObject to have met its load conditions and loaded correctly.

Assuming for whatever reason the loading of the object fails I need to abort loading the rest of the page and the scripts in particular.

I know the majority of you are going to scream why not have your function issue a callback onSuccess and onFailed but the problem is this is in a ASP.Net project with masterpages, nestedmasterpages, usercontrols and so forth (each of which have their own dependencies and scripts); rendering such an approach problematic.

The other option (I assume) is to use window.location = "myErrorPage.html"; but I dont like the idea of having to create another page for an error message or the fact that it causes a redirect.

What I am hoping to do is something along the lines of

StopLoadingPage();
document.write("Error has occurred");

View 2 Replies

Javascript - Display An Image While A Page Is Loading In An Iframe?

Nov 26, 2010

I have a website with a menu, when menu item is clicked I display the page for that menu in an iframe(iframe is set to display home page initially by default). sometimes it could take few seconds to display the page for the selected menu item (for example reports) and I would like to display a loading image while the page is loading. how to do this using javascript or jQuery

View 3 Replies

Measuring Page Loading When Javascript Enabled / Disabled

Nov 25, 2010

How do it exactly?

Measuring Page loading when javascript enabled / disabled

View 1 Replies

Execute JavaScript From Code - Behind After UpdatePanel Has Finished Loading Its DOM Elements?

Jul 7, 2010

I have an UpdatePanel with a repeater in it that is re-bound after a user adds an item to it via a modal popup. When they click the button to add a new row to the repeater the code-behind looks something like this:

protected void lbtnAddOption_Click(object sender, EventArgs e)
{
SelectedOption = new Option()
{
Account = txtAddOptionAccountNumber.Text,
Margin = chkAddOptionMargin.Checked,
Symbol = txtAddOptionSymbol.Text,
Usymbol = txtAddOptionUsymbol.Text,
};
Presenter.OnAddOption(); // Insert the new item
RefreshOptions(); // Pull down and re-bind all the items
mpeAddOptionDialog.Hide(); // Hide the modal
// ... Make call to jQuery scrollTo() method here?
}

This works fine and the new row will show up quickly via the UpdatePanel. However, there are often hundreds of rows and where the new one is added is based on the current sorting column used. So, I wanted to take this as a chance to use the sweet jQuery ScrollTo plugin. I know that if I give it the ID of my overflowed container div and the ID of an element within it, it will smoothly scroll straight to the users newly added row. However, there are two problems:

I need to find the appropriate row so I can snag the ClientID for it. I need to execute the jQuery snippet from my code-behind that will cause my newly updated repeater to scroll to the right row. I've solved #1. I have a reliable method that will produce the newly added row's ClientID. However, problem #2 is proving to be tricky. I know I can just call ScriptManager.RegisterStartupScript() form my code-behind and it will execute the JavaScript on my page.

The problem I'm having is that it seems that it is executing that piece of JavaScript before (I'm guessing) the newly refreshed DOM elements have fully loaded. So, even though I am passing in the appropriate jQuery line to scroll to the element I want, it is erroring out for me because it can't find that element yet. Here is the line I'm using at the end of the method I posted above:

string clientID = getClientIdOfNewRow();
ScriptManager.RegisterStartupScript(this, typeof(Page), "ScrollScript", String.Format("$("#optionContainer").scrollTo("{0}", 800);", clientID), true);

What do I need to do so I can ensure that this line of JavaScript isn't called until the page with the UpdatePanel is truly ready?

View 2 Replies

Forms Authentication Prevents Loading Javascript On Login.aspx?

Sep 10, 2010

I am experiencing problems with Forms Authentication. When I try to load my Login.aspx page neither javascript nor stylesheets do not load.

Here is part of my web.config file

[code]....

View 1 Replies

Javascript - Jquery Loading Values On Page After Post Back?

Oct 26, 2010

Im currently trying to use a jQuery plugin:jQuery Autocomplete TokenizerNow after posting back the page, I want to re-load the values back into the textbox for whatever items had been entered.Now the jQuery on the page is like below:

$(document).ready(function () {
$("#<%=txtPeople.ClientID %>").tokenInput("Handler.ashx", {
hintText: "Type in a name",
noResultsText: "No results",
searchingText: "Searching...",
[code]...

View 1 Replies

Javascript - Defer Loading UpdatePanel Content Until After The Page Renders?

Oct 7, 2010

Old hand at ASP.NET, new to the UpdatePanel. I have a reporting page which executes a fairly length SQL query... takes about 10 seconds right now. What I would like to do is have my page fully render, with some placeholder text (Loading...) and then have the UpdatePanel kick off the actual time-consuming reporting process and render the report when it's done.

So... my theory is to use RegisterStartupScript() to kick this off and drop the string from GetPostBackEventReference() to trigger the UpdatePanel update. Some problems crop up:

1) Can I actually use GetPostBackEventReference w/ the UpdatePanel or do I need to trigger it some other way? Use this method on a button inside the Update Panel?

2) What event gets triggered when the postback reference is the UpdatePanel? It's not clear to me. I've got to call my databinding code somewhere! Again, maybe I need to use a button inside?

View 3 Replies

MVC :: Avoid Loading Images When Using Caching And Javascript Image Preloader In An Mvc Application?

Jun 18, 2010

i have implemented an image preloader using javascript inside my mvc 2 web app, in order to display an animated "loading" image .gif while sequentially displaying page images.I have also implemented caching using a cache profile for the controller action that displays the specific page ([OutputCache(CacheProfile = "LongCache")]).The problem is that the image preloader javascript is called when caching is applied. I was wondering whether i could, somehow, use the image preloader code only when the page gets refreshed and not when the cached version is rendered.

View 2 Replies

AJAX :: Loading Javascript File Based On Browser Version And Type?

Jul 7, 2010

I have some javascript files for each browser version and for different browsers. I want to include this files in script tag of script manager. Is it will detect these files and load based on browser version? Is there is best way to handle this scenario declaratively in markup insted of codebehind?If not declaratively how in code behind?

View 2 Replies

AJAX :: JavaScript Function EndRequest(sender, Args) Is Not Work After Finish The Loading

Mar 30, 2010

i would like to use script manager and update panel in different domain to accommodate an other domain web site inside a iframe, but it prompts me a an error alert box (An error has occurred in this dialog. Error: 54 Permission Denied), may i know why?

Is that any solution to solve the problem?

Secondly, in the different domain, the JavaScript function EndRequest(sender, args) is not work after finish the loading whereas the InitializeRequest(sender, args) is work. May i know why?

View 2 Replies

C# - How To Optimize AJAX

Jan 4, 2010

I have the following situation: excel-like application, that is accessible from internet.
2 users access it and I want the moment one user clicks on a cell, the other user to see that. (like in google documents).

My questions are:

Can I do this using standard UpdatePanel, while I keep the bandwidth usage to its minimum (in other words, only information for the current cell is passed, not the whole huge table), or should I implement my own ajax scripts on the page in order to get it optimized.How to do the updating : one way is to have a timer on the page and update it periodacally, the other way is to make a request and keep the connection opened till a change is made (using some heavy timeout, let's say 1 minute). Can you give me clues (like ajax libraries I can use, can I do this with the standard ajax controls in asp.net, ways to implement the live connection)?

View 1 Replies

Security :: How To Optimize The SqlRoleProvider

Nov 17, 2010

In my application

[code]....

is called on every page post back ,which fire query in db and bring 270 roles.

That can be optimized?

is it possible it called once at the time of login only.

View 3 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved