Form: action="" question

Discussion in 'HTML' started by floortje, Jan 27, 2004.

  1. floortje

    floortje Guest

    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
     
    floortje, Jan 27, 2004
    #1
    1. Advertising

  2. "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
     
    Jukka K. Korpela, Jan 28, 2004
    #2
    1. Advertising

  3. floortje

    Augustus Guest

    Re: action="" question

    "floortje" <> wrote
    in message news:4016f951$0$327$4all.nl...
    > 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="..."
     
    Augustus, Jan 28, 2004
    #3
  4. 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.
     
    Leif K-Brooks, Jan 28, 2004
    #4
  5. Re: action="" question

    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.
     
    Joel Shepherd, Jan 28, 2004
    #5
  6. floortje

    Augustus Guest

    Re: action="" question

    "Joel Shepherd" <> wrote in message
    news:eek:yHRb.29760$...
    > 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
     
    Augustus, Jan 28, 2004
    #6
  7. floortje

    floortje Guest

    > > 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/~fidipe/Webmaster/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
     
    floortje, Jan 28, 2004
    #7
  8. floortje

    Nico Schuyt Guest

    floortje wrote:
    > http://www.haagseassurantieclub.nl/~fidipe/Webmaster/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
     
    Nico Schuyt, Jan 28, 2004
    #8
  9. Re: action="" question

    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.
     
    Joel Shepherd, Jan 28, 2004
    #9
  10. "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/~fidipe/Webmaster/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
     
    Jukka K. Korpela, Jan 29, 2004
    #10
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Joe Bloggs
    Replies:
    1
    Views:
    980
    Sudsy
    Aug 3, 2003
  2. rjweytens
    Replies:
    6
    Views:
    16,346
    rjweytens
    Jun 25, 2004
  3. runescience

    Struts mapping action to action???

    runescience, Feb 6, 2006, in forum: Java
    Replies:
    3
    Views:
    1,951
    runescience
    Feb 7, 2006
  4. vyshu
    Replies:
    1
    Views:
    2,699
    Richard Senior
    Apr 27, 2007
  5. John
    Replies:
    0
    Views:
    1,002
Loading...

Share This Page