anchor inside form

anchor inside form

am 25.08.2009 09:55:08 von leledumbo

If I have an anchor inside form, how can I send form using the anchor without
displaying target url? I've tried the code below but IE says that this.form
is null or empty and Firefox does nothing.


# Pick me

--
View this message in context: http://www.nabble.com/anchor-inside-form-tp25129981p25129981 .html
Sent from the PHP - General mailing list archive at Nabble.com.


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: anchor inside form

am 25.08.2009 11:18:07 von Ashley Sheridan

On Tue, 2009-08-25 at 00:55 -0700, leledumbo wrote:
> If I have an anchor inside form, how can I send form using the anchor without
> displaying target url? I've tried the code below but IE says that this.form
> is null or empty and Firefox does nothing.
>
>


> # Pick me
>

> --
> View this message in context: http://www.nabble.com/anchor-inside-form-tp25129981p25129981 .html
> Sent from the PHP - General mailing list archive at Nabble.com.
>
>
You can only send the form from a link (an anchor is a named point in a
page that also uses the tag) using Javascript. Most people will tell
you this is a bad idea, as you are then relying on the end user to both
have Javascript available _and_ have it switched on (and that they are
not sitting behind a corporate firewall that strips out Javascript which
some do apparently)

Why not just use another submit button? If you don't like the look of a
regular submit, then use an button instead, as
these act like submit buttons for the most part. You can have as many
submit buttons on a form that you like, and if you give them unique
names, you will know which one has been clicked.

Thanks,
Ash
http://www.ashleysheridan.co.uk




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: anchor inside form

am 25.08.2009 11:28:39 von leledumbo

> Why not just use another submit button?

Because it's actually an entry in a tree-like menu. I need to send
parameters via get method, and code above is one way I can think of.
--
View this message in context: http://www.nabble.com/anchor-inside-form-tp25129981p25131146 .html
Sent from the PHP - General mailing list archive at Nabble.com.


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: anchor inside form

am 25.08.2009 11:58:47 von Ralph Deffke

may be u can use this

wrote in message
news:25131146.post@talk.nabble.com...
>
> > Why not just use another submit button?
>
> Because it's actually an entry in a tree-like menu. I need to send
> parameters via get method, and code above is one way I can think of.
> --
> View this message in context:
http://www.nabble.com/anchor-inside-form-tp25129981p25131146 .html
> Sent from the PHP - General mailing list archive at Nabble.com.
>



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

RE: anchor inside form

am 25.08.2009 12:28:59 von Arno Kuhl

-----Original Message-----
From: leledumbo [mailto:leledumbo_cool@yahoo.co.id]
Sent: 25 August 2009 09:55 AM
To: php-general@lists.php.net
Subject: [PHP] anchor inside form

If I have an anchor inside form, how can I send form using the anchor
without displaying target url? I've tried the code below but IE says that
this.form is null or empty and Firefox does nothing.


# Pick me

--

You can use javascript behind a button or image or link to submit the form
from anywhere in your html page. You don't need the anchor but you do need a
form name. Something like:

href="javascript:document.FormName.submit();"

Cheers
Arno


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

RE: anchor inside form

am 25.08.2009 12:29:28 von Ashley Sheridan

On Tue, 2009-08-25 at 12:28 +0200, Arno Kuhl wrote:
> -----Original Message-----
> From: leledumbo [mailto:leledumbo_cool@yahoo.co.id]
> Sent: 25 August 2009 09:55 AM
> To: php-general@lists.php.net
> Subject: [PHP] anchor inside form
>
> If I have an anchor inside form, how can I send form using the anchor
> without displaying target url? I've tried the code below but IE says that
> this.form is null or empty and Firefox does nothing.
>
>


> # Pick me
>

> --
>
> You can use javascript behind a button or image or link to submit the form
> from anywhere in your html page. You don't need the anchor but you do need a
> form name. Something like:
>
> href="javascript:document.FormName.submit();"
>
> Cheers
> Arno
>
>
And all it takes for that to break is for someone to turn off
Javascript...

Thanks,
Ash
http://www.ashleysheridan.co.uk




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: anchor inside form

am 25.08.2009 22:33:16 von Paul M Foster

On Tue, Aug 25, 2009 at 11:29:28AM +0100, Ashley Sheridan wrote:

> On Tue, 2009-08-25 at 12:28 +0200, Arno Kuhl wrote:
> > -----Original Message-----
> > From: leledumbo [mailto:leledumbo_cool@yahoo.co.id]
> > Sent: 25 August 2009 09:55 AM
> > To: php-general@lists.php.net
> > Subject: [PHP] anchor inside form
> >
> > If I have an anchor inside form, how can I send form using the anchor
> > without displaying target url? I've tried the code below but IE says that
> > this.form is null or empty and Firefox does nothing.
> >
> >


> > # Pick me
> >

> > --
> >
> > You can use javascript behind a button or image or link to submit the form
> > from anywhere in your html page. You don't need the anchor but you do
> need a
> > form name. Something like:
> >
> > href="javascript:document.FormName.submit();"
> >
> > Cheers
> > Arno
> >
> >
> And all it takes for that to break is for someone to turn off
> Javascript...
>
> Thanks,
> Ash
> http://www.ashleysheridan.co.uk

Oh no, here we go again....

Paul

--
Paul M. Foster

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php