scope

in coldfusion, variables in what scope can be passed to and iframe page?

hi everyone, i wrote 2 pages to test this problem, but the server complaints error. i don't know why, anyone can explaint it? great thanks. this is 1.cfm <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt; <html> <head> <meta http-equiv="Content-type" content="te...

static class availability problem

Can anyone help with this I really can't see what is wrong. I have a set of classes all in the same namespace and assembly. One of these classes is static. Since it is declared in the same namespace and assembly as the other classes I would expect it to be accessible to them all. However it turns out it is accessible to all bar one ...

Test if Spring Scope is active

How can I test if the Session scope is active in Spring? for example, at startup some classes need a User object which is Session scoped, than i return a mock User object. the bean in question is declared with aop:scoped-proxy. how can i test if the session scope is active? ...

Referencing a newly created control

If i create a control on the fly, as below private void button10_Click(object sender, EventArgs e) { CheckedListBox CheckedListBox1 = new CheckedListBox(); CheckedListBox1.BackColor = System.Drawing.Color.FromArgb(((System.Byte)(255)), ((System.Byte)(224)), ((System.Byte)(192))); CheckedListBox1.ItemHeight = 16; CheckedL...

JavaScript variable scoping - persisting state?

Hi, I have the following setup, and I need to know how to persist state. 1.) An external web page uses ajax to load and display a .jsp file, which contains javascript. 2.) Once this rendering is complete, javascript in the .jsp file must be called to perform an action based on the results that occurred during rendering. Specifically, th...

jQuery Plugin Options

First off, I know this is a base JS issue, not jQuery. I am at that learning point where I cannot seem to get my head completely wrapped around some scope issues. So I need some explanation. I've been reading every article/tutorial I can find, but just need some answers. I setup this base code to experiment with (as the actual code is f...

in coldfusion, variables are resolved in what order?

hi everyone, i have little impression about variables resolve order, but i can't found it in the cfml reference or coldfusion dev guide, anyone can help? great thanks. ...

How can I multi select scope in UISearchBar?

I am working on an iPhone application that has a UISearchBar which populates a table view. I have various options on my search that could be easily hooked into the 'scope' functionality. However, I really need to have two groups of buttons. One group would be 'scope' determining the type of search, and one group that indicates the ...

Javascript globals variables unchangeable in onsubmit event handler

I've attached onsubmit handler in a form tag like this: <form action="file.php" method="post" onsubmit=" return get_prepared_build(this);" > but whatever global variable (defined earlier, of course) I try to change inside get_prepared_build() function - later it apprears non-modified. Looks like that this function deals with a local c...

Why can't my coldfusion cfc access a udf included in application.cfm?

I've got a logging function (can't use cflog) included in application.cfm and my .cfm pages can access this, but any components I use give me a "Variable LOGGER is undefined." error. application.cfm <cfinclude template="logging.cfm"> logging.cfm <cffunction name="logger" > ... </cffunction> Any ideas as to what I'm doing wrong? ...

What's wrong with defining JavaScript variables within if blocks?

I have some code like this: if (condition) { var variable = blah; } if (differentcondition) { var variable = blah; } Is this correct? I assume that the variable wouldn't be assigned if the condition doesn't return true. JSLint keeps on telling me, variable already defined. Am I doing this wrong? Thanks. OK, Here's my actual usec...

Calling Javascript with Flash

If I call a JavaScript function from flash like so: ExternalInterface.call("main"); This is all fine and good, but I want my scope to be a particular prototype, is there any way I can do something like: ExternalInterface.call("someObj.main()"); So that the keyword this points to someObj? I'm not against somehow passing it as an arg...

Pass in jQuery/plainJS variables/functions of a current scope to anonymous function called from current scope

How to pass current scope variables and functions to the anonymous function in plain Javascript or in jQuery (if it's specific for frameworks). For example: jQuery.extend({ someFunction: function(onSomeEvent) { var variable = 'some text' onSomeEvent.apply(this); // how to pass current scope variables/functions to this functi...

jQuery SO Vote-Object and Scope

This is a javascript question. The fact that it mentions this website is irrelevant. This does not belong on meta. I'm working on a Greasemonkey script to auto-load additional pages of answers onto the first page of answers here at Stackoverflow as you scroll. This is working well. I want to maintain the ability to up-vote/down-vote t...

Javascript var hoisting issue

I have a very simple Javascript function that hits a MS SQL server and returns some records back. There is a cell that i want to only display in the top table row when it is unique. I believe my problem is var hoisting because the variable that i assign within the while loop does not work because the value is not carried from the last r...

What is the point to a static method in a non-static class?

I have trouble understanding the underlying errors with the code below: class myClass { public void print(string mess) { Console.WriteLine(mess); } } class myOtherClass { public static void print(string mess) { Console.WriteLine(mess); } } public static class Test { public static void Main()...

how to invoke a dynamically loaded javascript function

I was implementing a on-demand script controller based on jquery's getscript, it looks like this: function controller = function(){ var script = function(){ var scripts = {}; return { load: function(jsurl){ $.getScript(jsurl, null); }, run: function(js){ window[js].apply(this,n...

Custom scope for .NET application settings

I can define my custom scope: [AttributeUsage(AttributeTargets.Property)] public sealed class SiteScopedSettingAttribute : SettingAttribute { } How do I use it in the Visual Studio Settings editor (make it available in the "Scope" combobox)? ...

Spring ApplicationContext Bean Scope

When you create a Service bean or Dao bean in your Spring applicationContext.xml file, what is the scope of those beans? Will every person who accesses the web application use the same instance of the bean, or is the bean instantiated for each user's session? ...

Sockets & Data Persistence

Hi, This is potentially a newbie question, but if i open and write some data to a socket, then exit the subroutine so the socket goes out of scope, and then try and read the data from another program, at a later time, will the data still be there or does it die when the original declarations go out of scope ? Thanks, N. Further info...