JavaScript - Why Are Pages Getting Accessed Synchronously
Mar 3, 2010
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.
View 2 Replies
Similar Messages:
Mar 7, 2011
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:
<script src="script/UserControls/myctrl.js" type="text/javascript"></script>
...
<script type="text/javascript">[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()",
View 1 Replies
Apr 13, 2010
How to get that how many pages accesses by a user in a website.
Actually, rather then putting code in each page I want some generalized method/technique that if user Logged to a website and during his Login period what was his activity and which page(s) he accesed.
Note:
1. My website pages are under MasterPage.
2. MasterPage has a MasterMenu.
3. For singlePage activity I used Page.GetType.Name
View 2 Replies
Oct 15, 2010
Its time for another very simple question that I can't find an elegant solution for. Basically, I have an app that is using a jQuery Ajax call. In this call, you have to specify a URL path for the service that you are calling. In this instance, I am needing to call this JavaScript function from multiple files in my application and those files are on differing levels of the folder structure.
Here's the question, how would you elegantly handle this scenario so that you can call the JS function from any location in your app. Here are my constraints:
1) I am running on Asp.Net 4.0.
2) My current environment has a local, Dev, Test, and Prod Environment (hard-coding the URL path will not work).
Code Snippets:
function MakeTheCall() {
$.ajax({
type: "POST",
url: "Services/FileName.asmx/Handler", //Path in Question
data: "",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function(result) {
},
error: function(xmlHttpRequest, status, err) {
}
});
}
I would like to be able to call this function (which is in an external JavaScript file) from files in different directory levels, such as:
1) http://SomeDomain.com/SomeDir/CallingFile.aspx
2) http://SomeDomain.com/CallingFile.aspx
View 1 Replies
Jan 29, 2010
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?
View 4 Replies
Dec 27, 2010
How Can I use Java Script to Validate Pages Example : Check Required Field Before Saving
View 2 Replies
Sep 24, 2010
How to use javascript in .ascx pages
View 2 Replies
May 23, 2010
As a test, I wanted to have an ASP.NET page rendered without the auto-generated javascript. Is this possible?
View 2 Replies
Mar 11, 2011
In PageA, there is a button to open a crystal report. I want to add a HTML button into crystal report to close report(browser) and back to PageA. How to use javascript to do this job?
View 1 Replies
Feb 14, 2010
javascript is not running in a Master Page. Do I have to write it on each and every content page?
View 10 Replies
Mar 1, 2011
i am developing in asp.net and i use different JavaScript and CSS files.
i have a master page "masterpage1" a folder admin in this folder i have a masterpage, called masterpageadmin which inherits from the masterpage1 and all aspx files in the folder admin inherits from the masterpageadmin only the "admin" role can acess to the masterpageadmin and aspx files in the folder admin
My question:
how should i reference in my masterpage1 my JavaScript and CSS, so that the aspx files in the admin folder can use them.
View 2 Replies
Jun 4, 2010
Just curious to know that if my pc is infected with trojan or any other virus, is it possible that my website will be infected along with that I have made up in asp.net with visual studio 2008.I am not sure that it is the right place to put this question or shall I have to put it to
http://stackapps.com/ or any other site linked to stackoverflow. But anyhow it is very important for me know the answer.Because one gentelman report me about the infection of Jquery-1.2.3.min.js which I have downloaded from jquery official website.
View 2 Replies
Jun 21, 2010
how to call java script for code behind pages of c# asp.net
I have sreached google but everything i have tried has failed
View 17 Replies
Aug 2, 2010
how one might go about implementing your own custom tags in JS pages served by ASP.NET?
Basically what I am looking to achieve is a way of creating "includes" for my Javascript files by adding some code such as.
//Include Src="MyJavascriptFileLocation.JS"
And then having the ASP.Net handler serve my javascript file but also dynamically append the referenced javascript file to the location where the include is written.
View 2 Replies
Jan 30, 2011
In my master page, I'm using a javascript dropshadow. Obviously, I want it to appear in all of my content pages, but at the moment it's only showing in my home page. I've not done anything to override my master page (that I know of!), so I'm quite confused. Has this happened to anyone else? What other info do you need?
View 4 Replies
Feb 15, 2011
I have a javacript file (script.js, for example) in the following location:
/Website/Shared/Js/script.js
I have two pages which use this javascript, but each one of them seems to require a different path and I can't figure out how to resolve both of them.
One of them is the page:
/Website/One/Two/Three/page.aspx and this requires the path:
<script src="../../../Shared/Js/script.js" type="text/javascript"></script>
The other page is:
/Website/One/Two/page.aspx and this requires the path:
<script src="../../Shared/Js/script.js" type="text/javascript"></script>
I tried to come from the root by doing
<script src="../Shared/Js/script.js" type="text/javascript"></script>
or
<script src="/Shared/Js/script.js" type="text/javascript"></script>
but none of these seem to work. The temp solution I have found is to declare the script twice which is dumb, but that is all I can think of now.
View 2 Replies
Mar 11, 2011
In PageA, there is a button to open a crystal report. I want to add a HTML button into crystal report to close report(browser) and back to PageA. How to use javascript to do this job?
View 1 Replies
Jan 25, 2010
Is there a way how I can check programmatically which user is used when my application accesses resources?
I have a production system which only our admin can access. Sometimes it is not clear what part of the system is wrong: Lets say when logging is not working. It is always possible that the web.config is wrong, but sometimes the directory is not accessible. It would make my life easier if I could be sure, that the user is used, that I expected.
View 1 Replies
Feb 15, 2010
I have some geo targeting code whcih I want to behave in a particular way if the site is being spidered by a robot e.g. google etc.
Is there any way to infer this?
View 4 Replies
Dec 13, 2010
There is a UserControlA which was already developed when I joined on a project. It is in a Project which I will call MyProjectWeb and it's namespace is MyProjectWeb.Common.
[code]....
But to my surprise, I cannot create an instance of UserControlB in the same code file in WorkFlowManager. MyProjectWeb.Common namespace does not even contain a UserControlB. When I compile I get obviously get a The type or namespace name 'UserControlB' does not exist in the namespace 'MyProjectWeb.Common' (are you missing an assembly reference?)
Why is that I can reference UserControlA but not UserControlB which are in the same namespace from the WorkFlowManager cs file? If I access the MyProjectWeb.Common namespace anywhere inside the MyProjectWeb, I can see both the user controls. Anywhere to look for errors?
View 2 Replies
Nov 13, 2010
i am using MVC for my project in the logon authentication, when i login using correct values there is no problem.
If i login using false or empty values i get the DataContext accessed after Dispose error.
i get it in the first line itself 'using (HealthObjectDataContext dc = DataContextFactory.GetDataContext())'
this is the method i use in the security service.
[code]....
View 2 Replies
May 21, 2010
I am running into an odd problem, and this is the only thing I can think of. I'm storing a list in cache, and I am randomly losing items from my list as users use the site. I have a class that is called that either goes to cache and returns the list from there, or if the cache is over a certain time frame old, it goes to the database and refreshes the cache. So when I pull the data from cache, this is what it looks like....
results = (List<Software>)cache["software"];
And then I return results and do some processing, filter for security, and eventually it winds up on the screen. For each Software record, there can be multiple resources attached to it, and based on how the security goes they may see some, all, or none of the records. So in the security check it will remove some of those resources from the software record.So my question is.... when I return my results list, is it a reference directly to the cache object? So when I remove a resource from the software object, it is really removing from cache as well? If that is the case, is there any way to not return it as a reference?
edit: I think I may have just answered my own question.... so if I do something like this:
results = new List<Software>((List<Software>)cache["software"]);
it will copy the cached list to my results list, correct?
View 1 Replies
Dec 27, 2010
I am thinking to create a web service for a SQLDB, I have created a simple database with two three tables tbldestination, tblflights and tblbooking.my big problem is how can i enable my database to be accessed through web service?
View 2 Replies
Jul 17, 2010
I'm trying to add upload controls to the page. This HTML mark-up with JavaScript is working fine but there
s no option to remove the added control:1. Example A
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
[code]...
View 1 Replies
Oct 21, 2015
I am using this article to print crystal report from client side [URL] .... and it's working find but it's printing only single page when there is more than one page data. I want to print all pages.
View 1 Replies