Jump to content

Recommended Posts

im trying to add my buttons like the ones on starting a new topic so a user can use bbcode

 

currently i have 

<a href="javascript:void(0);" onclick="surroundText('', ''); return false;"><img style="border: none;" src="url.gif" alt="enterurl" /></a>

 

i think there is something wrong here onclick="surroundText('', '');

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

I testing your code with the following

<script type="text/javascript">
	function surroundText(param1,param2){
		alert(" param1: "+param1+" param2: "+param2);
	}
</script>
<a href="javascript:void(0);" onclick="surroundText('value1', 'value2'); return false;"><img style="border: none;" src="url.gif" alt="enterurl" /></a>

this seems to work properly and doesnt produce any errors. so I'm guessing something is wrong with your function " surroundText"

 

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