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

Dynamic generation of action string?

Hi,
I have a HTML form and need to generate the action-string (what to do
after submission) from values of textfields in the form. It means
something like
<form method="post" action=whatToDo.value>
<input name="whatToDo" value="http:\www.myPage.com\cgi-bin\DoDefault">
....
</form>

It seems some error is there - don't you know how to make it
functional?

Martin
Jul 20 '05 #1
4 5017
mr****@compik.fd.cvut.cz (Martin Mrazek) wrote:
I have a HTML form and need to generate the action-string (what to do
after submission) from values of textfields in the form. It means
something like

<form method="post" action=whatToDo.value>
<input name="whatToDo" value="http:\www.myPage.com\cgi-bin\DoDefault">
...
</form>

It seems some error is there - don't you know how to make it
functional?


You could do it with JavaScript, but a better idea (i.e. one that will
always work) would be to submit to a single script on that server and
have that script exmaine the relevant input and pass the rest of the
inputs onto the relevant other scripts.

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <st***@pugh.net> <http://steve.pugh.net/>
Jul 20 '05 #2
Martin Mrazek wrote:
Hi,
I have a HTML form and need to generate the action-string (what to do
after submission) from values of textfields in the form. It means
something like
<form method="post" action=whatToDo.value>
<input name="whatToDo" value="http:\www.myPage.com\cgi-bin\DoDefault">
...
</form>


You could do it with JavaScript, but this would not work for anyone
with JavaScript disabled or not supported, however this was somewhat
discussed on www-html last February, in the thread "Multiple actions for
forms" [1]. The first response to this, by Mark Birbeck [2], mentioned
that XForms will be able to fulfill this functionality. However, until
XForms is widely implemented in the core functionality (ie. not
requiring a plugin that most people don't have) in the vast majority of,
at least, the popular UAs, then you'll have you use server side processing.

[1] http://lists.w3.org/Archives/Public/...4Feb/0004.html
[2] http://lists.w3.org/Archives/Public/...4Feb/0005.html
--
Lachlan Hunt
http://www.lachy.id.au/
la**********@lachy.id.au.update.virus.scanners

Remove .update.virus.scanners to email me,
NO SPAM and NO VIRUSES!!!
Jul 20 '05 #3
On Sun, 6 Jun 2004, Martin Mrazek wrote:
I have a HTML form and need to generate the action-string (what to do
after submission) from values of textfields in the form.
I'd recommend reviewing that supposed "need", because the WWW isn't
ready to fulfil it for you. Why can't you handle all the requests
with a single server-side script, and resolve any further details
behind that? It's the usual way that people successfully address this
kind of requirement.
It means something like

<form method="post" action=whatToDo.value>
<input name="whatToDo" value="http:\www.myPage.com\cgi-bin\DoDefault">


Does it, really? If your own bogosity alarms don't trigger on seeing
backslashes in an http: URL, then there seems to be a problem.
Jul 20 '05 #4
On Sun, 6 Jun 2004, Martin Mrazek wrote:
I have a HTML form and need to generate the action-string (what to do
after submission) from values of textfields in the form. It means
something like
<form method="post" action=whatToDo.value>
<input name="whatToDo" value="http:\www.myPage.com\cgi-bin\DoDefault"> ^
I don't know if that was a typo - should be "http://www.myPage.com/cgi-...."
Only 1 slash and of the wrong type.
...
</form>

It seems some error is there - don't you know how to make it
functional?

Jul 20 '05 #5

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

Similar topics

1
by: duncan.lovett | last post by:
I am working on a graphical heading generator for a clients website as their server does not have the GD library or similar plugins for dynamic image generation. I have achieved the result...
4
by: Tim Pascoe | last post by:
I am using ASP to dynamically generate a series of forms. When the page is loaded, everything appears to be correct, except that the first form generated fails with a "FormName is Null or not an...
11
by: Marco Loskamp | last post by:
Dear list, I'm trying to dynamically generate functions; it seems that what I really want is beyond C itself, but I'd like to be confirmed here. In the minimal example below, I'd like to...
0
by: Martin | last post by:
Hi. I had a very frustrating afternoon and evening but I have got it all under control now so all of a sudden I am in a good mood. I want to share some insights on output caching with you lot. ...
4
by: Venus | last post by:
Hello, Thanks for your reply. I understand that a control can be created dynamically in several ways: 1) using StringBuilder 2) using Controls.Add 3) using ASP PlaceHolder But this is just...
0
by: Venus | last post by:
Hello, After trying some ways to do it I wanted to use something like the code below but for some reason is not working (I have to generate the entire form dynamically (not only the controls)):...
15
by: Nospam | last post by:
Is there a tutorial on dynamic SID generation?
7
by: dino d. | last post by:
Hi- I want to create a dynamic image with areas so that when the user clicks different areas, the user jumps to those pages. The problem is, I can't seem to figure out how to do this efficiently....
0
by: daylond | last post by:
I'm developing a robot control architecture, and am trying to maximize platform independence (robot hardware, not OS) by generating my individual behaviors as dynamic libraries. The individual...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...
0
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
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: 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
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
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...

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.