Forum Moderators: coopster

Message Too Old, No Replies

php form question

         

persia

2:08 am on Jun 3, 2003 (gmt 0)



Hi

I'd like to have a php form which enables users to highlight a section of text they have entered in a text box and then add a url elsewhere - ie in another text box - then be able to press a button and turn the highlighted section into a link. This should occur before posting, so that the user can add more text, etc, befero they send off the form.

I hope that makes sense. Is it possible in php?

Thanks

Persia

FairSky

1:34 pm on Jun 3, 2003 (gmt 0)

10+ Year Member



This has nothing to do with PHP, which runs entirely on the server and doesn't care what you do to your textboxes before someone submits the form. Try posting in the HTML and browser forums for a JavaScript solution.

-Joshua <><

jatar_k

3:35 pm on Jun 3, 2003 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Welcome to WebmasterWorld persia,

You could definitely do that except for highlighting a small bit of text. The text would have to be entered into its own textbox. I actually use a popup for this. The user can click on a link to go to the link generator.

They enter the text and url in 2 textboxes, hit submit and it writes out the link in a textarea. They can then copy and paste it back into the other window.

You could do it with php but javascript is much simpler and user friendly for this setup.

FairSky

4:08 pm on Jun 3, 2003 (gmt 0)

10+ Year Member



Unless I'm mistaken, the highlighting bit is possible with the latest IE and Mozilla. You'd have to poke around for how, though.

-Joshua <><