Javascript - Data From WebService Is Not Retained In Page History

Jan 20, 2011

I am using a web service to pass back search results. To do this I am using ToolkitScriptManager with a ServiceReference to my web service and calling the web service up with javascript. The javascript call looks something like this:WebService.GetResults("search term", OnSuccessGetData, OnFail);

View 1 Replies


Similar Messages:

AJAX :: Data From WebService Is Not Retained In Page History

Jan 19, 2011

I am using a web service to pass back search results. To do this I am using ToolkitScriptManager with a ServiceReference to my web service and calling the web service up with javascript. The javascript call looks something like this:

WebService.GetResults("search term", OnSuccessGetData, OnFail);

If the request is successful the "OnSuccessGetData" function is fired and the results are inserted into a DIV tag. Because the resulting search results can be large I wrote the service to only pass back the first 20 results on the first trip. After that I make calls again to the service to return the next 5 results and continue to do this until all the results are loaded. This all works wonderful. You can see it in action at www.lsbio.com and use the search term "human mouse". My problem is that when the user clicks on a product and then hits the 'Back' button the search results have to be fetched again from the webservice.

Is there a way to keep the search results in the DIV tag to remain as part of the page so when the user navigates away from the search page and uses the 'Back' button to navigate back the search results are still there without having to hit the webservice again?

If I didn't make myself clear enough on what I am trying to do, go ahead and test the site www.lsbio.com, use the search terms human mouse, click on a product and then hit the back button.

View 1 Replies

Javascript Calculations And Postbacks - Numbers Are Not Retained?

Mar 22, 2010

I'm working on an ASP.NET web app where I'm using a Wizard to take the client through a large series of steps.One of the steps includes calculating a bunch of numbers on the fly... the numbers calculate properly but when I click "next" and then go back again... some of the numbers are not retained.

function CalculateFields() {
txtSellingPrice = document.getElementById('<%=txtSellingPrice.ClientID %>');
//I get all of the elements like this...
//...
var regexp = /[$,]/g;xt" and then "previous"
[code]...

View 1 Replies

State Management :: Textbox Is Enabled By Javascript Not Retained On Postback?

Nov 29, 2010

In my page, I need to enable a text box when user click on check box(checked). I have used javascript for this. It works fine but when there is postback for the page, the textbox becomes disabled again although the check box is checked. But the value in textbox still appears. Is there any method to retain the enabled state for text box on postback other than using hidden values?

View 4 Replies

Javascript - History.go(-1) Function Not Working For Dropdown?

Dec 30, 2010

i am using the function history.go(-1) function on my button to go back. but i am getting a prob in value selected in dropdown.

the sourceview is showing the original value selected but on UI its showing the previous value

means when i click on back button,

UI shows the same value but when i view the source code then the selected value is the same that need to be appear

for example

suppose my dropdown has data in format MM/YYYY first i select 02/2010 and then after that i select 04/2010 now when i click on back button having onclick ="history.go(-1)"

then the value in dropdown remains the same i.e 04/2010 but when i see the source code, then for dropdown the selected value shows as 02/2010.

View 1 Replies

Javascript - History.go(-1) Function Not Refreshing Server Side Controls?

Dec 30, 2010

I am using a dropdown, a devexpress grid view and a button on my page.

My gropdown contains the months in the format MM/YYYY, and on dropdown's selection change the data binds in the grid view.

the functionality of button is to go on previous page as same as back button of browser.

Now, my prob is that if i select any month and then select another month, the data changes.
but now when i click on back button having onclick ="history.go(-1)", changes the data on the grid view but the month in the dropdown remains the same.

For example:

Suppose, first i have month selected as 02/2010. At this time the data in grid view is for exapmle 01234

now when i select month 03/2010 the data in grid changes to 56789

now when i click on back button, then data in grid changes to 01234 but the month in dropdown remains to 03/2010.

View 2 Replies

AJAX :: Try To Open My Webservice In IE Browser Using Following Link To See The Javascript Proxy, It Return Blank Page?

Apr 11, 2010

I created a very simple webService using the VS2008 template. i am planning to use Ajax call for the webService.when i try to open my webservice in IE browser using following link to see the Javascript proxy, it return blank page.[URL]

View 3 Replies

AJAX :: Javascript Window.history.back() With Modal Popup Extender

Sep 30, 2010

I have a asp.net page that has a list of items. When one of the items from the list is clicked a details page is displayed. This details page has a link button to show a popup for history of the item. The details page also has a button with text 'Back'. The back button has onclick event set to "javascript:window.history.back();".

This back button works fine and goes back to the first page. However when the user is on the second page and opens the pop up by clicking on the link button, the back button stop working and displays Webpage has expired message.

View 2 Replies

Forms Data Controls :: Dropdown Selected Data Not Retained In Multiview

Dec 26, 2010

I have added a multiview and menu in a web page. I have 2 views. In both the views, i have added 2 dropdownbox. Two different Dropdown box is available in both the views. Dropdownbox are filled from the database.In the first view, i selected a data in the dropdownbox, and moved to the next view. In the second view, i selected a data in the dropdownbox. I clicked on the first menu, and in the dropdownnbox i am not able to retain the selected data. It is going to the default value.

[code]...

View 3 Replies

How To Pass FormsAuthentication.SetAuthCookie From Data Access Layer Class To WebService To JavaScript

Jan 29, 2010

I am using DotNetOpenAuth in my ASP.Net Website. I have modified it to work with Facebook Connect as well, using the same methods and database structures. Now I have come across a problem.

I have added a Facebook Connect button to a login page. From that HTML button, I have to somehow pull information from the Facebook Connect connection and pass it into a method to authenticate the user. The way I am currently doing this is by:

Calling a Javascript Function on the onlogin function of the FBML/HTML Facebook Connect button. The javascript function calls a Web service to login, which it does correctly. The web service calls my data access layer to login. And here is the problem: FormsAuthentication.SetAuthCookie is set at the data access layer. The Cookie is beyond the scope of the user's page and therefore is not set in the browser. This means that the user is authenticated, but the user's browser is never notified. So, I need to figure out if this is a bad way of doing what I need or if there is a better way to accomplish what I need. I am just not sure and have been trying to find answers for hours.

View 1 Replies

Web Forms :: Maintain Ddl Values When Page Changes From Default To History?

Jun 8, 2010

i have a master page that has a an accordion and inside the accordion is a cscading dropdownlist and then a button... Basically you select the values from the dropdowns and the click the button to change the content form from default.aspx to history.aspx. This works fine the first time I do it with the exception that cascadiing ddl all reset and then if i populate again and clcik the button again I get the following error(below)... I know I can set enableEventValidation = false, but wondered why this is occuring and what effect setting it to false would have? The second part of the question would be how do I maintain the ddl values when the page changes from default to History.sapx? I am using the following for the button.

<asp:Button ID="btnNewRecord" runat="server" Text="New" PostBackUrl ="~/History.aspx" />
Event validation is enabled using <pages enableEventValidation="true"/> in configuration or <%@ Page EnableEventValidation="true"
%> in a page.

For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them. If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation.

View 3 Replies

AJAX History Points Lost When Returning To Previous Page?

Jan 14, 2010

I am attempting to retrofit a web application that had a rudimentary, yet mostly effective navigation infrastructure that, when properly utilized, allowed navigating forward and backward through AJAX states and other pages through the use of additional <asp:Button> objects labeled "Back" to perform special code for restoring previous states. There was an elaborate stack push and pop algorithm for this. The effect was very similar to what is described in Diagram 1 (AStatex refers to an AJAX related state of the page). The reason for this is so that it takes away the reliance on the contrived Back button and so that accidentally hitting the browser's back button or hitting the Backspace key won't cause a loss of state.

View 2 Replies

AJAX :: Maintain Accordian History And User Navigates To Next Page

Mar 3, 2011

How to maintain Accordian history and user navigates to next page and trys to comeback to same page (where the accordian is). Its not actually a different page, but I am using asp multi view and Accordian in a view.

View 1 Replies

Detect Client-side When A Page Load Is The Result Of An AJAX History Point?

May 25, 2010

I'm trying to prevent a "flicker" effect that is occurring on my ASP.NET page which occurs when a user navigates to the page via the browser back button after having navigated away from it. The reason for the flicker is that I'm using an Update Panel which has some content in there on the initial page-load. As a result, when the page is loaded via a back button that initial content is shown very briefly before it is updated with the correct History-aware data.

In order to overcome this I am intending on having the updatepanel hidden (display: none) on inital page load and then show it as long as we don't have any history to deal with. The problem is that I can't find out what to check to determine if there's any history. I can see that the Sys.Application has a _history member but when I'm checking it on page init it is null each time.Does anyone know what I should be checking to determine if there's history to deal with for a page load client-side? And at what point to do it?

View 3 Replies

Can Use JqGrid Within C# Using A Webservice And Javascript

Jun 30, 2010

The jqGrid has been kicking my butt (as well as others on this site). I can't seem to get the JSON data from the webservice to load into the jqGrid when using the addJSONData method.

I am not using MVC just a plain WebProject webservice in ASP.NET 3.5.

I am using the latest version of jqGrid 3.5.

I don't know what to do. I am currently trying to load just 1 row that I am returning a string in my WS like this:

"Page:1,Total:1,Records:1,Rows:[name: Jeff V title: Programmer]"

Which is then passed into my javascript as:

{"d":"Page:1,Total:1,Records:1,Rows:[name: Jeff Vaccaro title: Programmer]"}

My jQuery code is the following:

jQuery(document).ready(function () {
jQuery("#list").jqGrid({
datatype: processrequest,
mtype: 'POST',
colNames: ['Name', 'Title'],
colModel: [
{ name: 'name', index: 'name', width: 55 },
{ name: 'title', index: 'title', width: 90 }..........

I've tried all sorts of different variations of the addJSONData code.

View 1 Replies

AJAX :: Using JavaScript And WebService?

Mar 10, 2010

I am planning to use a Javascript call to a WebService to retrieve data from the database. At the moment I am using Ajax to do this. But since the Ajax is slowing down the performance of my application. I have read in some article that even though Ajax only refreshes the Update panel contents, Ajax does a full round trip to the server. What I need to know is how can I populate a Grid from data coming from a WebService via a Javascript call.

View 3 Replies

Call Web Methods Of WebService In Javascript

Nov 5, 2010

I'm doing a project in asp.net with a web services. My web services and my asp.net project is separate and my asp.net projet have a reference of my web services. i'm using visual studio 2008 framework 3.5 and my service web is in vb.net. i want to call the web methods of my web services in javascript my script manager is declared

<asp:ScriptManager runat="server" ID="scriptManager" EnablePageMethods="true" >
<Services>
<asp:ServiceReference path="http://localhost:2931/ServiceCompas.asmx"/>
</Services>
</asp:ScriptManager>
the javascript fuctions
<script type="text/javascript">
function test() {
alert('test');
Service1.Liste_Carte(Onsucced);
}
function Onsucced(resultat) {
alert('je suis passée');
}
</script>

service1 is the class of my Webservice and i call the function test with my button <input name="btnRecherche" class="btnRechercher" type="button" value="Rechercher un emplacement" onclick="test()" /> the problem is : JavaScript say Service1 is not defined but why .... What's the problem ? I've checked many forums and videos every body did it
sorry for the french variable

View 3 Replies

AJAX :: Can't Access WebService From JavaScript

Jul 21, 2010

After watching [URL] learning guide in accessing Web Service from JavaScript[/url] I was doing the same thing in order to test it. And found out that in my JavaScript I don't have any WebService in my IntelliSense. Such thing happens if I create WebService and WebSite either in one common solution or in the different.

View 23 Replies

WCF / ASMX :: Call Webservice Hosted On IIS From Javascript?

Jan 11, 2011

all My web app is calling webservice which resides in same virtuall directory as web app . In this scenario i have a javascript function like this which works perfectly.

[Code]....

View 2 Replies

Javascript - Apostrophe In Ajax Webservice Call?

Jan 28, 2011

I'm calling a webservice using jQuery with .ajaxHere are the data parameters for the call:

var parameters = "{'Titre':'" + Titre + "','Description':'" + Description + "','Contact':'" + Contact + "','VilleId':'" + VilleId + "','QuartierId':'" + QuartierId + "','UserId':'" + UserId + "'}";
It works fine. But when parameters Description or Titre contain the ' character , no call!!!

Does anyone have an idea how can i make it work even with apostrophe character in Titre and/or Description?

View 4 Replies

AJAX :: Access Javascript Object From Webservice?

Apr 23, 2010

I'm trying to pass a javascript object array back to a vb .asmx web service.

I can't even tell you how many different things I've tried, so i'm confused more than when I started.
Below is an example of the client side code I am using.

[Code]....

I'm adding my script reference in my vb page as follows, and can access other web methods fine.

[Code]....

how to be able to access these objects within the web service method. I need to be able to iterate though all the people from the javascripts array so that I can do some other functions, such as validation, adding them to a database, etc.

View 3 Replies

WCF / ASMX :: Calling Webservice From Javascript Side?

Nov 17, 2010

This is the webservice am using.

[code]....

But my function is not going to Hello() soon after calling SetOCXVariables()

After my 'P' comes undefined and does the remaining, it goes to hello()

why is this happening?

View 7 Replies

AJAX :: JQuery / Javascript Calling Webservice

Oct 5, 2010

I've tried a bunch of different examples and still can't get this to work. I have a jQuery GalleryView control I'm using and I simply want to log impressions. I set up a webservice that works, but I can't figure out how to get it to work in javascript. I have verified that the webservice is working as expected.

Imports System.Web

View 2 Replies

AJAX :: Return Class To Javascript From Webservice?

Aug 31, 2010

I know i've seen a tutorial for this, but can't locate it anymore. I have a class Employee in c# side, I also have a webservice where I pass in an ID# and an Employee object is returned. Now I want this object returned to Javascript code, I know I've seen it done before, can someone point me to a tutorial that shows something like this being done. I'm using the MicrosoftAjax.js file.

View 3 Replies

AJAX :: Postback After Calling A Webservice From JavaScript?

Mar 23, 2011

I have a page that calls a webservice from JavaScript using the approach described in this article: [URL]

This is working fine. The problem is when the page causes a postback before the end of the execution of the webservice's method. When that happens, the succeeded callback method never gets called. Does anyone know if there's a workaround to this?

View 2 Replies







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