Frinavale 9,735
Recognized Expert Moderator Expert
I've been trying to test my web application using Internet Explorer 8 (release candidate 1) and have been experiencing some major problems. I'm hoping you can help me with this one.
I have a JavaScript Object that tracks the horizontal scroll position of a <div> element on the page. It sets a hidden field so that when the page is submitted to the server, the server code is able to retrieve the current scroll position. When the page is sent back to the browser, the server side code initializes the JavaScript Object with the scroll position retained.
This has all been working for quite some time now....but with the new IE8 RC1 I'm getting a Data Execution Prevention error message. It's displayed in a prompt informing me that:
Data Execution Prevention helps protect against damage from viruses and other security threats.
When I hit the "close message" button in this prompt IE8 proceeds to crash.
This message appears when I am storing the scroll position of the <div> in the hidden field used to relay the scroll position to the server: -
_onScroll: function() {
-
//this.get_element retrieves the <div> element
-
if (this.get_element()) {
-
this._LeftScrollPosition = this.get_element().scrollLeft;
-
//scrollPositionMessenger is the hidden field that relays the scroll position to the server
-
var scrollPositionMessenger = document.getElementById(this._ScrollPositionMessengerName);
-
if(scrollPositionMessenger != null)
-
{
-
//Error thrown here
-
scrollPositionMessenger.value=this._LeftScrollPosition;
-
}
-
-
}
Does anyone know how to get around this problem?
Thanks for your time,
-Frinny
Mar 16 '09
14 8471 Frinavale 9,735
Recognized Expert Moderator Expert
So, way back, when I was just learning about Ajax (thanks to this forum actually)... I used the XMLHttpRequest' s open() and send() methods to preform an Ajax call to the server. I had completely forgotten about these methods because I've been using the .NET Ajax Framework for some time now.
The send method takes an optional parameter: the entity body.
Urg, I think I know how to do this, but it's going to be really nasty.
Frinavale 9,735
Recognized Expert Moderator Expert
Thanks Acoder!
I have a solution to the problem. (I think) It involved modifying the parameter being set to the send() method by the .NET Ajax Framework.
In order to do this I had to implement a method that is executed during the PageRequestMana ger's initializeReque st event.
This method is passed 2 parameters: the sender, and the event arguments for the event.
The event arguments parameter is an InitializeReque stEventArgs Object. This object has a property that lets you retrieve the "request" Object.
The request object contains the body of the request which (I'm assuming) is sent as a parameter to the send() method. I was able to retrieve the body, modify the value for the hidden field in the body, and reset the request object's body with the changes.
Thanks a lot Acoder.
If it wasn't for you I would never have attempted any of this.
-Frinny
acoder 16,027
Recognized Expert Moderator MVP
I'm glad you got it working in the end. I don't know if this would be possible with ASP.NET Ajax, but I would've taken my first suggestion for an easier and simpler solution, i.e. set the hidden field just before the Ajax call.
Frinavale 9,735
Recognized Expert Moderator Expert
I was setting it before the Ajax call. I was setting it in the "onscroll" event....howeve r, this was crashing IE8. There may be another way to do this, but after days of trying to find a solution, I couldn't find one. The initializeReque st event was the only event that that I could use which occurred before the Ajax call...and at that point the request object is already created...so I had no choice but to edit the request body before the Ajax call is made.
acoder 16,027
Recognized Expert Moderator MVP
If that is indeed the case, then I'd consider it to be a flaw, i.e. that you can't call a function or add some code before an Ajax call.
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Will Atkinson |
last post by:
Hi All,
I'm a relative newbie to SQL Server, so please forgive me if this is a
daft question...
When I set "Show Execution Plan" on in Query Analyzer, and execute a
(fairly complex) sproc, I note that a particular query is reported as
having a query cost of "71% relative to the batch" - however, this is
nowhere near the slowest executing query in the batch - other queries
which take over twice as long are reported as having costs in...
|
by: Esben Rune Hansen |
last post by:
Hi
I am working on a PHP-script and need javascript to set the value of a
hidden field in a form. This field happens to be an entry in an array
data according to my example. How can I do this?
Below is listet two PHP-pages: one that doesn't work (to my dismay), and
another that does work, but do not use an array entry in the hidden field.
Thanks
|
by: gorella |
last post by:
Under tools in VS 2003, when I select "Connect to Database" or if I press the
icon under Server explorer, nothing happens. I've uninstalled and reinstalled
3 times.
I've reinstalled MDAC and still have the same problem.
I'm using VS 2003 under XP.
|
by: Bill Davidson |
last post by:
All:
I recently upgraded a VC++6 COM Server Exe project to VC++7.1 (w/ the latest
PSDK).
After a couple of minor hurdles, I got the project to compile and
self-register. Unfortunately, when I tried to call into the server from
either a VB6 or a VC6 test client, an error occurs at object creation time.
Looking at Task Manager, the server .Exe never actually launches.
|
by: Ravi J |
last post by:
I am trying to load Microsoft Word and create a document in ASP.NET (C#). But the call to application creation 'Word._Application app = new Word.ApplicationClass();' takes quit a bit of time, and eventually "Server Execution Failed" page appears.
"Exception Details: System.Runtime.InteropServices.COMException: Server execution failed
...
"
The same call inside a WIndows Form succeeds. But for some reason, in ASP.NET it doesn't.
Quick...
| |
by: Benton |
last post by:
Hi there,
I have a text box which will receive its value from a pop-up date picker.
The user should not be able to edit this field with the keyboard or mouse.
I am using ASP.NET. If I set the readonly property of the textbox to true,
it won't let the user change it and it can receive its value from the pop-op
calendar, just what I need. Problem is, after a postback, value is lost.
So I think Javascript may come to the rescue here. Is...
|
by: Mejmeyster |
last post by:
Hi Everyone,
I have a table in which one of the text fields has become too small (since it only holds 255 characters). To remedy that, I'm trying to change the data type of that field to "memo" in design mode. However, when I go to save the new settings of my table, the error message "Record is too large" pops up and won't allow me to save the table. What am I doing wrong? I work with Access 97 in Windows XP.
Thanks for your help!
|
by: Javilen |
last post by:
Hello,
edit: added some more info
I am trying to set up a job to run a SSIS package in SQL 2005, the SQL 2005 is installed on a Windows server 2003 machine.
start Edit
I have the Management studio (I am working from) installed on windows XP (fully up today with the SPs). I have the installed on this machine the integrated Services, I do not know if they have been installed on the Windows 2003 machine that has the DB.
end Edit
|
by: martin DH |
last post by:
I would definitely appreciate any help with this problem as soon as possible. Thanks!
I have a report that should display the results of a query based on two tables (tblClient and tblResult, linked by ClientID).
When trying to open the report I receive the following error: "Data Type Mismatch in Criteria Expression"
The report worked before, so as an experiment I created a new table with a structure identical to tblResult (so I...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
| |
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |