473,406 Members | 2,620 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,406 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 4343
dn
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.

D.
Sep 10 '07 #2
dn
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.
http://www.microsoft.com/downloads/d...displaylang=en
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
"Page_B_x.htm".

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
dn
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

debugger;

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...

http://www.ajaxhead.com/javascript/d...avascript.html

hth,

D.

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
you?

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

5
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...
4
by: hetnet | last post by:
Hello, How can i disabled a menuitem like " View => Source"??? -- Met vriendelijke groet, Rob van Westrop
18
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?
6
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...
0
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...
10
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...
2
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...
4
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...
1
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...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
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...
0
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...
0
tracyyun
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...
0
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,...
0
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...

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.