By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,154 Members | 1,024 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,154 IT Pros & Developers. It's quick & easy.

loading a form on button click (client-side)

P: n/a
hi can anyone show me how to load a simple form (i.e. make its contents
visible) on the click of a button (not in that same form)

regards

marc

Jul 4 '06 #1
Share this Question
Share on Google+
4 Replies


P: n/a
*** monomaniac21 escribió/wrote (4 Jul 2006 08:45:25 -0700):
hi can anyone show me how to load a simple form (i.e. make its contents
visible) on the click of a button (not in that same form)
My answer would be that you only need to specify the URL in the 'action'
attribute of the 'form' tag and make the button of 'submit' type, but
that's basic HTML, not PHP at all; so I guess I don't understand you :-?

--
-+ http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
++ Mi sitio sobre programación web: http://bits.demogracia.com
+- Mi web de humor con rayos UVA: http://www.demogracia.com
--
Jul 4 '06 #2

P: n/a

Alvaro G. Vicario wrote:
*** monomaniac21 escribió/wrote (4 Jul 2006 08:45:25 -0700):
hi can anyone show me how to load a simple form (i.e. make its contents
visible) on the click of a button (not in that same form)

My answer would be that you only need to specify the URL in the 'action'
attribute of the 'form' tag and make the button of 'submit' type, but
that's basic HTML, not PHP at all; so I guess I don't understand you :-?

--
-+ http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
++ Mi sitio sobre programación web: http://bits.demogracia.com
+- Mi web de humor con rayos UVA: http://www.demogracia.com
--
I know that but i want to use a client side function to cut down on
server load (i.e. javascript)

Jul 5 '06 #3

P: n/a
Message-ID: <11**********************@j8g2000cwa.googlegroups. comfrom
monomaniac21 contained the following:
>
I know that but i want to use a client side function to cut down on
server load (i.e. javascript)

So you posted this to comp.lang.php why exactly?
--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/
Jul 5 '06 #4

P: n/a
monomaniac21 wrote:
Alvaro G. Vicario wrote:
>*** monomaniac21 escribió/wrote (4 Jul 2006 08:45:25 -0700):
>>hi can anyone show me how to load a simple form (i.e. make its contents
visible) on the click of a button (not in that same form)
My answer would be that you only need to specify the URL in the 'action'
attribute of the 'form' tag and make the button of 'submit' type, but
that's basic HTML, not PHP at all; so I guess I don't understand you :-?

--
-+ http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
++ Mi sitio sobre programación web: http://bits.demogracia.com
+- Mi web de humor con rayos UVA: http://www.demogracia.com
--

I know that but i want to use a client side function to cut down on
server load (i.e. javascript)
Not a php, let alone server-side question, but...

www.quirksmode.org has lots of DHTML (javascript + CSS ) code which
should inspire you enough to write your own solution.

Think along the lines of:
* catching the submit action with javascript
* setting display: none; to display: block; for the form you want to show

Be wary though - if a user has javascript turned off, your actions will
fail.

Good luck,
Juliette
Jul 6 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.