JavaScript - Chrome Api . Javascript Serial - Browser Extension - And Is Dataframe Correct Convert
Similar TutorialsHello, I have used a free javascript from javascriptkit.com for a "highlighter scroller" in my site. But the programe is only working in Internet explorer. When i use Mozila or google chrome, it is not appearing/working. Can anyone suggest me that how it will work in other browser also. here is the code that i used: Code: <div style="position:relative;left:0px;top:0px"> <span id="highlighter" style="position:absolute;left:0;top:0;font-size:15px;font-family:Calibri;background-color:lime;clip:rect(0px 0px auto 0px)"></span> </div> <script type="text/javascript"> /* Highligher Scroller script- By JavaScript Kit For this and over 400+ free scripts, visit http://www.javascriptkit.com/ This notice must stay intact */ var tickercontents=new Array() tickercontents[0]='<a href="ln.htm">IJSG Welcomes the Kingdom of Morocco as its new Member</a>' var tickdelay=3000 //delay btw messages var highlightspeed=10 //10 pixels at a time. ////Do not edit pass this line//////////////// var currentmessage=0 var clipwidth=0 function changetickercontent(){ crosstick.style.clip="rect(0px 0px auto 0px)" crosstick.innerHTML=tickercontents[currentmessage] highlightmsg() } function highlightmsg(){ var msgwidth=crosstick.offsetWidth if (clipwidth<msgwidth){ clipwidth+=highlightspeed crosstick.style.clip="rect(0px "+clipwidth+"px auto 0px)" beginclip=setTimeout("highlightmsg()",20) } else{ clipwidth=0 clearTimeout(beginclip) if (currentmessage==tickercontents.length-1) currentmessage=0 else currentmessage++ setTimeout("changetickercontent()",tickdelay) } } function start_ticking(){ crosstick=document.getElementById? document.getElementById("highlighter") : document.all.highlighter crosstickParent=crosstick.parentNode? crosstick.parentNode : crosstick.parentElement if (parseInt(crosstick.offsetHeight)>0) crosstickParent.style.height=crosstick.offsetHeight+'px' else setTimeout("crosstickParent.style.height=crosstick.offsetHeight+'px'",100) //delay for Mozilla's sake changetickercontent() } if (document.all || document.getElementById) </script></td> Inside body I have used <body onload="populate();start_ticking()"> for multiple script in a page. Thank you in advance. Regards, Nazmul Karim Khan How does one get inline styles placed by javascript to work in Google Chrome? Works in Firefox and Opera, I know that Chrome is receiving the correct data by using alerts, but it is not putting the style object in the HTML.
First off I apologize If this is in the wrong section of this forum. So I got this concept that I think Is pretty cool. I dont know If there's anything like It out there, If there is, let me know. This is the concept: You click the icon and down pops a map in which there's a circle (like this: imgur: the simple image sharer) You can resize the circle and move it around. Underneath the map there's a box where you can type your search. Let's say you search for "puppies" in Brooklyn, New York The idea is that It'll scan all the coordinates inside the circle and search for photos in google images containing those coordinates in the GPS info (EXIF).This can be useful If you for example wants to search for photos taken in your city, or even in your neighborhood. I can see many uses for this. The thing is, I don't know any programming languages so I can't do this myself. I don't even know where to start. I'm looking for a kind soul to help me with this, I don't have any money so I'm not looking to pay anyone to do this for me. I just want some help getting started, or if someone would be kind enough to do It for free. (Though that Is very unlikely.) Thanks in advance! Sorry for my bad english, it is not my native language. Reply With Quote 01-30-2015, 04:24 PM #2 Philip M View Profile View Forum Posts Supreme Master coder! Join Date Jun 2002 Location London, England Posts 18,371 Thanks 204 Thanked 2,573 Times in 2,551 Posts Hope springs eternal in the human breast. – Alexander Pope, An Essay on Man You might as well say that you want to write a novel in French, but do not know anything about that language. I want to download text file generated in a textarea here my download.php file code structure goes : <?php if(empty($_POST['filename']) || empty($_POST['content'])){ exit; } $filename = preg_replace('/[^a-z0-9\-\_\.]/i','',$_POST['filename']); header("Cache-Control: "); header("Content-type: text/plain"); header('Content-Disposition: attachment; filename="'.$filename.'"'); echo $_POST['content']; ?> and the javascript used (function($){ $.generateFile = function(options){ options = options || {}; if(!options.script || !options.filename || !options.content){ throw new Error("Please enter all the required config options!"); } var iframe = $('<iframe>',{ width:1, height:1, frameborder:0, css:{ display:'none' } }).appendTo('body'); and the script.js $(document).ready(function(){ $('#download').click(function(e){ $.generateFile({ filename : 'export.txt', content : $('textarea').val(), script : 'download.php' }); e.preventDefault(); }); by these assets i created a web page consisting a TEXTAREA , by entering some text on the textarea and clicking on the download button , a text files is generated and downloaded on the user's system, I packed the source code as a CRX file to use it as a CHROME extension, but while using the extension,the files are'nt generated, while the webpage works absolutely fine !!! Hi, I am trying to get the Chrome Height of a browser window. I tried window.outerHeight - window.innerHeight but that gives me the height of the chrome plus the status bar. Does anyone know of a way to just get the height of the chrome of a browser window? Or, get the screen coordinates of the inner body of the browser window. Because, then I can subtract those coordinates from screenX and screenY. Thanks for your help. i am trying to find out how to check if your browser is google chrome and if it is to display in div id tag called google else display download google chrome. I have searched the web and found nothing on this. can you help me? Its the only thing im stuck on. Code: <script type="text/javascript"> document.getElementById("google").style.backgroundImage="url('images/poweredbygoogle.jpg')"; </script> Hi I am not sure if this is a javascript issue but, Google Chrome version : 10.0.680 with one particular website, when I click around the pages, chrome tries to download the page, so for example, say the page is called contact.html, it ends up trying to download a file calling it cr.download contact.html What is happening here - any ideas? Does that sound like a javascript issue to you? Thanks! Greetings, I am currently using the websites tutorial about browser detection using the navigator. http://www.javascriptkit.com/javatutors/navigator.shtml I am however finding myself unable to detect a pattern in order to learn from. My aim is to use Browser detection to have a CSS file for each browser type, such as Firefox, IE, Opera, Safari and then an overall CSS file if none of the above, to fix numerous flaws. For IE and Firefox using the site's code is all well and good and while I haven't tested it yet I'm wondering how to set up the coding so that it can detect a safari browser. There are lots of slashes and d's and brackets and I do find myself unable to understand their purpose. So if someone can explain how I could do it for Safari I would be very appreciative. Hello, I have a question what is the best way to identify a browser, browser version and OS in javascript. I have try a few scripts but they all fail. This will help me out formating the code for diferent browsers. Thanks hello there.. I'm poor with javascript.. can you help me to convert this php to javascript? Code: <?php setcookie("KNwidget", "fbfans", time()+3600); ?> <?php if (isset($_COOKIE["KNwidget"])) echo "when has COOKIE, nothing show here.."; else echo "<script type='text/javascript'>some java script here</script>"; ?> Any one can help how to convert the below PHP code to javascript code: class Mobile { public static function is_mobile(){ $user_agent = $_SERVER['HTTP_USER_AGENT']; // get the user agent value - this should be cleaned to ensure no nefarious input gets executed $accept = $_SERVER['HTTP_ACCEPT']; // get the content accept value - this should be cleaned to ensure no nefarious input gets executed return false || (preg_match('/ipad/i',$user_agent)) || (preg_match('/ipod/i',$user_agent)||preg_match('/iphone/i',$user_agent)) || (preg_match('/android/i',$user_agent)) || (preg_match('/opera mini/i',$user_agent)) || (preg_match('/blackberry/i',$user_agent)) || (preg_match('/(pre\/|palm os|palm|hiptop|avantgo|plucker|xiino|blazer|elaine)/i',$user_agent)) || (preg_match('/(iris|3g_t|windows ce|opera mobi|windows ce; smartphone;|windows ce; iemobile)/i',$user_agent)) || (preg_match('/(mini 9.5|vx1000|lge |m800|e860|u940|ux840|compal|wireless| mobi|ahong|lg380|lgku|lgu900|lg210|lg47|lg920|lg840|lg370|sam-r|mg50|s55|g83|t66|vx400|mk99|d615|d763|el370|sl900|mp500|samu3|samu4|vx10|xda_|samu5|samu6|samu7|sa mu9|a615|b832|m881|s920|n210|s700|c-810|_h797|mob-x|sk16d|848b|mowser|s580|r800|471x|v120|rim8|c500foma:|160x|x160|480x|x640|t503|w839|i250|sprint|w39 8samr810|m5252|c7100|mt126|x225|s5330|s820|htil-g1|fly v71|s302|-x113|novarra|k610i|-three|8325rc|8352rc|sanyo|vx54|c888|nx250|n120|mtk |c5588|s710|t880|c5005|i;458x|p404i|s210|c5100|teleca|s940|c500|s590|foma|samsu|vx8|vx9|a1000|_mms|m yx|a700|gu1100|bc831|e300|ems100|me701|me702m-three|sd588|s800|8325rc|ac831|mw200|brew |d88|htc\/|htc_touch|355x|m50|km100|d736|p-9521|telco|sl74|ktouch|m4u\/|me702|8325rc|kddi|phone|lg |sonyericsson|samsung|240x|x320|vx10|nokia|sony cmd|motorola|up.browser|up.link|mmp|symbian|smartphone|midp|wap|vodafone|o2|pocket|kindle|mobile|psp |treo)/i',$user_agent)) || ((strpos($accept,'text/vnd.wap.wml')>0)||(strpos($accept,'application/vnd.wap.xhtml+xml')>0)) || (isset($_SERVER['HTTP_X_WAP_PROFILE'])||isset($_SERVER['HTTP_PROFILE'])) || (in_array(strtolower(substr($user_agent,0,4)),array('1207'=>'1207','3gso'=>'3gso','4thp'=>'4thp','50 1i'=>'501i','502i'=>'502i','503i'=>'503i','504i'=>'504i','505i'=>'505i','506i'=>'506i','6310'=>'6310 ','6590'=>'6590','770s'=>'770s','802s'=>'802s','a wa'=>'a wa','acer'=>'acer','acs-'=>'acs-','airn'=>'airn','alav'=>'alav','asus'=>'asus','attw'=>'attw','au-m'=>'au-m','aur '=>'aur ','aus '=>'aus ','abac'=>'abac','acoo'=>'acoo','aiko'=>'aiko','alco'=>'alco','alca'=>'alca','amoi'=>'amoi','anex'=> 'anex','anny'=>'anny','anyw'=>'anyw','aptu'=>'aptu','arch'=>'arch','argo'=>'argo','bell'=>'bell','bi rd'=>'bird','bw-n'=>'bw-n','bw-u'=>'bw-u','beck'=>'beck','benq'=>'benq','bilb'=>'bilb','blac'=>'blac','c55/'=>'c55/','cdm-'=>'cdm-','chtm'=>'chtm','capi'=>'capi','cond'=>'cond','craw'=>'craw','dall'=>'dall','dbte'=>'dbte','dc-s'=>'dc-s','dica'=>'dica','ds-d'=>'ds-d','ds12'=>'ds12','dait'=>'dait','devi'=>'devi','dmob'=>'dmob','doco'=>'doco','dopo'=>'dopo','el49'= >'el49','erk0'=>'erk0','esl8'=>'esl8','ez40'=>'ez40','ez60'=>'ez60','ez70'=>'ez70','ezos'=>'ezos','e zze'=>'ezze','elai'=>'elai','emul'=>'emul','eric'=>'eric','ezwa'=>'ezwa','fake'=>'fake','fly-'=>'fly-','fly_'=>'fly_','g-mo'=>'g-mo','g1 u'=>'g1 u','g560'=>'g560','gf-5'=>'gf-5','grun'=>'grun','gene'=>'gene','go.w'=>'go.w','good'=>'good','grad'=>'grad','hcit'=>'hcit','hd-m'=>'hd-m','hd-p'=>'hd-p','hd-t'=>'hd-t','hei-'=>'hei-','hp i'=>'hp i','hpip'=>'hpip','hs-c'=>'hs-c','htc '=>'htc ','htc-'=>'htc-','htca'=>'htca','htcg'=>'htcg','htcp'=>'htcp','htcs'=>'htcs','htct'=>'htct','htc_'=>'htc_','haie'=> 'haie','hita'=>'hita','huaw'=>'huaw','hutc'=>'hutc','i-20'=>'i-20','i-go'=>'i-go','i-ma'=>'i-ma','i230'=>'i230','iac'=>'iac','iac-'=>'iac-','iac/'=>'iac/','ig01'=>'ig01','im1k'=>'im1k','inno'=>'inno','iris'=>'iris','jata'=>'jata','java'=>'java','kddi'=> 'kddi','kgt'=>'kgt','kgt/'=>'kgt/','kpt '=>'kpt ','kwc-'=>'kwc-','klon'=>'klon','lexi'=>'lexi','lg g'=>'lg g','lg-a'=>'lg-a','lg-b'=>'lg-b','lg-c'=>'lg-c','lg-d'=>'lg-d','lg-f'=>'lg-f','lg-g'=>'lg-g','lg-k'=>'lg-k','lg-l'=>'lg-l','lg-m'=>'lg-m','lg-o'=>'lg-o','lg-p'=>'lg-p','lg-s'=>'lg-s','lg-t'=>'lg-t','lg-u'=>'lg-u','lg-w'=>'lg-w','lg/k'=>'lg/k','lg/l'=>'lg/l','lg/u'=>'lg/u','lg50'=>'lg50','lg54'=>'lg54','lge-'=>'lge-','lge/'=>'lge/','lynx'=>'lynx','leno'=>'leno','m1-w'=>'m1-w','m3ga'=>'m3ga','m50/'=>'m50/','maui'=>'maui','mc01'=>'mc01','mc21'=>'mc21','mcca'=>'mcca','medi'=>'medi','meri'=>'meri','mio8'=> 'mio8','mioa'=>'mioa','mo01'=>'mo01','mo02'=>'mo02','mode'=>'mode','modo'=>'modo','mot '=>'mot ','mot-'=>'mot-','mt50'=>'mt50','mtp1'=>'mtp1','mtv '=>'mtv ','mate'=>'mate','maxo'=>'maxo','merc'=>'merc','mits'=>'mits','mobi'=>'mobi','motv'=>'motv','mozz'=> 'mozz','n100'=>'n100','n101'=>'n101','n102'=>'n102','n202'=>'n202','n203'=>'n203','n300'=>'n300','n3 02'=>'n302','n500'=>'n500','n502'=>'n502','n505'=>'n505','n700'=>'n700','n701'=>'n701','n710'=>'n710 ','nec-'=>'nec-','nem-'=>'nem-','newg'=>'newg','neon'=>'neon','netf'=>'netf','noki'=>'noki','nzph'=>'nzph','o2 x'=>'o2 x','o2-x'=>'o2-x','opwv'=>'opwv','owg1'=>'owg1','opti'=>'opti','oran'=>'oran','p800'=>'p800','pand'=>'pand','pg-1'=>'pg-1','pg-2'=>'pg-2','pg-3'=>'pg-3','pg-6'=>'pg-6','pg-8'=>'pg-8','pg-c'=>'pg-c','pg13'=>'pg13','phil'=>'phil','pn-2'=>'pn-2','pt-g'=>'pt-g','palm'=>'palm','pana'=>'pana','pire'=>'pire','pock'=>'pock','pose'=>'pose','psio'=>'psio','qa-a'=>'qa-a','qc-2'=>'qc-2','qc-3'=>'qc-3','qc-5'=>'qc-5','qc-7'=>'qc-7','qc07'=>'qc07','qc12'=>'qc12','qc21'=>'qc21','qc32'=>'qc32','qc60'=>'qc60','qci-'=>'qci-','qwap'=>'qwap','qtek'=>'qtek','r380'=>'r380','r600'=>'r600','raks'=>'raks','rim9'=>'rim9','rove'=> 'rove','s55/'=>'s55/','sage'=>'sage','sams'=>'sams','sc01'=>'sc01','sch-'=>'sch-','scp-'=>'scp-','sdk/'=>'sdk/','se47'=>'se47','sec-'=>'sec-','sec0'=>'sec0','sec1'=>'sec1','semc'=>'semc','sgh-'=>'sgh-','shar'=>'shar','sie-'=>'sie-','sk-0'=>'sk-0','sl45'=>'sl45','slid'=>'slid','smb3'=>'smb3','smt5'=>'smt5','sp01'=>'sp01','sph-'=>'sph-','spv '=>'spv ','spv-'=>'spv-','sy01'=>'sy01','samm'=>'samm','sany'=>'sany','sava'=>'sava','scoo'=>'scoo','send'=>'send','siem'=> 'siem','smar'=>'smar','smit'=>'smit','soft'=>'soft','sony'=>'sony','t-mo'=>'t-mo','t218'=>'t218','t250'=>'t250','t600'=>'t600','t610'=>'t610','t618'=>'t618','tcl-'=>'tcl-','tdg-'=>'tdg-','telm'=>'telm','tim-'=>'tim-','ts70'=>'ts70','tsm-'=>'tsm-','tsm3'=>'tsm3','tsm5'=>'tsm5','tx-9'=>'tx-9','tagt'=>'tagt','talk'=>'talk','teli'=>'teli','topl'=>'topl','hiba'=>'hiba','up.b'=>'up.b','upg1'= >'upg1','utst'=>'utst','v400'=>'v400','v750'=>'v750','veri'=>'veri','vk-v'=>'vk-v','vk40'=>'vk40','vk50'=>'vk50','vk52'=>'vk52','vk53'=>'vk53','vm40'=>'vm40','vx98'=>'vx98','virg'= >'virg','vite'=>'vite','voda'=>'voda','vulc'=>'vulc','w3c '=>'w3c ','w3c-'=>'w3c-','wapj'=>'wapj','wapp'=>'wapp','wapu'=>'wapu','wapm'=>'wapm','wig '=>'wig ','wapi'=>'wapi','wapr'=>'wapr','wapv'=>'wapv','wapy'=>'wapy','wapa'=>'wapa','waps'=>'waps','wapt'=> 'wapt','winc'=>'winc','winw'=>'winw','wonu'=>'wonu','x700'=>'x700','xda2'=>'xda2','xdag'=>'xdag','ya s-'=>'yas-','your'=>'your','zte-'=>'zte-','zeto'=>'zeto','acs-'=>'acs-','alav'=>'alav','alca'=>'alca','amoi'=>'amoi','aste'=>'aste','audi'=>'audi','avan'=>'avan','benq'=> 'benq','bird'=>'bird','blac'=>'blac','blaz'=>'blaz','brew'=>'brew','brvw'=>'brvw','bumb'=>'bumb','cc wa'=>'ccwa','cell'=>'cell','cldc'=>'cldc','cmd-'=>'cmd-','dang'=>'dang','doco'=>'doco','eml2'=>'eml2','eric'=>'eric','fetc'=>'fetc','hipt'=>'hipt','http'=> 'http','ibro'=>'ibro','idea'=>'idea','ikom'=>'ikom','inno'=>'inno','ipaq'=>'ipaq','jbro'=>'jbro','je mu'=>'jemu','java'=>'java','jigs'=>'jigs','kddi'=>'kddi','keji'=>'keji','kyoc'=>'kyoc','kyok'=>'kyok ','leno'=>'leno','lg-c'=>'lg-c','lg-d'=>'lg-d','lg-g'=>'lg-g','lge-'=>'lge-','libw'=>'libw','m-cr'=>'m-cr','maui'=>'maui','maxo'=>'maxo','midp'=>'midp','mits'=>'mits','mmef'=>'mmef','mobi'=>'mobi','mot-'=>'mot-','moto'=>'moto','mwbp'=>'mwbp','mywa'=>'mywa','nec-'=>'nec-','newt'=>'newt','nok6'=>'nok6','noki'=>'noki','o2im'=>'o2im','opwv'=>'opwv','palm'=>'palm','pana'=> 'pana','pant'=>'pant','pdxg'=>'pdxg','phil'=>'phil','play'=>'play','pluc'=>'pluc','port'=>'port','pr ox'=>'prox','qtek'=>'qtek','qwap'=>'qwap','rozo'=>'rozo','sage'=>'sage','sama'=>'sama','sams'=>'sams ','sany'=>'sany','sch-'=>'sch-','sec-'=>'sec-','send'=>'send','seri'=>'seri','sgh-'=>'sgh-','shar'=>'shar','sie-'=>'sie-','siem'=>'siem','smal'=>'smal','smar'=>'smar','sony'=>'sony','sph-'=>'sph-','symb'=>'symb','t-mo'=>'t-mo','teli'=>'teli','tim-'=>'tim-','tosh'=>'tosh','treo'=>'treo','tsm-'=>'tsm-','upg1'=>'upg1','upsi'=>'upsi','vk-v'=>'vk-v','voda'=>'voda','vx52'=>'vx52','vx53'=>'vx53','vx60'=>'vx60','vx61'=>'vx61','vx70'=>'vx70','vx80'= >'vx80','vx81'=>'vx81','vx83'=>'vx83','vx85'=>'vx85','wap-'=>'wap-','wapa'=>'wapa','wapi'=>'wapi','wapp'=>'wapp','wapr'=>'wapr','webc'=>'webc','whit'=>'whit','winw'=> 'winw','wmlb'=>'wmlb','xda-'=>'xda-',))) ; } } I found and am using the following script to add checkbox values to a textarea. Code: <script type="text/javascript"> function add_sub(el){ if (el.checked) el.form.elements['type'].value+=el.value; else{ var re=new RegExp('(.*)'+el.value+'(.*)$'); el.form.elements['type'].value=el.form.elements['type'].value.replace(re,'$1$2'); } } </script> </head> <body> <form name="form1" method=post> <textarea name="type" rows="5" cols="35" onclick="this.focus();this.select();"> </textarea><br> <input type="checkbox" name="bob" id="bob" value="<p>" onclick="add_sub(this);"><label for="bob"><p></label><br> <input type="checkbox" name="bob1" id="bob1" value="<span>" onclick="add_sub(this);"><label for="bob1"><span></label><br> <input type="checkbox" name="bob2" id="bob2" value="<div>" onclick="add_sub(this);"><label for="bob2"><div></label> That is working. However, I wanted to put carriage returns after each checkbox value added, so I added the + "\r\n" as follows: Code: <script type="text/javascript"> function add_sub(el){ if (el.checked) el.form.elements['type'].value+=el.value + "\r\n"; else{ var re=new RegExp('(.*)'+el.value+'(.*)$'); el.form.elements['type'].value=el.form.elements['type'].value.replace(re,'$1$2'); } } </script> That is working when adding the value, but removing the value when the checkbox is unchecked is not working. I know the regular expression, etc. needs to be updated to account for the carriage returns, but I have tried everything I can think of and cannot get it to work. Help correcting the code is appreciated. Hello coding forum users, I am working on the only javascript chapter of my HTML textbook. It asks me to: Quote: replace the line <img id="sky" src="sky0.jpg" alt=""/> with a script element that writes the following HTML code: <img id='sky' src='mapNum.jpg' alt=' ' /> where mapNum is the value of the mapNum variable. so I try PHP Code: <script type="text/javascript" /> document.write("<img id='sky' src='mapNum.jpg' alt=' ' />") </script> after a few other attempts I search codingforums and find: PHP Code: document.write("<img id=\"sky\" src='sky"+mapNum+".jpg' alt='' />"); and PHP Code: document.write('<img id="sky" src="sky'+mapNum+'.jpg" alt="" />'); and these work perfectly fine but I don't understand why? my textbook only has one javascript chapter and its really small and vague, and my teacher hasn't answered my emails, so I would be grateful if anyone can tell my why my first code falls flat. Hi all, how to convert below vbscript to javascript. Please help me. It is urgent. thanks Function Base64Encode(inData) Const Base64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" Dim cOut, sOut, I For I = 1 To Len(inData) Step 3 Dim nGroup, pOut, sGroup nGroup = &H10000 * Asc(Mid(inData, I, 1)) + _ &H100 * MyASC(Mid(inData, I + 1, 1)) + MyASC(Mid(inData, I + 2, 1)) nGroup = Oct(nGroup) nGroup = String(8 - Len(nGroup), "0") & nGroup 'Convert To base64 pOut = Mid(Base64, CLng("&o" & Mid(nGroup, 1, 2)) + 1, 1) + _ Mid(Base64, CLng("&o" & Mid(nGroup, 3, 2)) + 1, 1) + _ Mid(Base64, CLng("&o" & Mid(nGroup, 5, 2)) + 1, 1) + _ Mid(Base64, CLng("&o" & Mid(nGroup, 7, 2)) + 1, 1) 'Add the part To OutPut string sOut = sOut + pOut 'Add a new line For Each 76 chars In dest (76*3/4 = 57) 'If (I + 2) Mod 57 = 0 Then sOut = sOut + vbCrLf Next Select Case Len(inData) Mod 3 Case 1: '8 bit final sOut = Left(sOut, Len(sOut) - 2) + "==" Case 2: '16 bit final sOut = Left(sOut, Len(sOut) - 1) + "=" End Select Base64Encode = sOut End Function Function MyASC(OneChar) If OneChar = "" Then MyASC = 0 Else MyASC = Asc(OneChar) End Function Hi all, I created a program for my company that allows employees to log in, and make their annual leave selections. It was made in Flash Builder with AS3. It contains a datagrid with 7 available leave slots for each day of the year. Employees click on an available slot and their name in inserted. We go through this process 4 times, with each employee selecting 5 days per round until they have selected up to 20 days of annual leave. We use company seniority to rank the order in which the employees pick. I hope I've explained that clearly enough to have someone help me with my question Since I want to move from Flash, I would like to use Javascript, Jquery and HTML5 to completely redo our website so it can be used on phones, tablets, etc. I have built a calendar and can cycle through the months (i'd eventually like to get a year view), but I'm having issues with a couple of items I had built into the flash version. First of all, I want to be able to show each employees work schedule on the calendar. They all work rotating shifts of 5 on 4 off. In AS3 i've taken their rotation, paired it with a start date for that rotation and was able to indicate in the datagrid "WORKING" on their days of work. This enables them to pick leave on their correct working days. In Jquery, I'd like to color the calendar on the dates that they are scheduled to work. IS that possible? Secondly, they pick 5 days of leave at a time. I'd like to display a token of some sort on the page that contains their name. They could then drag the token to a day that they would like to have off. Once they click submit, the selections are submitted to the MySQL database I have set up. How can I create these tokens based on the user's login name. Sorry for the noob questions. I'm just trying to get my head around the nuances of Javascript and jQuery Thanks for any help!! Whats wrong with the code below? I'm trying to get the email service provider name. Code: <html> <head> <script type="text/javascript"> function GetProvider { var fullemail = openinviter.email_box.value; var afterat = fullemail.split("@"); var Provider = afterat[1].split("."); var showit = Provider[0]; openinviter.provider_box.value=showit; } </script> </head> <body> <form action="" method="post" name="openinviter"> <input type="text" name="email_box" onchange="GetProvider()" /> <input type="text" name="provider_box" value=""> </form> </body> </html> Thanks alot! Hey guys, I am doing a website and the way it is suppose to work is when you click on a link there is a little triangle beside it, so when you click on it the triangle is suppose to face down but more links appear when you click on it. Anyways here is the code if someone could please tell me what im doing wrong? HTML Code: <ul class="menu" id="subnavmenu"> <li><a href="#" onClick="showHide('sublist1');return false;" id="subheading">About Us</a> <ul id="sublist1" style="display:none;"> <li><a href="#">Visit Us</a></li> <li><a href="#">Contact Us</a></li> <li><a href="#">Archives Unboxed and Revealed</a></li> </li> </ul> CSS Code: #subnavmenu ul.menu { display: block; overflow:hidden; } JAVASCRIPT Code: function showHide(element_id) { if (document.getElementById && document.getElementById(element_id) && document.getElementById(element_id).style) { var menu = document.getElementById(element_id); var arrow = document.getElementById(element_id + '_arrow'); if (menu.style.display == "block") { menu.style.display = "none"; if (arrow.src) { arrow.src = arrow.src.replace("down","right"); } } else { menu.style.display = "block"; if (arrow.src) { arrow.src = arrow.src.replace("right","down"); } } } } |