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
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
Share on other sites

Nope, i just want to basically have a button that when u click it, It pops up a form they fill out when it hits submits it writes to mysql database and closes the form.

 

Im using JQuery on the main page to reload the query so the record shows in the table.

Link to comment
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.