473,382 Members | 1,225 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

problem with innerhtml and IE "view source" - need help please

I found a problem with my application when using "innerhtml" to
replace the content from the server after making an ajax call. The
display is perfectly correct, but when I use "view source" on the
browser, I found the "source" is still the old content the same as
before I replaced them with the "innerhtml". This causes some problem
with my other dynamic links based on the content of the page as they
pull the old content instead of the new content. I wonder if anyone
knows why and how to resolve it? Any input is appreciated very much.
Thanks in advance, Jane

Sep 10 '07 #1
6 4341
Thanks for the response. Is there anyway I can replace the source with
the current DOM tree?
Add the statement "debugger;" anywhere in your code... that will activate real time debugging and you'll be able to see
whats going on at that spot in the code.

Then... Use Firefox if you can... theres an Addon called Firebug. Get it! Learn how to use it. You'll never forget
the moment which that single addon changed so much in your web programming life.

Sep 10 '07 #2
also, theres an addin for IE called Internet explorer web developer toolbar. It's essentially the same thing for IE
with significantly less functionality, but what it does have will be enough I believe.
Sep 10 '07 #3
Sorry for the confusion. Actually, I don't really care about how the
source look like. What really bothers me is that my dynamic array did
not get to set to the value of the new content, even the array
assignment session is within the "innerhtml" block:

urlArray[x] = Page_B_x.htm;

<a href=urlArray[x]>New Page</a>

-it looks like the html that I rendered from the "innerhtml" has the
correct "urlArray[x] = Page_C_x.htm;" on it:

~~~~~~~~ new content in the memory ~~~~~~~
urlArray[x] = Page_C_x.htm;

<a href=urlArray[x]>New Page</a>

But when I click on the "New Page", it did not pick up the correct
urlArray[x] value which was still staying in the old content of

BTW, out application is only running on IE, for the limitation,
Firefox is not an option.

Any clue? Thanks in advance.

Sep 10 '07 #4
jluo wrote:
urlArray[x] = Page_B_x.htm;

<a href=urlArray[x]>New Page</a>
~~~~~~~~ new content in the memory ~~~~~~~
urlArray[x] = Page_C_x.htm;

<a href=urlArray[x]>New Page</a>
ok... so... I've never seen code like this

<a href=urlArray[x]>

so I'm at a loss unless thats some kind of pseudo-code.

Anyway... Do you have MSOffice Installed? FULLY?

If so you can set up the machine to stop at the


statement and then watch it run inside the MSE7.exe
(which is the Microsoft Script Editor for Office2k3)

You will have access to locals, call stack etc...

Make sure IE is set up to allow debugging ...
Tools - Internet Options - Advanced [tab]
uncheck disable script debugging (both of them)
check display a notification about every script error.
If the debugger statement fails to fire and give you the ability
to watch the code, then uncheck the display notification check,
and try it again after opening a new browser instance.

If you can get the processID of IE then you can attach the
debugger to the running process

C:\Program Files\Common Files\Microsoft Shared\VS7DEBUG>vs7jit -p XXXX

where XXXX is the processID

To check the JIT settings :
C:\Program Files\Common Files\Microsoft Shared\VS7DEBUG>MDM /dumpjit

and some more help from the web...




Sep 11 '07 #5
jluo <ja********@gmail.comwrote:
Page A1 -- new content after using "innerhtml", the same url_dynamic
within the block that content been replaced, should contain: (at least
the response text from the server looks like to contain the correct
content for the urlArray[x])
I don't understand your confused description of what you are doing, but one
question I have: you do realise that Javascript is case sensitive don't

Assiging to an attribute called "innerhtml" will simply create an attribute
of that name, it won't have any other effect.
Sep 11 '07 #6
Thanks all for the help. I found a solution for it. I guess I had
expected too much from the simple "innerhtml". Martin and Duncan gave
me a good hint that this call does not relocate memory for anything.
It only works for presenting the content on the browser but not
"storing" it for further use. Just a snap shot of the content. Really
appreciate for all the inputs! DN, I'll try your way of debugging in
future if anything is really bad. I'm not a javascript developer, so
very out in using any native tools. Thanks again for all the help.
Sep 11 '07 #7

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

Similar topics

by: Phil Powell | last post by:
I'm sorry but I can't figure out how to explain this any better than this. In PHP we have a command "require()" that obtains a file and logically places it into another file. I cannot figure...
by: hetnet | last post by:
Hello, How can i disabled a menuitem like " View => Source"??? -- Met vriendelijke groet, Rob van Westrop
by: Lorem Ipsum | last post by:
interesting! I just found a page in which Explorer's View Source does nothing! How did they do that?
by: gizmo | last post by:
I have a requirement to initiate more than one instance of an application using the filenames. (the example below will start two instances of MS Word). My problem is that I need to kill each...
by: saraDotNet | last post by:
hi everybody , I'm a beginner student in vb.net,and I'm working on a very small project as a homework,and I've some questions which I ought to search for their solutions via any source . My...
by: Wildemar Wildenburger | last post by:
Hi there :) I don't know how else to call what I'm currently implementing: An object that behaves like a list but doesn't store it's own items but rather pulls them from a larger list (if they...
by: Phaiz | last post by:
Not sure if you'd need an activex control but I'm looking for a script to change the folder view to "Classic View" within IE. I have an iframe that loads the users My Documents folder and would...
by: marcnz | last post by:
Hi, I am working for a company which as a MS SQL backend and Access as front end. We update automatically each access db on the user local machine when a new feature has become available. We...
by: nagaraj | last post by:
In Dev C++, we tried to compile a application, but it will throw some peculiar error. please find it below "path/main.cpp expected `]' before ';' token" and the source code is "DWORD rtec_Stack...
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.