You are here: Re: Assigning Hidden fields using Javascript « HTML « IT news, forums, messages
Re: Assigning Hidden fields using Javascript

Posted by Jonathan N. Little on 09/05/05 16:10

allanrodkin@gmail.com wrote:
<snip stuff>

If I understand this corrrectly, if Perl generates this:
> Here are the hidden fields:
> $html .= qq`<input type="hidden" name="SGROUP" value="">`;
> $html .= qq`<input type="hidden" name="STYLE" value="">`;
<snip>

And with JavaScript your are setting the values here

> document.Allan.SGROUP.value = selectedSG;

<snip>

> At the end of the Perl script, I print the HTML and all the
> dynamic HTML has been generated, however SGROUP has "" value. Can
> anyone make sense of this?

And you are check the source code and notice the hidden fields are still
blank, well of course they would be. The HTML would only reflect what
was sent and generated by the webserver, i.e. the Perl script.
JavaScript runs on the client machine may change the field values but
you will not see it in the source. Only after the form is process will
your see the values in the receiving script.

Client-side JavaScript generated code is never seen in the View Source
of a browser, with one exception. Netscape 4.x would show JavaScript
generated code upon the initial loading of the page, not of course for
DHTML changes after the pages loaded.


Maybe I should ask, how are you checking if SGROUP values have been changed?

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация