Development Blog by Professionals
JavaScript
Open a modal window from a Flash movie
Jun 17th
AS1 / AS2
In the action of your flash button, you have to execute this code:
getURL("javascript:$.nyroModalManual({url:'YOUR URL'});");
AS3
In the action of your flash button, you have to execute this code:
ExternalInterface.call("$.nyroModalManual({url:'YOUR URL'})");
http://nyromodal.nyrodev.com/wiki/index.php/Open_a_modal_window_from_a_Flash_movie
Javascript Open Flash Object
Jun 10th
<script src=”/commons/js/flashobject.js” type=”text/javascript”></script> <script src=”/commons/js/FlashDetect.js” type=”text/javascript”></script><script type=”text/javascript”>// <![CDATA[// Globals// Major version of Flash requiredvar requiredMajorVersion = 8;// Minor version of Flash requiredvar requiredMinorVersion = 0;// Minor version of Flash requiredvar requiredRevision = 0;function openVideoPopUp(){document.getElementById("showflash").style.display="";var hasReqestedVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);// Check to see if the version meets the requirements for playbackif (hasReqestedVersion){var fo = new FlashObject("falsh.swf", "showingflashvideo", "300", "300", "9", "");fo.addParam("quality","high");fo.addParam("menu", "false");fo.addParam("wmode", "transparent");fo.addParam("allowfullscreen", "true");fo.addParam("flashvars","var1=source");fo.write("showflash");}else{var alternateContent = ''+ '<span>This content requires the Adobe Flash Player. '+ '<a href=http://www.adobe.com/go/getflash></a>Get Flash</a></span>';//document.write(alternateContent); // insert non-flash contentdocument.getElementById('showflash').innerHTML=alternateContent}}function closeVideoPopUp(){document.getElementById("showflash").style.display = "none";}// ]]></script><a href=”javascript:openVideoPopUp()”> </a><script src=”/commons/js/flashobject.js” type=”text/javascript”></script> <script src=”/commons/js/FlashDetect.js” type=”text/javascript”></script><script type=”text/javascript”>// <![CDATA[// Globals// Major version of Flash requiredvar requiredMajorVersion = 8;// Minor version of Flash requiredvar requiredMinorVersion = 0;// Minor version of Flash requiredvar requiredRevision = 0;
function openVideoPopUp(){ document.getElementById("showflash").style.display=""; var hasReqestedVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision); // Check to see if the version meets the requirements for playback if (hasReqestedVersion) { var fo = new FlashObject("falsh.swf", "showingflashvideo", "300", "300", "9", ""); fo.addParam("quality","high"); fo.addParam("menu", "false"); fo.addParam("wmode", "transparent"); fo.addParam("allowfullscreen", "true"); fo.addParam("flashvars","var1=source"); fo.write("showflash"); } else { var alternateContent = '' + '<span>This content requires the Adobe Flash Player. ' + '<a href=http://www.adobe.com/go/getflash></a>Get Flash</a></span>'; //document.write(alternateContent); // insert non-flash content document.getElementById('showflash').innerHTML=alternateContent }}function closeVideoPopUp(){ document.getElementById("showflash").style.display = "none";}// ]]></script>
<a href=”javascript:openVideoPopUp()”> </a>
Disable right mouse click Script
May 7th
<script language=JavaScript> <!-- //Disable right mouse click Script //By Maximus (maximus@nsimail.com) w/ mods by DynamicDrive //For full source code, visit http://www.dynamicdrive.com var message="©2010 Prosoxi.gr All rights reserved."; /////////////////////////////////// function clickIE4(){ if (event.button==2){ alert(message); return false; } } function clickNS4(e){ if (document.layers||document.getElementById&&!document.all){ if (e.which==2||e.which==3){ alert(message); return false; } } } if (document.layers){ document.captureEvents(Event.MOUSEDOWN); document.onmousedown=clickNS4; } else if (document.all&&!document.getElementById){ document.onmousedown=clickIE4; } document.oncontextmenu=new Function("alert(message);return false") // --> </script>
Tinymce How can I disable Tag?
Apr 26th
How can I disable <p> Tag?
force_br_newlines : true,
force_p_newlines : false,
forced_root_block : “”,
Javascript SSL protocol Switch
Apr 13th
switch (window.location.protocol)
{
case "http:":
include('http://www..js');
break;
case "https:":
include('https://ssl..js');
break;
default:
include('http://www..js');
break;
}
Tinymce on selected AREA
Apr 8th
<script type=”text/javascript”>
tinyMCE.init({
// General options
mode : “exact”,
theme : “advanced”,
elements : “textareaID”,
height: 500,
…………………
Javascript Hiding Scrollbars
Apr 8th
document.body.style.overflow=”hidden”;
and
document.body.style.overflow=”visible”;
display an object inf javascript
Apr 6th
Here’s how to show the contents of a object in Javascript
function concatObject(obj) {
str='';
for(prop in obj)
{
str+=prop + " value :"+ obj[prop]+"\n";
}
return(str);
}
More >
Javascript Confirm Form Submission
Mar 9th
Javascript Confirm Form Submission
Many times you may wish to have the user confirm, before they process a form’s action. For instance, clicking the button may activate a deletion process which you wish to have the user confirm before proceeding.
This code allows your users to confirm whether they wish to proceed when processing a form with serious consequences, such as DELETE. More >


