I have long thought there is something missing with HTML forms, in that
there should be a provision for a form with hidden input fields, with the
whole form being hidden, in particular with no submit button that requires
clicking.
I have a form that, when processed by a Perl CGI script, sends back a
'Thankyou' message to the user, and I then want to tell the user that in a
few seconds he will be taken to the next stage of the process, using a
'<meta http-equiv="Refresh" content="5;
url=http://www.mydomain.com/cgi-bin/myscript.pl\">' tag to do it. But I'm
perplexed as to how to incorporate a 'hidden' form into this process, i.e.
one that will have hidden input fields and no submit button. I have been
experimenting by modifying this tag to '<meta http-equiv="Refresh"
content="5; onLoad="myscript.submit();">' with 'onsubmit="return v.exec()"'
added to the form declaration tag, and I have also tried using other
'onChange' , 'onBlur', and other Javascript event-handling attributes in
place of 'onLoad', the aim being to force a 'hidden' form to be submitted
when the page is refreshed. But nothing seems to work.
Any ideas anyone? 6 1836
Graham wrote:
I have long thought there is something missing with HTML forms, in that
there should be a provision for a form with hidden input fields, with the
whole form being hidden, in particular with no submit button that
requires clicking.
And what should this be good for?
I have a form that, when processed by a Perl CGI script, sends back a
'Thankyou' message to the user, and I then want to tell the user that in
a few seconds he will be taken to the next stage of the process, using a
'<meta http-equiv="Refresh" content="5;
url=http://www.mydomain.com/cgi-bin/myscript.pl\">' tag to do it.
Don't patronize your users. If they navigate away, it should be because of
their choice. Besides, meta-refreshs don't work always and everywhere.
But I'm perplexed as to how to incorporate a 'hidden' form into this
process, i.e. one that will have hidden input fields and no submit
button.
Again, I don't see the purpose of this.
I have been experimenting by modifying this tag to '<meta
http-equiv="Refresh" content="5; onLoad="myscript.submit();">' with
'onsubmit="return v.exec()"'
One wonders what you think `myscript' and `v' would be in the first place,
and what their submit() and exec() methods would do. That aside, it stands
to reason already that `meta' elements, being non-interactive elements,
don't have event-handler attributes; prose and DTDs of the current HTML
Specification confirm it then.
<http://validator.w3.org/>
added to the form declaration tag, and I have also tried using other
'onChange' , 'onBlur', and other Javascript event-handling attributes in
place of 'onLoad',
There is no such thing, event-handler attributes are language-independent.
And it is best to write them lowercase.
the aim being to force a 'hidden' form to be submitted when the page is
refreshed. But nothing seems to work.
Fantasy coding seldom yields viable results. RTFM.
Any ideas anyone?
State what you want to accomplish and why, not only what you tried to make
it work.
PointedEars
--
realism: HTML 4.01 Strict
evangelism: XHTML 1.0 Strict
madness: XHTML 1.1 as application/xhtml+xml
-- Bjoern Hoehrmann
Snipping below
"Thomas 'PointedEars' Lahn" <Po*********@web.dewrote in message
news:49**************@PointedEars.de...
Graham wrote:
>I have long thought there is something missing with HTML forms, in that there should be a provision for a form with hidden input fields, with the whole form being hidden, in particular with no submit button that requires clicking.
And what should this be good for?
Two reasons - 1 - less work for the user - why force him to click on a
submit button when he shoudn't have to? - 2 - reduces the chances him not
completing the process if you simply take him where he he has to go
>
>I have a form that, when processed by a Perl CGI script, sends back a 'Thankyou' message to the user, and I then want to tell the user that in a few seconds he will be taken to the next stage of the process, using a '<meta http-equiv="Refresh" content="5; url=http://www.mydomain.com/cgi-bin/myscript.pl\">' tag to do it.
Don't patronize your users. If they navigate away, it should be because
of
their choice. Besides, meta-refreshs don't work always and everywhere.
I'm not giving them a choice here - there is only one way to go - I just
want to make it easier for them
>
>But I'm perplexed as to how to incorporate a 'hidden' form into this process, i.e. one that will have hidden input fields and no submit button.
Again, I don't see the purpose of this.
You may not, but I have often encountered the need to maintain state when a
form is not really relevant. In fact I'd go further and say that it would be
great if there was a way to maintain state when simply hyperlinking from one
page to another.
>
>I have been experimenting by modifying this tag to '<meta http-equiv="Refresh" content="5; onLoad="myscript.submit();">' with 'onsubmit="return v.exec()"'
One wonders what you think `myscript' and `v' would be in the first place,
and what their submit() and exec() methods would do. That aside, it
stands
to reason already that `meta' elements, being non-interactive elements,
don't have event-handler attributes; prose and DTDs of the current HTML
Specification confirm it then.
<http://validator.w3.org/>
>added to the form declaration tag, and I have also tried using other 'onChange' , 'onBlur', and other Javascript event-handling attributes in place of 'onLoad',
There is no such thing, event-handler attributes are language-independent.
And it is best to write them lowercase.
>the aim being to force a 'hidden' form to be submitted when the page is refreshed. But nothing seems to work.
Fantasy coding seldom yields viable results. RTFM.
I would freely admit that, unlike my html and Perl skills, my Javascript
skills are very weak. That's why I am seeking advice.
>
>Any ideas anyone?
State what you want to accomplish and why, not only what you tried to make
it work.
Isn't that what I've done?
>
PointedEars
--
realism: HTML 4.01 Strict
evangelism: XHTML 1.0 Strict
madness: XHTML 1.1 as application/xhtml+xml
-- Bjoern Hoehrmann
Graham wrote:
Snipping below
If only you did.
"Thomas 'PointedEars' Lahn" wrote [...]:
>Graham wrote:
>>I have long thought there is something missing with HTML forms, in that there should be a provision for a form with hidden input fields, with the whole form being hidden, in particular with no submit button that requires clicking.
And what should this be good for?
Two reasons - 1 - less work for the user - why force him to click on a
submit button when he shoudn't have to? - 2 - reduces the chances him not
completing the process if you simply take him where he he has to go
I am not buying it. Chances are that you want to submit data without the
user knowing about it, which is a Bad Thing.
>>I have a form that, when processed by a Perl CGI script, sends back a 'Thankyou' message to the user, and I then want to tell the user that in a few seconds he will be taken to the next stage of the process, using a '<meta http-equiv="Refresh" content="5; url=http://www.mydomain.com/cgi-bin/myscript.pl\">' tag to do it.
Don't patronize your users. If they navigate away, it should be because of their choice. Besides, meta-refreshs don't work always and everywhere.
I'm not giving them a choice here - there is only one way to go - I just
want to make it easier for them
Again, I'm not buying it. The "Thank you" can and should be placed in the
document that you don't need to redirect to anymore then.
>>But I'm perplexed as to how to incorporate a 'hidden' form into this process, i.e. one that will have hidden input fields and no submit button.
Again, I don't see the purpose of this.
You may not, but I have often encountered the need to maintain state when
a form is not really relevant.
Don't use a form then.
In fact I'd go further and say that it would be great if there was a way
to maintain state when simply hyperlinking from one page to another.
That wheel has been invented already and is called a session, which can be
maintained both client-side and server-side. You don't need the workaround
of hidden forms for it.
>>the aim being to force a 'hidden' form to be submitted when the page is refreshed. But nothing seems to work.
Fantasy coding seldom yields viable results. RTFM.
I would freely admit that, unlike my html and Perl skills, my Javascript
skills are very weak. That's why I am seeking advice.
That's why you should RTFM first because without basic knowledge you are
unlikely to understand the answers here and only waste everybody's (free-)time.
>>Any ideas anyone?
State what you want to accomplish and why, not only what you tried to make it work.
Isn't that what I've done?
Yes, it was not. You also have to learn how to quote properly.
<http://jibbering.com/faq/>
PointedEars
--
var bugRiddenCrashPronePieceOfJunk = (
navigator.userAgent.indexOf('MSIE 5') != -1
&& navigator.userAgent.indexOf('Mac') != -1
) // Plone, register_function.js:16
Well it looks like I need to mug up on 'sessions' (although it was hard work
getting there). Many thanks anyway!
"Thomas 'PointedEars' Lahn" <Po*********@web.dewrote in message
news:49**************@PointedEars.de...
Graham wrote:
>Snipping below
If only you did.
>"Thomas 'PointedEars' Lahn" wrote [...]:
>>Graham wrote: I have long thought there is something missing with HTML forms, in that there should be a provision for a form with hidden input fields, with the whole form being hidden, in particular with no submit button that requires clicking. And what should this be good for?
Two reasons - 1 - less work for the user - why force him to click on a submit button when he shoudn't have to? - 2 - reduces the chances him not completing the process if you simply take him where he he has to go
I am not buying it. Chances are that you want to submit data without the
user knowing about it, which is a Bad Thing.
>>>I have a form that, when processed by a Perl CGI script, sends back a 'Thankyou' message to the user, and I then want to tell the user that in a few seconds he will be taken to the next stage of the process, using a '<meta http-equiv="Refresh" content="5; url=http://www.mydomain.com/cgi-bin/myscript.pl\">' tag to do it. Don't patronize your users. If they navigate away, it should be because of their choice. Besides, meta-refreshs don't work always and everywhere.
I'm not giving them a choice here - there is only one way to go - I just want to make it easier for them
Again, I'm not buying it. The "Thank you" can and should be placed in the
document that you don't need to redirect to anymore then.
>>>But I'm perplexed as to how to incorporate a 'hidden' form into this process, i.e. one that will have hidden input fields and no submit button. Again, I don't see the purpose of this.
You may not, but I have often encountered the need to maintain state when a form is not really relevant.
Don't use a form then.
>In fact I'd go further and say that it would be great if there was a way to maintain state when simply hyperlinking from one page to another.
That wheel has been invented already and is called a session, which can be
maintained both client-side and server-side. You don't need the
workaround
of hidden forms for it.
>>>the aim being to force a 'hidden' form to be submitted when the page is refreshed. But nothing seems to work. Fantasy coding seldom yields viable results. RTFM.
I would freely admit that, unlike my html and Perl skills, my Javascript skills are very weak. That's why I am seeking advice.
That's why you should RTFM first because without basic knowledge you are
unlikely to understand the answers here and only waste everybody's
(free-)time.
>>>Any ideas anyone? State what you want to accomplish and why, not only what you tried to make it work.
Isn't that what I've done?
Yes, it was not. You also have to learn how to quote properly.
<http://jibbering.com/faq/>
PointedEars
--
var bugRiddenCrashPronePieceOfJunk = (
navigator.userAgent.indexOf('MSIE 5') != -1
&& navigator.userAgent.indexOf('Mac') != -1
) // Plone, register_function.js:16
Graham wrote:
Well it looks like I need to mug up on 'sessions' (although it was hard
work getting there).
Good advice is seldom cheap.
Many thanks anyway!
You are welcome.
[Top post]
Please don't.
PointedEars
--
Prototype.js was written by people who don't know javascript for people
who don't know javascript. People who don't know javascript are not
the best source of advice on designing systems that use javascript.
-- Richard Cornford, cljs, <f8*******************@news.demon.co.uk>
"Thomas 'PointedEars' Lahn" <Po*********@web.dewrote in message
news:49**************@PointedEars.de...
Graham wrote:
>Well it looks like I need to mug up on 'sessions' (although it was hard work getting there).
Good advice is seldom cheap.
Agreed. I have now passed what I wanted to pass (an ID number) as part of a
query string. I add a 4 digit random number in front of the ID number, and a
3 digit randon number at the end of it, encode it before passing, then
decode and strip out the 7 digits within the scriipt I am passing to. Not
quite a session I know, but another skill mastered!
>
>Many thanks anyway!
And again!
>
You are welcome.
>[Top post]
Please don't.
I hope I am now posting to your satisfaction
Graham
(if you want a job done, give it too a busy man)
>
PointedEars
--
Prototype.js was written by people who don't know javascript for people
who don't know javascript. People who don't know javascript are not
the best source of advice on designing systems that use javascript.
-- Richard Cornford, cljs, <f8*******************@news.demon.co.uk>
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Craig Anderson |
last post by:
Can anyone tell me the best way to access a hidden object in a form? I
could use a hard-coded index to the elements of the form, but it's too
easy to add something before the hidden object and mess...
|
by: Itai |
last post by:
I have an aspx file named index.aspx which contains two ‘form'
sections, one that has the runat=server attribute (e.g From1) and one
which is a regular HTML form (e.g SignInForm).
I am trying...
|
by: sshuangw |
last post by:
Hello:
I am encountering a very weird issue with MDI child, Overriden WndProc
function and hidden form.
Basically, the application has two forms, Form1(parent form),
Form2(Child form),...
|
by: Andrew Wrigley |
last post by:
Hi
Should a hidden form become visible when all other forms are closed?
This is what happens, and to ensure that it is always hidden, I have
to set the on got focus event handler of the form...
|
by: Özden Irmak |
last post by:
Hello,
In my VB.Net application I create a new instance of my form like :
NewForm = new MyNewForm()
But with this line, this new form is automatically shown. I want it to be
hidden at the...
|
by: Microsoft_Public |
last post by:
All I'm getting is <null>......
I have a legacy input form that I must maintain for a few more months until
the balance of the site can be converted to .Net.
I need the one database field to...
|
by: simora |
last post by:
Hi:
Need some working sample code to post hidden form data from a php page
to a new popup window. 540 x 500 centered. The popup that I'm calling
already is formatted and has a TITLE:web-2007.php...
|
by: Dilip |
last post by:
Hi All
I have a server based C# console application. This application must
hide its console window when its launched out on the field. So I
dutifully P/Invoke'd FindWindow/ShowWindow...
|
by: =?Utf-8?B?Z2luYWNyZXNzZQ==?= |
last post by:
I am trying to close/dispose multiple instances of a form but because they
are modal and hidden, they do not show up in My.Application.OpenForms. They
must be modal, so making them modeless is not...
|
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: 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,...
|
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...
|
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: 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,...
|
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...
| |