Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Form: action="" question

Reply
Thread Tools

Form: action="" question

 
 
floortje
Guest
Posts: n/a
 
      01-27-2004
Hi, I got a question. Im using a form on the page
index.php?do=blaat
<form name="imaniceform" method="post" action="">

Now when I push the send button I get directed to index.php?do=blaat again
wich is great for me.

The question that i have is if I can rely on this
- in internet explorer 5 and higher
- in most standard browsers (ie mozilla netscape etc, I dont care bout lynx
etc)

Floortje



 
Reply With Quote
 
 
 
 
Jukka K. Korpela
Guest
Posts: n/a
 
      01-28-2004
"floortje" <floortje->
wrote:

> Hi, I got a question.


Have you got a URL? Telling it would be more useful than saying the
obvious, especially since you've been spending your time in puking on
your From field to prevent us from even guess your site's URL.

> Im using a form on the page
> index.php?do=blaat


What "page" is that?

> <form name="imaniceform" method="post" action="">


Thats valid but incorrect markup. The action attribute takes a URL
value, and an empty string is not a URL.

> Now when I push the send button I get directed to
> index.php?do=blaat again wich is great for me.


Why don't you just use action="index.php" and include the field
<input type="hidden" name="do" value="blaat">?

> The question that i have is if I can rely on this
> - in internet explorer 5 and higher
> - in most standard browsers (ie mozilla netscape etc,


You are using incorrect markup, so the odds are against you. Not very
much in practice, but why would you do things the wrong way when
there's a simple way of doing them right? There might be something that
you not telling us, and maybe the URL would have revealed your not-so-
obvious reason for doing things the way you do.

> I dont care bout lynx etc)


Saying so is the usual way of telling that you have no idea of what
Lynx is, and not a good picture of the World Wide Web either.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html


 
Reply With Quote
 
 
 
 
Augustus
Guest
Posts: n/a
 
      01-28-2004

"floortje" <floortje-> wrote
in message news:4016f951$0$327$...
> Hi, I got a question. Im using a form on the page
> index.php?do=blaat
> <form name="imaniceform" method="post" action="">
>
> Now when I push the send button I get directed to index.php?do=blaat again
> wich is great for me.
>
> The question that i have is if I can rely on this
> - in internet explorer 5 and higher
> - in most standard browsers (ie mozilla netscape etc, I dont care bout

lynx
> etc)


why don't you just use:

<form name="imaniceform" method="post" action="index.php?do=blaat">

Or, if this form appears on different pages you could use PHP to find out
what page this is and insert the value for action="..."


 
Reply With Quote
 
Leif K-Brooks
Guest
Posts: n/a
 
      01-28-2004
floortje wrote:
> Hi, I got a question. Im using a form on the page
> index.php?do=blaat
> <form name="imaniceform" method="post" action="">
>
> Now when I push the send button I get directed to index.php?do=blaat again
> wich is great for me.
>
> The question that i have is if I can rely on this
> - in internet explorer 5 and higher
> - in most standard browsers (ie mozilla netscape etc, I dont care bout lynx
> etc)


No. Since you're using PHP, just put the $_SERVER['REQUEST_URI']
variable as the action instead.

 
Reply With Quote
 
Joel Shepherd
Guest
Posts: n/a
 
      01-28-2004
Augustus wrote:
>
> why don't you just use:
>
> <form name="imaniceform" method="post" action="index.php?do=blaat">


Server-side (CGI) support for mixing POSTs with GET-style URI
parameters is hit or miss. If the OP is going to POST the form,
he/she/it would be better off using a hidden field for the 'do'
parameter (as Jukka suggested).

--
Joel.

 
Reply With Quote
 
Augustus
Guest
Posts: n/a
 
      01-28-2004

"Joel Shepherd" <> wrote in message
newsyHRb.29760$ link.net...
> Augustus wrote:
> >
> > why don't you just use:
> >
> > <form name="imaniceform" method="post" action="index.php?do=blaat">

>
> Server-side (CGI) support for mixing POSTs with GET-style URI
> parameters is hit or miss. If the OP is going to POST the form,
> he/she/it would be better off using a hidden field for the 'do'
> parameter (as Jukka suggested).


You can't mix "method=get" with "get style" parameters in the action

If you had:
<form method="get" action="mypage.php?do=blaat">

then the "do=blaat" would be stripped when the form is submitted (the form
items replacing it in the querystring)

I think you are confusing that problem (mixing GET with GET) with mixing GET
and POST...

If the two didn't work together (mixing GET and POST) that would be a
serious flaw and weakness of the language




 
Reply With Quote
 
floortje
Guest
Posts: n/a
 
      01-28-2004
> > Hi, I got a question.
>
> Have you got a URL? Telling it would be more useful than saying the
> obvious, especially since you've been spending your time in puking on
> your From field to prevent us from even guess your site's URL.
>
> > Im using a form on the page
> > index.php?do=blaat

>
> What "page" is that?


Hehe just wanted to make the question as short as possible

The site is located at
http://www.haagseassurantieclub.nl/~...ster/index.php (Not finished
yet, when it's finished im moving it to a new site and ill protext the
directory.)

Youl will see nearly all the forms use action=""> and it works here. It's
not a big deal to update them with (another) hidden wariable, just wanted to
know whether this would work on other browsers cause it works on ie and it's
macromedia's default.

> > The question that i have is if I can rely on this
> > - in internet explorer 5 and higher
> > - in most standard browsers (ie mozilla netscape etc,

>
> You are using incorrect markup, so the odds are against you. Not very
> much in practice, but why would you do things the wrong way when
> there's a simple way of doing them right?


I dont, thats why I asked. I know I dont know all too much bout html. Im
more a programmer.

> There might be something that
> you not telling us, and maybe the URL would have revealed your not-so-
> obvious reason for doing things the way you do.


Hmm maybe uncontious

> > I dont care bout lynx etc)

>
> Saying so is the usual way of telling that you have no idea of what
> Lynx is, and not a good picture of the World Wide Web either.


Not really, Ive work with lynx alot but im 100% sure that none of the
webmasters ever will. They use internet explorer or netscape so I just need
to bother about them.

Floortje


 
Reply With Quote
 
Nico Schuyt
Guest
Posts: n/a
 
      01-28-2004
floortje wrote:
> http://www.haagseassurantieclub.nl/~...ster/index.php


> Youl will see nearly all the forms use action=""> and it works here.


Like Leif K-Brooks already mentioned: $_SERVER['REQUEST_URI']

> I dont, thats why I asked. I know I dont know all too much bout html.
> Im more a programmer.


Ehhh, then you should read a bit more about PHP and MySQL too
And the principles of programming and building a website in HTML/CSS are
about the same (applying valid code, version control, testing, debugging
etc)

>>> I dont care bout lynx etc)


How it looks in Lynx gives you a lot of information concerning
accessibility.
Unless it's an intranet application, accessibility is of increasing
importance.
Read the thread in "DrempelsWeg vrijblijvende publiciteitsstunt?" in
nl.internet.www.ontwerp

Cheers, Nico



 
Reply With Quote
 
Joel Shepherd
Guest
Posts: n/a
 
      01-28-2004
Augustus wrote:
> "Joel Shepherd" <> wrote:
>
>>Augustus wrote:
>>
>>>why don't you just use:
>>>
>>><form name="imaniceform" method="post" action="index.php?do=blaat">

>>
>>Server-side (CGI) support for mixing POSTs with GET-style URI
>>parameters is hit or miss.

>
> I think you are confusing that problem (mixing GET with GET) with mixing GET
> and POST...


I'm not.

> If the two didn't work together (mixing GET and POST) that would be a
> serious flaw and weakness of the language


Mixing GET and POST doesn't make a lot of sense: they imply two very
different modes of response by the server. One is cacheable, one is not.

Beyond that, not all server-side languages cope gracefully with
parameters being passed both in the URI (GET) and via the content
stream sent by POST. Combine at your own risk (well, that, and that of
your visitors).

--
Joel.

 
Reply With Quote
 
Jukka K. Korpela
Guest
Posts: n/a
 
      01-29-2004
"floortje" <floortje->
wrote:

>> > Im using a form on the page index.php?do=blaat

>>
>> What "page" is that?

>
> Hehe just wanted to make the question as short as possible


When you do that by omitting essential information, you are actually
making it as hard as possible to get help.

In other words, it's a good idea to make a question as short as
possible, but not shorter.

> The site is located at
> http://www.haagseassurantieclub.nl/~...ster/index.php

- -
> Youl will see nearly all the forms use action="">


No I don't. No form on that page. I think I will stop wasting my time
with a person who hasn't taken the advice already given and still does
not give relevant information about her or his problem.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
question row filter (more of sql query question) =?Utf-8?B?YW5kcmV3MDA3?= ASP .Net 2 10-06-2005 01:07 PM
Quick Question - Newby Question =?Utf-8?B?UnlhbiBTbWl0aA==?= ASP .Net 4 02-16-2005 11:59 AM
Question on Transcender Question :-) eddiec MCSE 6 05-20-2004 06:59 AM
Question re: features of the 831 router (also a 924 question) Wayne Cisco 0 03-02-2004 07:57 PM
Syntax Question - Novice Question sean ASP .Net 1 10-20-2003 12:18 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57