I am quite new in php and I wonder is it possible to create a textbox inside a button?
I wish the button consist of a textbox inside its value. Anyone can help me??

Recommended Answers

All 8 Replies

I think its not possible with normal simple coding, It is somewhat complicated issue, which requires complex javascript code.

Why do you need such thing?

i need to create a button with the value of "add _ row to table" where the "_" i wish to replace with a textbox. I tried several ways but still failed to do so. Can anyone please help me??

<input type=button name=btna id=btna value='add' >
<input type=textbox name=txt1 id=txt1 value ='' >
<input type=button name=btnb id=btnb value= 'row to table' >

This is what i currently use but I think it is better to combine both buttons.

This is the method I currently using but I think it is better to combine both buttons. Is it possible to do so?

If you use only one buton and no text box
We may change title of one button using javascript?

but i need the users to key in how many rows do they wish to insert to the table.

Seems strange to me that your asking a user to decide what goes into your table. What you request is not possible using PHP, it would require some complex javascript.

If I was being forced to do this I'd probably create some sort of element (such as a div) that looks like a button with a text box and a button inside.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.