Jump to content

Buttons


Gubbins

Recommended Posts

Ok the code below adds bold tags into a message box:-

 

<input class="submit" value="bold" name="bold" onFocus="display(thisForm.msg, '', '');" style="font-weight: bold;" type="button" />

 

I want to add a smilies into the same message box but i cant seem to get the code right, i have tried this:-

<img src="images/Emoticons/cool.gif" value="[cool]" type="button"  '[cool]');">

 

But it only displays the image and its not clickable, does anyone know where i am going wrong please?

Link to comment
https://forums.phpfreaks.com/topic/130576-buttons/
Share on other sites

ok this works:-

<body onLoad="thisForm=document.formsend;">

<form action="" method="post" name="formsend">

<table width="50%" align="center" class="tbl">

<tr><td align="center">

<input class="submit" value="bold" name="bold" onFocus="display(thisForm.msg, '', '');" style="font-weight: bold;" type="button" />

</tr></tr>

<tr><td align="center">

</tr></tr>

</table>

 

but i want to make another table and have smilies in it like what you see when you reply to this message,

I have tried this but it does not work:-

 

<img src="images/Emoticons/cool.gif" value="[cool]" type="button"  '[cool]');">

 

 

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/130576-buttons/#findComment-677478
Share on other sites

ok i have got a little further this:-

 

<input onFocus="display(thisForm.msg, '[cool]');"  style="images/Emoticons/cool.gif;"  type="button" />

 

That now puts the [cool] into the message box but the button doesn't display anything and i guess i should have the image entered into the message box!

 

Please help i am struggling

Link to comment
https://forums.phpfreaks.com/topic/130576-buttons/#findComment-677620
Share on other sites

This now enters "[cool]undefined" into the message box, i am unsure why i get "undefind" next to "[cool]" and it disapears as soon as it appears.

 

<input type="image" src="images/Emoticons/cool.gif" onFocus="display(thisForm.msg, '[cool]');" title="Cool" type="button">

 

I think i am almost there, can anyone help please?

Link to comment
https://forums.phpfreaks.com/topic/130576-buttons/#findComment-678357
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.