Re: Client side changes not reflected in page
- From: patrickdrd <patrickdrd@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 1 Feb 2007 04:06:00 -0800
Well, ok, forget about the page's source,
my mistake mentioning this,
my real problem is that the variable show its 'original' value when
submitted to the server and not the one that javascript changed to!
Why isn't that variable/field 'refreshed'?
Do I need to do something (like a 'refresh')?
"Peter Bromberg [C# MVP]" wrote:
It seems to me that Bruce's response was quite explanatory, read it again for.
the answer.
Peter
--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net
"patrickdrd" wrote:
Yes, but when the page is posted back to the server,
the change that javascript made isn't recognized by the server code,
while the server recognizes changes made through user input,
it doesn't know changes made by javascript! Why?
"bruce barker" wrote:
view source shows what the server sent, not the current state of the
page. if javascript changed anything it is not reflected in the source.
for example view source of this page looks nothing like the rendered html:
<html>
<body>
<script>
for(var i=0; i< 100; ++i) document.write('hello ' + i + '<br>');
</script>
</body>
</html>
-- bruce (sqlwork.com)
patrickdrd wrote:
Hi everyone!
I have a hidden input field in a form which I change in some occasions on
the client using javascript,
but when I use "view source" I can't see these changes reflected on the page!
Does anyone know what I should do in order for the page to know the change?
(Tried with enableviewstate=false, true, whatever, didn't work)
I would like to have the change reflected in the page without doing a
postback or on the postback!
Is this possible? Thanks in advance!
- Follow-Ups:
- Re: Client side changes not reflected in page
- From: Mark Rae
- Re: Client side changes not reflected in page
- References:
- Re: Client side changes not reflected in page
- From: bruce barker
- Re: Client side changes not reflected in page
- Prev by Date: Re: DataList, repeatcolumns > 1 in flow layout
- Next by Date: Re: Dynamically change display while processing a button click.
- Previous by thread: Re: Client side changes not reflected in page
- Next by thread: Re: Client side changes not reflected in page
- Index(es):
Loading