Jump to content

Search the Community

Showing results for tags 'JS'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • W3Schools
    • General
    • Suggestions
    • Critiques
  • HTML Forums
    • CSS
  • Browser Scripting
    • JavaScript
    • VBScript
  • Server Scripting
    • Web Servers
    • Version Control
    • SQL
    • ASP
    • PHP
    • .NET
    • ColdFusion
    • Java/JSP/J2EE
    • CGI
  • XML Forums
    • XML
    • Schema
    • Web Services
  • Multimedia
    • Multimedia
    • FLASH

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start





Website URL








Found 107 results

  1. hi i have a really big problem (for me). i have a html5 animation, but actuali is just a html file with a js, this animation was created in edge from adobe, and i got some thing like this: <html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta http-equiv="X-UA-Compatible" content="IE=9"/><title>Ribbon</title><script type="text/javascript" charset="utf-8" src=".../muse/assets/ribbon2/Ribbon2_edgePreload.js"></script><style> .edgeLoad-EDGE-4268933 { visibility:hidden; } </style><!--Adobe Edge Runtime End--> </head><body style="margin:0;padding:0;"><div id="EDGE-4268933" "edgeLoad-EDGE-4268933" style="height: 110px"></div></body></html> so in the Ribbon2_edgePreload.js is all my animation code. so in that code i wanna make a call a function in other html and in this case is a masterpage from asp.net in my masterpage i got this function. <script type="text/javascript" > function redMaster(){ var iframe1 = document.getElementById("iframe1"); iframe1.style.display="none"; }</script> the problem is that my animation html file is in the masterpage but inside of an iframe, so when some one click on an animated button i want to hide the specific iframe with that js code but when in the master page add the referecen to the js (<script type="text/javascript" charset="utf-8" src=".../muse/assets/ribbon2/Ribbon2_edgePreload.js"></script>), something really strange happen and the masterpage is changed for the html animation code (this is in the web browser), so i wanna know is there is another way to archieve this. code in the java js (function($,Edge,compId){var Composition=Edge.Composition,Symbol=Edge.Symbol;//Edge symbol: 'stage'(function(symbolName){Symbol.bindTriggerAction(compId,symbolName,"Default Timeline",3974,function(sym,e){sym.stop();});//Edge binding endSymbol.bindTriggerAction(compId,symbolName,"Default Timeline",3595,function(sym,e){sym.stop();});//Edge binding endSymbol.bindTriggerAction(compId,symbolName,"Default Timeline",3703,function(sym,e){sym.stop();});//Edge binding endSymbol.bindTriggerAction(compId,symbolName,"Default Timeline",3839,function(sym,e){sym.stop();});//Edge binding endSymbol.bindTriggerAction(compId,symbolName,"Default Timeline",4153,function(sym,e){});//Edge binding endSymbol.bindTriggerAction(compId,symbolName,"Default Timeline",4153,function(sym,e){sym.stop();});//Edge binding endSymbol.bindTriggerAction(compId,symbolName,"Default Timeline",4206,function(sym,e){sym.stop();});//Edge binding endSymbol.bindTriggerAction(compId,symbolName,"Default Timeline",3500,function(sym,e){sym.stop();});//Edge binding end//custom code modification for the call of the js methodSymbol.bindElementAction(compId,symbolName,"${_Rojo}","click",function(sym,e){red();});//Edge binding endSymbol.bindElementAction(compId,symbolName,"${_Verde}","click",function(sym,e){sym.play("green");});//Edge binding endSymbol.bindElementAction(compId,symbolName,"${_Moradoso}","click",function(sym,e){sym.play("purple2");});//Edge binding endSymbol.bindElementAction(compId,symbolName,"${_Morado}","click",function(sym,e){sym.play("purple1");});//Edge binding endSymbol.bindElementAction(compId,symbolName,"${_Azul}","click",function(sym,e){sym.play("blue");});//Edge binding endSymbol.bindElementAction(compId,symbolName,"${_Comisions}","click",function(sym,e){sym.play("red");});//Edge binding endSymbol.bindElementAction(compId,symbolName,"${_Prorrateo}","click",function(sym,e){sym.play("blue");});//Edge binding endSymbol.bindElementAction(compId,symbolName,"${_Catalogo}","click",function(sym,e){sym.play("green");});//Edge binding endSymbol.bindElementAction(compId,symbolName,"${_Ventas}","click",function(sym,e){sym.play("purple1");});//Edge binding endSymbol.bindElementAction(compId,symbolName,"${_Gastos}","click",function(sym,e){sym.play("purple2");});//Edge binding endSymbol.bindElementAction(compId,symbolName,"${_Rojo}","mouseover",function(sym,e){sym.play("red");});//Edge binding endSymbol.bindElementAction(compId,symbolName,"${_Comisions}","mouseover",function(sym,e){sym.play("red");});//Edge binding endSymbol.bindElementAction(compId,symbolName,"${_Azul}","mouseover",function(sym,e){sym.play("blue");});//Edge binding endSymbol.bindElementAction(compId,symbolName,"${_Prorrateo}","mouseover",function(sym,e){sym.play("blue");});//Edge binding endSymbol.bindElementAction(compId,symbolName,"${_Catalogo}","mouseover",function(sym,e){sym.play("green");});//Edge binding endSymbol.bindElementAction(compId,symbolName,"${_Verde}","mouseover",function(sym,e){sym.play("green");});//Edge binding endSymbol.bindElementAction(compId,symbolName,"${_Ventas}","mouseover",function(sym,e){sym.play("purple1");});//Edge binding endSymbol.bindElementAction(compId,symbolName,"${_Morado}","mouseover",function(sym,e){sym.play("purple1");});//Edge binding endSymbol.bindElementAction(compId,symbolName,"${_Gastos}","mouseover",function(sym,e){sym.play("purple2");});//Edge binding endSymbol.bindElementAction(compId,symbolName,"${_Moradoso}","mouseover",function(sym,e){sym.play("purple2");});//Edge binding end})("stage");//Edge symbol end:'stage'//=========================================================//Edge symbol: 'Symbol_1'(function(symbolName){})("Symbol_1");//Edge symbol end:'Symbol_1'//=========================================================//Edge symbol: 'Symbol_2'(function(symbolName){})("Symbol_2");//Edge symbol end:'Symbol_2'})(jQuery,AdobeEdge,"EDGE-4268933"); function red() { redMaster();} Thank in advance and sorry for my english i still learning.
  2. I went over this plenty of times and no matter how many times I go over it, something goes wrong and I can't seem to figure it out. function validateEmail(email){var atNum=0;for(var i=0; i<email.length; i++){ //Checks for number of @ if(email.charAt(i)=="@"){ atNum++; }}alert("atNum: " + atNum);var atPos=email.indexOf("@");alert("atPos: " + atPos);var lastDotPos=email.lastIndexOf(".");alert("lastDotPos: " + lastDotPos);var user=email.substr(0,atPos);alert("user: " + user);var domain=email.substr(atPos+1,lastDotPos-1); //<-- ISSUEfor(var i=atPos+1; i<lastDotPos; i++){ alert("email.charAt(" + i + "): " + email.charAt(i));}alert("domain: " + domain);var tld=email.substr(lastDotPos+1,email.length-1);alert("tld: " + tld);return false;} This is not fully functioning. Every time I run this, the domain always displays like gmail.com instead of gmail. I even tried to set the lastDotPos-1 to something I know that is suppose to give me gmail, but it still comes out as gmail.com. What is wrong?
  3. I notice when I try to store html code in a variable and there is an ENTER between any code, the code does not work. Example: function displayRegister(){var a='<div></div>';} Code above is fine. function displayRegister(){var a='<div></div>';} Code above does not work. Is there a reason for this?
  4. I am working on a website for my work but they will not give me a webserver. So basically I have to run it off a fileshare. This limits me to HTML, Javascript, and CSS formats to get anything done. I need to be able to accept data entered into a form and store it somewhere so it can later be queried for analysis in another website type format. Any suggestions? Somethings to keep in mind also so you know what I'm working with here. - older dell workstations running XP- IE7 is the only browser we are able to use on the work machines- No web server access or ability to pull in data from outside resources since the machines do not have internet access.
  5. Hi, I'm trying to load a Script once per day using cookies but I can't make it !!I've found this cookies tutorial that opens a pop up once per day <script type="text/javascript">var expDays = 1; // number of days the cookie should last var page = "only-popup-once.html";var windowprops = "width=300,height=200,location=no,toolbar=no,menubar=no,scrollbars=no,resizable=yes"; function GetCookie (name) { var arg = name + "="; var alen = arg.length; var clen = document.cookie.length; var i = 0; while (i < clen) { var j = i + alen; if (document.cookie.substring(i, j) == arg) return getCookieVal (j); i = document.cookie.indexOf(" ", i) + 1; if (i == 0) break; } return null;} function SetCookie (name, value) { var argv = SetCookie.arguments; var argc = SetCookie.arguments.length; var expires = (argc > 2) ? argv[2] : null; var path = (argc > 3) ? argv[3] : null; var domain = (argc > 4) ? argv[4] : null; var secure = (argc > 5) ? argv[5] : false; document.cookie = name + "=" + escape (value) + ((expires == null) ? "" : ("; expires=" + expires.toGMTString())) + ((path == null) ? "" : ("; path=" + path)) + ((domain == null) ? "" : ("; domain=" + domain)) + ((secure == true) ? "; secure" : "");} function DeleteCookie (name) { var exp = new Date(); exp.setTime (exp.getTime() - 1); var cval = GetCookie (name); document.cookie = name + "=" + cval + "; expires=" + exp.toGMTString();} var exp = new Date();exp.setTime(exp.getTime() + (expDays*24*60*60*1000)); function amt(){ var count = GetCookie('count') if(count == null) { SetCookie('count','1') return 1 } else { var newcount = parseInt(count) + 1; DeleteCookie('count') SetCookie('count',newcount,exp) return count }} function getCookieVal(offset) { var endstr = document.cookie.indexOf (";", offset); if (endstr == -1) endstr = document.cookie.length; return unescape(document.cookie.substring(offset, endstr));} function checkCount() { var count = GetCookie('count'); if (count == null) { count=1; SetCookie('count', count, exp); window.open(page, "", windowprops); } else { count++; SetCookie('count', count, exp); }} window.onload=checkCount;</script> But, I want to load this script file once per day https://sites.google.com/site/alakwad/file-cabinet/open.js Any help ?
  6. How to implement mvc architecture in js? i have read some stuff regarding this but still having problem to get its implmention.I will be glad if anyone can elaborate it with small example.
  7. I'm trying to get these sliders to work so a user can adjust the readability of the website. i have a slider to adjust the font size, the number of colums and the background color. For the background color i want to have some sort of color picker but i still need to look into that but if you have any suggestions please let me know! here's the code: //fontsizewindow.onload = function() {var value_display = document.getElementById("value_display").className.class="value_display";var lorem = document.getElementsByClassName("lorem");document.getElementById("slider").onchange = function() {value_display.value = this.value;lorem.style.fontSize = this.value + "em";}}//kolom aantalfunction changeColumnNoSlider(event) {var val = event.target.value;document.getElementById('columns-no-value').className='columns-no-value'.textContent = val;var el = document.getElementsByClassName('kolom');el.style.webkitColumnCount = val;el.style.MozColumnCount = val;} The problem is that i use it for blog post so it's not just one article i want to adjust. the code works if i use .getElementById but i need to use classes. Thanks in advance!
  • Create New...