JavaScript - Merging 2 Css Files
Can someone tell me the best way to merge two css files? Just getting started and would love the help. Learning a lot googling, but would also like some guidance.
Similar TutorialsI'v been working for quite some time trying to merge this javascript. I'm new to it, so it ended not working. Please help! here text code http://cursed-dragon.eu/test/lenta_2.txt here php page http://cursed-dragon.eu/test/lenta_2.php I need to do this to work when pressed on Funkcija-startas. And function merging starts where //function bandom() is written.. Below are 2 JS functions I currently use on a site but as it is if the checkbox (1st function) is not ticked & the submit button is clicked the alert box shows but the progress image (2nd function) also shows, I was wondering if it is possible to merge these 2 together so that the progress image will only show if all criterias are filled ie the checkbox is ticked... and if so how it can be done or should I say can you post the code as I have no idea about JS these are just 2 snippets I found Code: function validate(form) { if(!document.theform.terms.checked){alert("Please read our terms and check the box"); return false; } return true; } Code: function loadSubmit() { var ProgressImage = document.getElementById('progress_image'); document.getElementById("progress").style.visibility = "visible"; setTimeout(function(){ProgressImage.src = ProgressImage.src},100); return true; } If it helps or relevant ... The form: Code: <form action="xxx.php" method="post" name="theform" onsubmit="return validate(this)"> The progress bar/image: Code: <input name="submit" type="submit" value="submit" class="contSubmit" id="btn" onclick="return loadSubmit()"> <p style="visibility:hidden;" id="progress"/><img id="progress_image" src="images/image.gif" alt=""><br />In Progress ...<p> Thank you in advance for any help -Please delete- will make another thread with simpler explanation. Hey guys, i havent got any code and im not asking for any! just wondering if anyone knows some good tutorials on vectors and how i can use them to store audio files! thanks in advance!
So, I have a dynamic PHP file on my server. I want to make it so browsers can take the code I provide and paste it in an .html, .php, or .asp file, and it'll display across the board. The file would need to be included, unless someone thinks there's a better way of doing this? The only example I could think of would be Google Adsense's code? But I'm not sure. My site loads too many javascript files and it takes much time to load page. I would like to reduce the number of http requests and combine all javascript files into one file. What is the best way for it? Will it work if I just copy whole code from all files and paste into one or anything else is needed? Thanks I have several js files to include in Hml so was thinking if there is any way that i can includes all the files in one file and then include that file in the main html file so that i don't need to chnage the main file again and again How can i do that just like we use import in css Hi, i got a webpage that links to 4 diffrent scripts but only one work at a time Any simple way around this ? I have a secure server that I want users to be able to execute sinple .cmd files by clicking in a button on a web form. I am very new to this and kindly ask for some guidance. When I click on the button I get a error on page at the bottom of the window and the file the .cmd should create is not. Here is what I have so far: <HTML><HEAD><SCRIPT type="text/javascript" LANGUAGE="JavaScript"> function run(file) { var ws = new ActiveXObject("WScript.Shell"); ws.run(file); }</SCRIPT></HEAD> <BODY> <FORM name="Form1"><CENTER> <BR><img src="../icons/HelpDesk_logo.png" alt="OIT Support and Operations" height="100" Width="525"/> <BR> <H1>Reset Reader MGR in CS Gold </H1> <BR>This site is to be used only when all the readers contained in a single MGR have gone offline. Confirm this by using the Gold Reader Status screen.<BR><BR> <B> DO NOT USE THIS IF ALL READERS ARE OFFLINE. CALL PSIG STAFF ASAP!</B><BR><BR> Please select the appropriate MGR to bounce from the list below.<BR> Once you click the correct button please verify that the readers are now online using the Gold Reader Status screen.. If the readers do not come back online contact the AIS PSIG representative.<BR><BR> <B>ONLY CKICK THE BUTTON ONCE</B> <BR> <BR> <Input type="Button" name="Bounce Aero MGR" value="Bounce Aero MGR" onClick="run('D:\bounce_mgrs\BounceMGR2200-Aero.cmd')"/> <BR><BR> <Input type="Button" name="Bounce Copier MGR" value="Bounce Copier MGR" onClick="run('D:\bounce_mgrs\BounceMGR2400-Aero.cmd')"/> <BR><BR> <Input type="Button" name="Bounce Micros_Default MGR" value="Bounce Micros_Default MGR" onClick="run('D:\bounce_mgrs\BounceMGR2600-Aero.cmd')"/> <BR><BR> <Input type="Button" name="Bounce Micros_A MGR" value="Bounce Micros_A MGR" onClick="run('D:\bounce_mgrs\BounceMGR2800-Aero.cmd')"/> <BR><BR> <Input type="Button" name="Bounce Micros_B MGR" value="Bounce Micros_Bo MGR" onClick="run('D:\bounce_mgrs\BounceMGR3000-Aero.cmd')"/> <BR><BR> <Input type="Button" name="Bounce XML MGR" value="Bounce XML MGR" onClick="run('D:\bounce_mgrs\BounceMGR3400-Aero.cmd')"/> <BR><BR> <Input type="Button" name="Bounce Vending MGR" value="Bounce Vending MGR" onClick="run('D:\bounce_mgrs\BounceMGR3600-Aero.cmd')"/> </CENTER> </BODY> </FORM> </HTML> Thank you. Hi everyone, I'm a newbie and this is probably really easy but it just won't work! I've tried looking at various online sources but they are all either too technical or don't seem to work. I'm obviously doing something wrong! The code is posted below, it's not very long so hopefully someone will be able to debug it! Thanks lots! Original page: Code: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <title>variables</title> </head> <body> <script src="displaydate.js" type="text/javascript"></script> <br> </body> </html> External displaydate.js file: Code: function todaydate(){ var today_date= new Date() var myyear=today_date.getYear() var mymonth=today_date.getMonth()+1 var mytoday=today_date.getDate() document.write(myyear+"/"+mymonth+"/"+mytoday) } Opening the original page in my browser displays nothing. Just a blank page. Any help you can give would be greatly appreciated! Geoff I'm trying to program/modify a simple countdown timer in a .js file. I was able to get it to work when I just loaded the index.html file straight from my computer to my browser but it failed once uploaded. Here was the code for my index.html file. Code: <script type="text/javascript" src="countDown2.js"></script> <body> <b id='itgoeshere'>timer should go here</b> <script language ="Javascript"> window.onload = cd() </script> </body> and here is my code for my .js file Code: var days var hours var mins var secs; function cd() { var today = new Date() var eventDate = new Date(2012,0,28,19,19,70) difference = eventDate.getTime() - today.getTime() days = Math.floor(difference / (1000*60*60*24)) difference = difference - days * (1000*60*60*24) hours = Math.floor(difference / (1000*60*60)) difference = difference - hours * (1000*60*60) mins = Math.floor(difference / (1000*60)) difference = difference - mins * (1000*60) secs = Math.floor(difference / (1000)) redo(); } function dis(days,hours,mins,secs) { var disp; disp = days + ":" + hours + ":" + mins + ":" + secs; return(disp); } function redo() { secs--; if(secs == -1) { secs = 59; mins--; if (mins == -1) { mins = 59; hours--; if (hours == -1){ hours = 23; days--;}} } document.getElementById('itgoeshere').innerHTML = dis(days,hours,mins,secs); if((days == 0) && (hours == 0) && (mins == 0) && (secs == 0)) { window.alert("Chris is running."); // change timeout message as required } else { cd = setTimeout("redo()",1000); } } function init() { cd(); } window.onload = init; If I were to just cut and paste my .js code between my <script> it works but I was hopping to use it over again on multiple pages and having only one file to update. Also I'm very new at programming in general so if you see an obvious mistake not related to my question please let me know. OK, I work for a company that accepts donations. Currently, the donation page looks nothing like the rest of the site. So I recreated the page to look like the rest of the site. But when I do so, Chrome shows it as a "security risk". Someone looked at it and told me that it's because the .js files aren't compressed and the browser considers this a security risk. So how do I compress the files? Hi! I'm trying to cmbine 4 .js file into one unique file. I'm getting some troubles because jquery.singlePageNav.js seems not to work. Can someone help me to combine these 4 files? Thank you js.rar Okay, for part of my coursework, I have to create a website which features Javascript. I created a calendar which shows small images for specific dates (trying to keep it interesting, hearts for valentines day etc...). Text looks quite dull. Anyway, I was able to get the code to work successfully, when the image is linked absolutely to the file. However, if I try to change it so that it's relatively linked to the file, it appears as a broken file. This wouldn't normally be a problem, but I have to transfer all of the files to a disc, and so the images will end up broken. Is there anyway I can link the files without them appearing broken? I've tried most things I can think of. Sample code: Code: // New Years Day if (m==1 && d==1) { objEvent = new EventObj(m,d,y, "<center><img src='file:///E:/ICT/Website/mysite/Balloons-32.png'><br/><br/>New Years Day</center>", null, "scEventBlue"); arrEvents[arrEvents.length] = objEvent; }; Many thanks in advance! Hi, I'm trying to use a script for my website. But the script is obfuscated and in english - I need the words in portuguese; besides, the font is the always default Times New Roman, the script uses the <h3> old tags, etc... Can someone kindly help me out to decode some of the files, so I can alter these aspects? Kind regards, Kepler I want to make separate js and html files from my toggle.htm file: Code: <html> <head> <script type="text/javascript"> function toggle() { var ele = document.getElementById("toggleText"); var text = document.getElementById("displayText"); if(ele.style.display == "block") { ele.style.display = "none"; text.innerHTML = "show"; } else { ele.style.display = "block"; text.innerHTML = "hide"; } } </script> </head> <body> <a id="displayText" href="javascript:toggle();">show</a> <== click Here <div id="toggleText" style="display: none"><h1>peek-a-boo</h1></div> </body> </html> My togglejs.js file looks like this: Code: function toggle() { var ele = document.getElementById("toggleText"); var text = document.getElementById("displayText"); if(ele.style.display == "block") { ele.style.display = "none"; text.innerHTML = "show"; } else { ele.style.display = "block"; text.innerHTML = "hide"; } } My togglehtm.htm file looks like this: Code: <html> <head> <script type="text/javascript" src="toggle.js"></script> </head> <body> <a id="displayText" href="javascript:toggle();">show</a> <== click Here <div id="toggleText" style="display: none"><h1>peek-a-boo</h1></div> </body> </html> What changes should I make. Please help. Is there a way I can use JavaScript to compile a list of checkboxes with the value of the url of the file I wish to upload from my computer. And then with that checklist PHP can grab the files from my computer and upload them to the server. Doesn't have the be checkboxes but basically a list of locations so the files can be uploaded one after another. Much like Facebook's ability to upload multiple files. I can't find out how to select multiple files, so I figured just compile a list. Howdy all. I have Win 7, IE9. I have a HTML file on my hard drive, with Javascript within. When I load the page, it keeps popping up Do u want to allow this content, I have to click to allow. I want to stop this, and after doing some searching I found the setting in Internet Options, Advanced - "Allow active content to run in files on my computer". Perfect. Doesnt work. When i check this box, the page loads without the warning, but then the Javascript just doesnt work. Getting quite annoying, because this file is my home page. Any help would be great! I built some pages that uses a Flash widget to play mp3 files on my server and show album covers at the same time. However, for people without Flash (like iPhone/Safari), I accommodate them by using a JavaScript that offers a list of simple links to the mp3 files. What I would really like, in the case of a page where there are several songs by the same artist, is a script that when activated, will play all the files in order. Possible? Where would I look for such a script?
An application under development has a set of core functions that carry out common tasks and a 'machine' that animates panels of lists of names and menus and provides another panel for action calls. (see attached pic). Selection of a name identifies object(s) to be worked on and menu couplets like "Name+Edit" call devices (each in a separate js file). Each js file replaces any files in the deviceScript holder in the hta file. I used to use eval(couplet+"Start")() to initiate the device, but having read about the evils of eval it dawned on me that it was unnecessary and just gave each device a start() function ... and also an optional refresh(), and compulsory finish() to pick up results and clean up. This seems to work well on my machine. The hta is intended to run locally picking up json type data and devices locally and via the net and I am concerned that importing js files is just as evil, but isn't it just like opening a web page? Any guidance really appreciated. Chris |