Code Of " Select Content"
3 posters
Page 1 of 1
Code Of " Select Content"
I want a code that makes members copy the whole code by selecting on "select content" like the one in help.forumotion.com:rose:
Last edited by Egyptian Revolution on July 15th 2013, 9:19 pm; edited 1 time in total
Guest- Guest
Re: Code Of " Select Content"
Hi,
Here is the tutorial https://help.forumotion.com/t93456-select-content-button?highlight=Select+All
Here is the tutorial https://help.forumotion.com/t93456-select-content-button?highlight=Select+All
Derri- Helper
- Posts : 8711
Reputation : 638
Language : English & Basic French
Location : Scotland, United Kingdom
Re: Code Of " Select Content"
are you sure you have your javascripts activated?
novacane.- Forumember
- Posts : 59
Reputation : 3
Language : english
Re: Code Of " Select Content"
Yes make sure you activate Javascript
You'll find the option in the Javascript management area.
You'll find the option in the Javascript management area.
Derri- Helper
- Posts : 8711
Reputation : 638
Language : English & Basic French
Location : Scotland, United Kingdom
Re: Code Of " Select Content"
Did you ensure you took the correct code?
Derri- Helper
- Posts : 8711
Reputation : 638
Language : English & Basic French
Location : Scotland, United Kingdom
Re: Code Of " Select Content"
yes, i used this code for phpbb3
- Code:
function selectCode(a)
{
// Get ID of code block
var e = a.parentNode.parentNode.getElementsByTagName('CODE')[0];
// Not IE
if (window.getSelection)
{
var s = window.getSelection();
// Safari
if (s.setBaseAndExtent)
{
s.setBaseAndExtent(e, 0, e, e.innerText.length - 1);
}
// Firefox and Opera
else
{
// workaround for bug # 42885
if (window.opera && e.innerHTML.substring(e.innerHTML.length - 4) == '<BR>')
{
e.innerHTML = e.innerHTML + ' ';
}
var r = document.createRange();
r.selectNodeContents(e);
s.removeAllRanges();
s.addRange(r);
}
}
// Some older browsers
else if (document.getSelection)
{
var s = document.getSelection();
var r = document.createRange();
r.selectNodeContents(e);
s.removeAllRanges();
s.addRange(r);
}
// IE
else if (document.selection)
{
var r = document.body.createTextRange();
r.moveToElementText(e);
r.select();
}
}
if(text){}else{ var text = 'Selecionar todos';}
jQuery(document).ready(function(){
jQuery("dl.codebox dt").not("dl.spoiler > dt").html('Code: <a
href="#" onclick="selectCode(this); return false;" title="Select all the content" class="code-a"> Select Content </a>');
});
Guest- Guest
Re: Code Of " Select Content"
Egyptian Revolution wrote:yes, i used this code for phpbb3
- Code:
function selectCode(a)
{
// Get ID of code block
var e = a.parentNode.parentNode.getElementsByTagName('CODE')[0];
// Not IE
if (window.getSelection)
{
var s = window.getSelection();
// Safari
if (s.setBaseAndExtent)
{
s.setBaseAndExtent(e, 0, e, e.innerText.length - 1);
}
// Firefox and Opera
else
{
// workaround for bug # 42885
if (window.opera && e.innerHTML.substring(e.innerHTML.length - 4) == '<BR>')
{
e.innerHTML = e.innerHTML + ' ';
}
var r = document.createRange();
r.selectNodeContents(e);
s.removeAllRanges();
s.addRange(r);
}
}
// Some older browsers
else if (document.getSelection)
{
var s = document.getSelection();
var r = document.createRange();
r.selectNodeContents(e);
s.removeAllRanges();
s.addRange(r);
}
// IE
else if (document.selection)
{
var r = document.body.createTextRange();
r.moveToElementText(e);
r.select();
}
}
if(text){}else{ var text = 'Selecionar todos';}
jQuery(document).ready(function(){
jQuery("dl.codebox dt").not("dl.spoiler > dt").html('Code: <a
href="#" onclick="selectCode(this); return false;" title="Select all the content" class="code-a"> Select Content </a>');
});
Have you got other javascripts installed? If so, try removing them one by one to see if that's causing a clash.
Derri- Helper
- Posts : 8711
Reputation : 638
Language : English & Basic French
Location : Scotland, United Kingdom
Re: Code Of " Select Content"
thanks i delete some codes that caused the problem and i solved it
Guest- Guest
Re: Code Of " Select Content"
Topic Solved & Locked
Lost Founder's Password |Forum's Utilities |Report a Forum |General Rules |FAQ |Tricks & Tips
You need one post to send a PM.
You need one post to send a PM.
When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
Similar topics
» select content code
» select content button in code box
» Code: Select Content for code box
» Select Content
» "select content"
» select content button in code box
» Code: Select Content for code box
» Select Content
» "select content"
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum