473,946 Members | 19,415 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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:\ww w.myPage.com\cg i-bin\DoDefault">
....
</form>

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

Martin
Jul 20 '05 #1
4 5041
mr****@compik.f d.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:\ww w.myPage.com\cg i-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:\ww w.myPage.com\cg i-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**********@la chy.id.au.updat e.virus.scanners

Remove .update.virus.s canners 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:\ww w.myPage.com\cg i-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:\ww w.myPage.com\cg i-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
2071
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 partly, from a snipet I found in the user contributions to the "str_replace" function in the manual on php.net. However there is a small problem - it only works in uppercase. Please first see my code below and then a brief description of the problem:
4
2179
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 Object" error. Each subsuquent form created by the code after that works perfectly. Why is it that the first form, generated with exactly the same block of code, fails? Code Block: See ****** for form generation Function DisplayExisting()
11
4757
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 create content to put at the address pointed to by f. In particular, I'd like to avoid/replace the memcpy line. Possible application (inspired by Paul Graham, "ANSI Common Lisp",
0
2150
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. After looking at the use of the OutputCache directive and tinkering with it a bit I found its usability.very limited. Think of it: it is okay for static content. Well that's nice but no big deal. Static content is cheap anyway, the file system...
4
3330
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 for the controls and not for the form itself. What I am trying to achieve is to create an entire form (including controls)
0
1502
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)): Can anyone make any suggestions on how to do it ? Thanks
15
2093
by: Nospam | last post by:
Is there a tutorial on dynamic SID generation?
7
2387
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. Suppose I have a table,items in a database: itemid description count So, basically, I want to create an image that has 3 ovals, representing the top 3 occurring items (with the highest count) in
0
1384
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 behaviors are subclasses of the Leaf class, which is in turn a subclass of the Behavior class. I want to keep the Behavior and Leaf objects in the main program but generate the individual behaviors (e.g. Wander) in shared object files so I can load the...
0
10162
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9981
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11566
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10688
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9886
agi2029
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
8253
isladogs
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7427
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
6112
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
6331
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.