473,395 Members | 1,975 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,395 software developers and data experts.

Help restore data from form fields in Internet Explorer

The user has come back to my page - and I have session data held in
hidden form fields that I want to restore.

Getting these values using Javascript works fine in Mozilla Firebird - and
the like - but there's a problem with Internet Explorer (6).

IE apparently fills in the form fields the way they were *after*
the page is loaded.

Executing Javascript while the page is loading gets the original
default values - not the ones left stored in the form fields when
the page was last exited :-|

I'm sure this must be a common issue - can any kind soul point me
to the best way to work around the problem?

Thanks in advance for any assistance!
--
__________
|im |yler http://timtyler.org/ ti*@tt1lock.org Remove lock to reply.
Jul 20 '05 #1
3 3757
I, Tim Tyler <ti*@tt1lock.org> wrote or quoted:
The user has come back to my page - and I have session data held in
hidden form fields that I want to restore.

Getting these values using Javascript works fine in Mozilla Firebird - and
the like - but there's a problem with Internet Explorer (6).

IE apparently fills in the form fields the way they were *after*
the page is loaded.

Executing Javascript while the page is loading gets the original
default values - not the ones left stored in the form fields when
the page was last exited :-|

I'm sure this must be a common issue - can any kind soul point me
to the best way to work around the problem?


<body onLoad="javascript:restore_state_from_form_fields( 'test');">

....is enough, it seems.
--
__________
|im |yler http://timtyler.org/ ti*@tt1lock.org Remove lock to reply.
Jul 20 '05 #2
Tim Tyler wrote:
<body onLoad="javascript:restore_state_from_form_fields( 'test');">

....is enough, it seems.


Remove the `javascript:', URIs are wrong here and a label is not needed
but will cause problems.

Instead, define the default scripting language in the `head' element:

<meta http-equiv="Content-Script-Type" content="text/javascript">
PointedEars

Jul 20 '05 #3
"Thomas 'PointedEars' Lahn" <Po*********@web.de> wrote in message
news:bo*************@ID-107532.news.uni-berlin.de...
<body onLoad="javascript:restore_state_from_form_fields( 'test');">

....is enough, it seems.


Remove the `javascript:', URIs are wrong here and a label is
not needed but will cause problems.

<snip>

I have never seen any evidence of the use of superfluous labels in the
internally generated event handling functions causing problems, unlike
the use of javascript: URIs in HREF attributes (which certainly do cause
undesirable side effects). Of course because IE would treat the
'javascript:' as an indicator of the type of script language to use for
the attribute code it would be inadvisable to use it as a label in that
context as the label would be missing form the generated function on IE,
but its inclusion does seem to be harmless when it is treated as a label
but never referred to as such.

I would not recommend prefixing event handling attribute string values
with 'javascript:' (assuming that JavaScript is the default (and/or
only) language anyway), but the worst I would say about it is that it is
an unnecessary 11 bytes of download that servers no practical purpose in
normal use and may blur the distinction between event handling
attributes and (the inadvisable use of) javascript: HREFs in the mind of
the code author.

Richard.
Jul 20 '05 #4

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

Similar topics

3
by: Nicolas Keller | last post by:
Hi! I'm used to have Mozilla for testing my PHP sites when I'm coding. The site's nearly finished, now I've made a test with the Internet Exlporer... guess what... failed. The problem: I'm...
3
by: John Dunlop | last post by:
(Note crosspost and follow-ups to ciwah.) Nicolas Keller wrote in thread "Differences in form handling btw Mozilla and IE?": > The problem: I'm using a form that submit's (POST) its data via...
1
by: McKirahan | last post by:
What is "active content"? My ASP page just returns HTML.... I have a page with an .htm extension that has a form whose action is an ASP page which generates a report after updating a database...
1
by: Jenny | last post by:
Need urgent help for an unsolved problem. In our ASP web application, we creat a Back button and if user click on this button, it execute history.go(-1) to go back to the previous page. All our...
8
by: Brian F | last post by:
Exactly what the subject says. I have an ASP page that I want my C# windows application to open in Internet Explorer, and if possible have it send along a list of values from a list box. Thank you.
2
by: Dnna | last post by:
I have a table which is bound to an Internet Explorer XML data island. I'm using ASP.NET's client-side validators for an input field in the table. The problem is that if the input fields are in...
4
by: kaosyeti | last post by:
hey... i know NOTHING about sql server, .net framework or probably anything else on sql monster. i am a novice access user, self-taught for about 9 months now and have only a basic understanding...
5
by: Olly | last post by:
Hello Everyone! Could someone please have a look at my JS Form I posted below....Something wrong there, but I don't understand what's exactly. Many thanks. Olly ...
10
by: James | last post by:
Hello, as this falls under both VB and PHP I have posted this into two newsgroups (this is the first time I've done this so if it is mucked up then I'm sorry). Anyway I want to make some simple...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
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...
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
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...
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...

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.