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