Showing posts with label access. Show all posts
Showing posts with label access. Show all posts

Monday, March 26, 2012

AJAX toolkit "access denied" problem

I am redesigning a site to include AJAX. On a new page that I created that contains a Tab Control, when I copy the page to the site's server, why would I be getting an "access denied" problem for a page that allows anonymous users? When I remove all references and controls for AJAX, it works fine.

Thanks for the information

Some more information on this problem...it seems as if it may be an IIS permission problem. All the AJAX controls run fine on the development machine, but in examining the website even further, any page with interaction, like a textbox with a watermark, I am getting Access Denied errors. Any help on this problem would be appreciated.

AJAX to do Server Side Validation without entire page postback

Hi,

I'm relatively new to ajax, but have an idea i'd like to try.

Is there any way to call a server side method that is able to access the values of items on a form, i.e post a form for validation, but without doing an entire page postback, and return a string with the validation results?

I'm having trouble figuring out how post a form without doing a postback.

Thanks in advance.

Chris

Hi,

The short answer is no. There's no way to "post" a form for validation without doing a partial postback which still causes the server lifecycle to be executed.


The solution that you're looking for is to execute a web service (or page method if you so chose) from client code that takes as parameters the current values of the form fields you're attempting to validate. You would execute the web service from client side JavaScript and grab the current values of your needed form fields also using JavaScript.

Look at the docs that describe executing a web service from client code.


Saturday, March 24, 2012

AJAX Tabs

How would I access the ajax tab index in javascript?

How would I add an auto scroll on the tab menus, so that when the page loads it loops through each tab in a loop?

Hi,

You can manipulate the tabContainer object on client side by finding a reference to it.

For instance:

var tc = $find("ClientIDOfTheTabContainer");

tc.get_tabIndex();

For more information about the functions and properties that tabContainer exposes, please refer to Tabs.js in the source code of AjaxControlToolkit.


I tried to accessing the tabcontainer using your example and it didn't work. I tried to access it adding the script block inside the body and in the head tag and neither worked. Do I have to register the script block with the page?

var tc = $find("TabContainer1_cllTabControl_7Tab_0");
alert(tc);

var tc = $find("TabContainer1");
alert(tc);


try this;

var tabContainer = $get('<%=TabContainer1.ClientID%>')