473,795 Members | 2,914 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Capturing the content/state of the HTML Page along with the changes

Hi...,

We have a pretty huge form where the user/support spends more than
6 minutes. Now, behind the scenes, I wanted to capture the outerHTML
data & send it to a different URL to save it in draft.

Now there is no outerHTML in Firefox. secondly even innerHTML is
different for IE & Firefox as in IE the updates I do to the text field
are now visible in the innerHTML text but the changes are not visible
when I run the javascript in Firefox.

For eg. if there is a Text Box which alreay has value "100" & I change
it to "1000". The innerHTML o/p in IE shows the value "1000" correctly
where as in Firefox it shows "100".

My main intention is to capture the current HTML state (along with the
changes) and post it to a different URL while the user is filling the
current form.

How do I achieve it,?

Regards,

Praveen

Jan 10 '07 #1
1 1705
wrote on 10 jan 2007 in comp.lang.javas cript:
Hi...,

We have a pretty huge form where the user/support spends more than
6 minutes. Now, behind the scenes, I wanted to capture the outerHTML
data & send it to a different URL to save it in draft.

Now there is no outerHTML in Firefox.
The outer element's innerHTML can be the inner's the outer one, methinks.
secondly even innerHTML is
different for IE & Firefox as in IE the updates I do to the text field
are now visible in the innerHTML text but the changes are not visible
when I run the javascript in Firefox.

For eg. if there is a Text Box which alreay has value "100" & I change
it to "1000". The innerHTML o/p in IE shows the value "1000" correctly
where as in Firefox it shows "100".

My main intention is to capture the current HTML state (along with the
changes) and post it to a different URL while the user is filling the
current form.
That seeme a bad idea, Praveen.

Do not expect different browsers to act the same while building the DOM
tree from the same html source.

All you need is the form's input content,
because the html is already known to you.

So why not use the DOM to collect that content and send it to the other
server using XMLHTTP.

You could do that, say, every 10 seconds or so.

=============== =============== =======

Something like [not tested, just an idea, read as pseudocode]:

var z = '';
var coll = document.forms[0].getElementsByt agName('input') ;
for (i in coll)
z += coll[i].name + ':' + coll[i].value.replace(/[:;]/g,'?') + ';'

var http = new ActiveXObject(" Microsoft.XMLHT TP");
// do the good thing for FF too here [like new XMLHttpRequest( );]
http.open("POST ", "http://....", true[?]);
http.setRequest Header("Content-Type", ....... );
http.send(z);
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jan 11 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
3230
by: jonathan.beckett | last post by:
Hi All, For the past few months I have been working on an open source Apache/PHP/MySQL content management system - and have recently made it available for download. It's still very much a work in progress (current release version is 0.4.6), but you should get a very good idea of what it's about by visiting the site (which uses it, funnily enough), or downloading a copy of it and trying it out.
0
2327
by: jonathan.beckett | last post by:
Hi All, I have just made version 0.4.8 of the PluggedOut CMS Content Management System available for download - it's free, and covered by the GPL. It's still very much a work in progress (current release version is 0.4.8), but you should get a very good idea of what it's about by visiting the site (which uses it, funnily enough), or downloading a copy of it and trying it out.
1
2982
by: Rick Strahl [MVP] | last post by:
I often have the need to run templates that perform the equivalent of a mail merge as part of the processing for another page. For example, I have an invoice display page in my admin module and hten need to send a prepared message (such as a declined order email) to the invoicee, which consists of a merge letter. Server.Transfer() doesn't do the trick, as it leaves the current page and doesn't return. I could do this but this is quite a...
4
1424
by: Steve Wolfie | last post by:
Hello all: Again, let me thank everyone who has helped in the past. Can't wait till I can help out with some advice of my own. Now, I am building an app that wishes to retrieve the output of Google Desktop. It is very simple, I wish to send an http request asking for the results in XML. ( by adding &format=xml to the end of the url) i would like to capture the response from the Google Desktop server, (on the local machine) and save...
7
370
by: Water Cooler v2 | last post by:
I know what it is, and yet the knowledge of what a CMS is, is so vague that I find myself asking this question every now and then. I've googled and read the resources too. However, the knowledge is still not clear. It is so vague. Me: Just what is a content management system? Myself: A place where content can be stored.
0
2116
by: Managed Code | last post by:
Hello All, Here is my issue and thanks in advance for any assistance. I have a base page with a dropdownlist that fires an event with the selected index. The content page catches the event and sets a connection string to the database. The content page has a simple gridview that should show records from the selected database. Initial content page displays data from correct place. first change of dropdownlist correctly updates content...
4
1588
by: miha.vitorovic | last post by:
Hi all. I know this is more of a DOM question, but here it goes: Browser == Firefox suppose I have two frames. One has many links and is opening pages in the other one. I would like to check if the page is finished loading. This is the example of the "links" frame. ----
9
2986
by: pbd22 | last post by:
Hi. This is just a disaster management question. I am using XMLHTTP for the dynamic loading of content in a very crucial area of my web site. Same as an IFrame, but using XMLHTTP and a DIV. I got the core of the javascript from here: http://www.dynamicdrive.com/dynamicindex17/ajaxcontent.htm I noticed in the demo that sometimes the content takes a long
2
6975
by: pankajsingh5k | last post by:
Dear All, Please help me... I had read an article to lazy load a tab in a tabcontainer using an update panel on http://mattberseth.com/blog/2007/07/how_to_lazyload_tabpanels_with.html and i am implementing it in my website....
0
9522
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10217
jinu1996
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...
1
10167
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,...
0
9046
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7544
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6784
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();...
0
5440
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...
1
4114
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
3
2922
bsmnconsultancy
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...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.