Jump to content

Button to class


DrTrans

Recommended Posts

What i wan to do, and what i can't figure out is something simple.

 

I want to take a button,

 

<a href="" class="button">Add Prop </a>

 

and then i want it to go to a sub class i have that does something like

 

Example:.

print "<html><input type="text" name="text"> </html>  "

 

Can someone provide an example on how to make this work? or should i create a separate php file with the form inside of it and just link it..

 

Link to comment
https://forums.phpfreaks.com/topic/250452-button-to-class/
Share on other sites

To clarify, are you trying to dynamically add input fields to a form? If so, this is better left to client side scripting (Javascript) that can manipulate the browser session with out having to call back to the server. Remember that php is server side so while you can make it work, it will probably be quite the kludge, especially if you want to remember something the user already typed in the form.

Link to comment
https://forums.phpfreaks.com/topic/250452-button-to-class/#findComment-1285021
Share on other sites

I think the clearer response should be,

 

When you click a button, the browser fades and pulls up a form like an applet.

 

fill the form out, hit submit, and then u see the record on the original page ( using jQuery).

 

This might be more for the javascript forums.

 

Link to comment
https://forums.phpfreaks.com/topic/250452-button-to-class/#findComment-1285059
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.