JavaScript - Using Forms With Java (similar To Facebook)
So what I'm actually refering to is something similar to facebooks sign up page. Where you have a form and you start typing the name of a high school or college and they automatically match what your typing in a drop down window. Here's an example pictu
Any help pointing me in the right direction would be outstanding. Also I am pretty sure this is javascript, so I figured this was the right section for it. Thanks in Advance, Ryan Similar TutorialsHi, I'm wanting to do these types of sites: http://usa-fight.info/ but itll be legit, im trying my best to monetize and using coding to make the best converting/viral websites. i think this script does it that it automatically 'likes' and 'shares' [im not sure about 'shares' part but it auto 'likes' for sure when you click on the iframe] and when you click on the iframe the content gateway pops up. In helping me do this i can learn also and implement different things in the future myself (: but yeah, how can i create someting like this? and im looking forward to having some type of script that would automatically generate a new 'viral' website so i wont have the hassle of MANUALLY creating same-type of sites over and over and over again lol, i know theres sometype of program/script that would do that for me its just the matter of asking the right person that knows where to get something like that or having someone script it for me so i can learn from them as well. but yeah (: i guess those are mainly my questions right now haha. im a 16 yr old filmmaker who, with these skills i can potentially learn, can make viral websites for his [my :P] videos. Is it possible for me to get this: http://apps.facebook.com/shimmycocopuffsss/ without the need of 25K subscribers? i think this tool would GREATLY help my youtube channel go viral, and therefore giving me exposure for my film-making career. maybe someone can PM for this? buuut yeah, sorry kinda went off topic there :P but yeah, any help on this issue??! (: thanks! PS - i actually no pretty much nothing about javascript/coding for that matter. and im willing to learn, but right now my parents are in need of money and my internet marketing ventures will help them much, aswell for buying gear for filmmaking :P but yeah, my parents are in dire need of money. Hi, I'm trying to put some kind of code for some kind of facebook game but then the problem that I'm having is this code kinda broken now, which is mean not really support to the new facebook platform or new version of facebook and the facebook game have change many links in itself I try to update it but never success on this project, if someone could assist me where to start or what to do please do so will be much appreciate for the help in advance Code: javascript:( function() { var d, url, t, i; d = window.open().document; url = location.href; d.write('<p>'); if (url.match(/clearance/)) { var user_id; var pets, li, im; var pet_link, pet_id, pet_name, pet_seller, pet_price; t = document.getElementById('app7019261521_my_monies') .getElementsByTagName('a')[0].getAttribute('href'); user_id = t.substr(t.lastIndexOf("/") + 1); d.write(' HotBuys</p>'); d.write('<table><tr><td valign="top"><table>'); pets = document.getElementsByClassName('user-item on_sale'); for (i = 0; i < pets.length; i++) { im = pets[i].getElementsByTagName('img'); if (im.length > 0) { t = im[0].getAttribute('src'); } else { t = "http://static.ak.fbcdn.net/pics/s_silhouette.jpg" } li = pets[i].getElementsByClassName('text')[0].getElementsByTagName('li'); pet_link = li[0].getElementsByTagName('a')[0].getAttribute('href'); pet_id = pet_link.substr(pet_link.lastIndexOf("/") + 1); pet_name = li[0].getElementsByTagName('a')[0].firstChild.nodeValue; pet_price = li[1].getElementsByClassName('money')[0].firstChild.nodeValue; if (i%5 == 0) { d.write('<tr>'); } d.write('<td width="100px" valign="top">'); d.write('<a style="font-size:60%" rel="nofollow" target="P" href="' + pet_link + '">'); d.write('<img width="100" height="100" src="' + t + '"/></a><br/>'); d.write('<a style="font-size:60%" rel="nofollow" target="P" href="' + pet_link + '">' + pet_name + '</a><br/>'); d.write('<span style="font-size:70%">' + pet_price + '</span>'); d.write('<table><tr><td>'); d.write('<form method="post" rel="nofollow" target="P" action="http://apps.facebook.com/friendsforsale/users/buy/' + pet_id + '">'); d.write('<input name="buyer_id" type="hidden" value="' + user_id + '"/>'); d.write('<input type="submit" value="Buy"/></form></td><td>'); d.write('<form method="post" rel="nofollow" target="Q" action="http://apps.facebook.com/friendsforsale/users/buy/' + pet_id + '">'); d.write('<input name="buyer_id" type="hidden" value="' + user_id + '"/>'); d.write('<input type="submit" value="Buy"/></form></td></tr></table></td>'); if (i%5 == 4) { d.write('</tr>'); } } d.write('</table></td><td valign="top">'); d.write('<iframe name="P" width="400" height="540"></iframe>'); d.write('<iframe name="Q" width="400" height="540"></iframe>'); d.write('</td></tr></table>'); } else if (url.match(/users\/show/)) { var user_id, pet_id, pet_name, pet_value, pet_cash; var info, info_money, title_icon; var achievements, badges, badge_pages, badge_count, n_tycoon = 0, n_collar = 0; t = document.getElementById('app7019261521_my_monies') .getElementsByTagName('a')[0].getAttribute('href'); user_id = t.substr(t.lastIndexOf("/") + 1); t = url.match(/users\/show\/[0-9]+/)[0]; pet_id = t.substr(t.lastIndexOf("/") + 1); t = document.title; pet_name = t.substr(t.lastIndexOf("|") + 2); info = document.getElementsByClassName("info"); info_money = info[0].getElementsByClassName("money"); pet_value = info_money[0].firstChild.nodeValue; pet_cash = info_money[1].firstChild.nodeValue; title_icon = document.getElementsByClassName("general")[0] .getElementsByClassName("title_icon"); achievements = document.getElementsByClassName("achievements"); if (achievements.length > 0) { } d.write('</span> <span style="color:#777">value:</span> ' + pet_value); d.write(' <span style="color:#777">cash:</span> ' + pet_cash); d.write(' <a href="http://apps.facebook.com/friendsforsale/comments?a=' + user_id + '&b=' + pet_id + '" rel="nofollow" target="P">C2C</a>'); d.write(' <a href="http://apps.facebook.com/friendsforsale/users/admin_dialog/' + pet_id + '" rel="nofollow" target="P">AD</a></p>'); d.write('<table border="0" cellpadding="0" cellspacing="0"><tr>'); d.write('<td><form method="post" rel="nofollow" target="P" action="http://apps.facebook.com/friendsforsale/users/buy/' + pet_id + '">'); d.write('<input name="buyer_id" type="hidden" value="' + user_id + '"/>'); d.write('<input type="submit" value="Buy"/></form></td>'); d.write('<td><form method="post" rel="nofollow" target="Q" action="http://apps.facebook.com/friendsforsale/users/buy/' + pet_id + '">'); d.write('<input name="buyer_id" type="hidden" value="' + user_id + '"/>'); d.write('<input type="submit" value="Buy"/></form></td>'); d.write('<td><form method="post" rel="nofollow" target="P" action="http://apps.facebook.com/friendsforsale/users/update/' + pet_id + '">'); d.write('<input name="" type="submit" value="Nick"/><input name="nickname" type="text" size="10"/></form></td>'); d.write('<td><form method="post" rel="nofollow" target="P" action="http://apps.facebook.com/friendsforsale/users/sale/' + pet_id + '">'); d.write('<input name="" type="submit" value="Sale"/></form></td>'); d.write('<td><form method="post" rel="nofollow" target="P" action="http://apps.facebook.com/friendsforsale/users/release/' + pet_id + '">'); d.write('<input name="" type="submit" value="Free"/></form></td></tr></table>'); d.write('<table border="0" cellpadding="0" cellspacing="0"><tr>'); d.write('<td><form method="post" rel="nofollow" target="P" action="http://apps.facebook.com/friendsforsale/users/' + pet_id + '/comments/create">'); d.write('<input name="" type="submit" value="Comment"/><textarea rows="1" col="20" name="comment" type="text" style="vertical-align:top"></textarea></form></td>'); d.write('</tr></table>'); d.write('<iframe name="P" width="400" height="540"></iframe>'); d.write('<iframe name="Q" width="400" height="540"></iframe>'); } else { d.write(' </p>'); } d.write('</body></html>'); d.close(); } )() I'm using the autofill forms plugin for firefox which can be found he https://addons.mozilla.org/en-US/firefox/addon/4775 I use it to automatically fill various web forms, duh. But I would like certain values to be chosend randomly from a list I create. I contacted the developer and he said the add on probably does not need a new feature because there is a 'dynamic tags' function to fill certain forms with dynamic values (e.g. the current time or date). He has given over the project to another developer and told me I probably would find a solution in a good javascript programming forum. So here I am! Can anyone help me with this? Basically, I just need a javascript code which chooses on item from an array randomly, I guess? I'm not a programmer myself, so any help would be greatly (!) appreciated. Thanks a lot in advance for any further guidance! Note: Here are sample dynamic tags from the plugin: <datetime> new Date().toLocaleString() <useragent> navigator.userAgent <langcode> navigator.language <resolution> screen.width+'x'+screen.height <clipboard> this.getClipboardText() Thread Closed
I would like to ask people's opinions as to which "offline" language is most similar to javascript? I don't program for a living, but I have been learning javascript in my spare time. I would now like to have a shot at making a desktop application, and I think it would help to choose one which is most similar, if at all possible, to javascript? e.g. python, ruby, C#, visual basic ... I have no idea and haven't had much luck googling this Thanks Matt Hello all i need to be able to make small peace of js code that the user can drag to is IE browser and then invoke it on the page . Hi, I need to allow some other websites to show certain portions of my website as though it were part of theirs. Simplest way would be in an iframe, but I would prefer to make the content available similar to the google map api where something like this is included in the header:- Code: <script src="http://maps.google.com/maps?file=api&v=2&sensor=true&key=blahblahblah" type="text/javascript"> </script> and in the body something like this:- Code: <div id="map" style="width: 740px; height: 520px; margin: 5px 0px 20px 0px; padding: 5px; border: 3px solid #FFDD00;"></div> So I am guessing that something in the file being called in the src of the script tag is replacing the div with id="map" with other contents. Can someone give me a simple example of doing this? Thanks. Hello, I have the code in the annexe wich is working but grossly redondant, clearly, I would like to have only one function toggleEditor(), that would manage the global variables editInstance with a parameter or something equivalent to avoid having 2 twin like functions. Thanks for your suggestions. HJS Annexe : Code: <html> <body> <script src="../flovinax.js" type="text/javascript"></script> <script> var editInstance= null; function toggleEditor1(edtN) { if(editInstance===null) { editInstance = new flovinaxa({fullPanel : true}).panelInstance(edtN); } else { editInstance.removeInstance(edtN); editInstance= null; } } var editInstance2= null; function toggleEditor2(edtN) { if(editInstance2===null) { editInstance2 = new flovinaxa({fullPanel : true}).panelInstance(edtN); } else { editInstance2.removeInstance(edtN); editInstance2= null; } } </script> <div> <textarea style="width: 800px; height: 200px;" id="myArea"></textarea> <br /> <button onClick="toggleEditor1('myArea');">+</button> </div> <div style="clear: both;"></div> <div> <textarea style="width: 800px; height: 200px;" id="myArea2"></textarea> <br /> <button onClick="toggleEditor2('myArea2');">+</button> </div> <div style="clear: both;"></div> </body> </html> Hi There, I really need your help. I am aware that there is no isDate() function for javascript, however, how could one check a date against a validator to ensure that the date entered is either returned true or false the date format that I would like to check would consist of the dd/mm/yyyy so essentially: isDate("12/01/2012") would return as true isDate("N/A") = would return as false I have searched high and low and am counting on the experts on this forum for some major help. A huge thanks in advance and I really appreciate everything. Cheers, Jay I have created a slideshow before but I want to create a slideshow where a person clicks on a link and it goes to a certain picture which might have one or more links embedded into the picture something like this: http://www.myeloma.org.uk/ any guides on how to do this? help much appreciated http://www.premierleague.com/page/Ga...047853,00.html
I have searched for a rotating image script to use at mrsgriffins.com and am currently using Tony Foster's Picture Cube slideshow downloaded from javascript.com. This is EXACTLY the effect I wanted, but it only works with IE since it uses MS-only code. Is there a similar script that is more universal? Thanks for any help! I have created a program that works great but sometimes it does not finish. It is the exact same as the one we see in this forum when you want to insert an image into a forum post. The program takes in a users image url through prompt, then regenerates the information within the textbox with [img] tags. The problem is I try to do this once and it will work great, but then I will try it again and fill out all of the information the exact same way and nothing happens. By nothing happens I mean after I hit enter the text box will remain empty with no regenerated code. But if I do a page refresh it works. That leads me to believe there is nothing wrong with my code b/c I do it once and get a sound result, then again and get nothing. Anyone have any experience with broken programs like this before or any words of advice? PHP Code: <script language="javascript"> function imgGenerator(){ var question=confirm("Share a Picture?"); if (question==true){ var obj=document.getElementById("mngl-board-post-input"); var imgurl = prompt('To Share an image paste the image url here \nSupport .jpg .jpeg .gif .bmp and .png'); if (imgurl == "" || imgurl == null) {return false;} var txt=document.createTextNode("[a][img]"+imgurl+"[/img][/a]"); obj.appendChild(txt); } else {} } </script> PHP Code: <a href="javascript:void(0);" onClick="imgGenerator();"><img src="http://instride.org/images/image.png" alt="Share an Image" /></a> The code I will am including is far from finished, but some of what I do have works (the "submit" code does not work yet). I am able to prevent certain kinds of input including Shift-Ins pasting, but Ctrl-v pasting still works (and I do not want it to). Could you please tell/show me what code needs to be entered to my existing functions, or what new function I need to create (and call from my existing functions) to eliminate any kind of CtrlKey input? Thanks in advance, mitchellA <code> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title> Mitchell's Test Form </title> <meta name="Generator" content="Alleycode HTML Editor"> <meta name="Description" content="Your description here..."> <meta name="Keywords" content="Your keywords here..."> <script type="text/javascript"> function is_it_A (e) {// allows only a-z, A-Z, <backspace>, <space>, apostrophe, and hyphen var a; document.all ? a = e.keycode : a = e.which; return ((a > 64 && a < 91) || (a > 96 && a < 123) || a == 8 || a == 32 || a == 39 || a == 45); } function is_it_P (w) {// allows only a-z, A-Z, 0-9, <backspace>, hyphen, and underscore var p; document.all ? p = w.keycode : p = w.which; return ((p > 47 && p < 58) || (p > 64 && p < 91) || (p > 96 && p < 123) || p == 8 || p == 45 || p == 95); } function is_it_N (i) {// allows only 0-9, <backspace> var n; document.all ? n = i.keycode : n = i.which; return ((n > 47 && n < 58) || n == 8); } function is_it_T (p) {// allows only 0-9, <backspace>, <right & left brackets()>, and hyphen var t; document.all ? t = p.keycode : t = p.which; return ((t > 47 && t < 58) || t == 8 || t == 40 || t == 41 || t == 45); } function is_it_E (m) {// allows only 0-9, a-z, A-Z, <backspace>, hyphen, <period (.)>, <at (@) sign>, and underscore var e; document.all ? e = m.keycode : e = m.which; return ((e > 47 && e < 58) || (e > 64 && a < 91) || (e > 96 && a < 123) || e == 8 || e == 45 || e == 46 || e == 64 || e == 95); } function xA (str) { return str.replace (/[^a-z\'\-\ ]/gi,""); } function xN (str) { return str.replace (/[^0-9]/gi,""); } function xT (str) { return str.replace (/[^0-9\(\)\ ]/gi,""); } function xE (str) { return str.replace (/[^a-z\0-9\-\_\.\@\_]/gi,""); } function validateFormOnSubmit (theForm) { var f=document.forms["theForm"]["fname"].value var l=document.forms["theForm"]["lname"].value var p=document.forms["theForm"]["pwd"].value var e=document.forms["theForm"]["eml"].value if (f==null || f=="") { fld.style.background = "red"; alert = ("Please enter your First Name."); return false; } else if (l==null || l=="") { fld.style.background = "red"; alert = ("Please enter your Last Name."); return false; } else if (p==null || p=="") { fld.style.background = "red"; alert = ("Please enter your Password."); return false; } else if (e==null || e=="") { fld.style.background = "red"; alert = ("Please enter your e-mail address."); return false; } else { fld.style.background = "white"; } } </script> </head> <body> <CENTER> <FORM name="theForm" onsubmit="return validateFormOnSubmit ()"> <H1>Please supply the following data...</H1> <br /> <FONT size="5"> <label for="fname">First Name: </label><INPUT type="text" onkeypress="return is_it_A(event)" onblur="this.value=xA(this.value)" name="firstname" id="fname"><br /> <br /> <label for="lname">Last Name: </label><INPUT type="text" onkeypress="return is_it_A(event)" onblur="this.value=xA(this.value)" name="lastname" id="lname"><br /> <br /> <label for="pwd">Password: </label><INPUT type="text" onkeypress="return is_it_P-(event)" onblur="this.value=xA(this.value)" name="password" id="pwd"><br /> <br /> <label for="eml">E-mail Address: </label><INPUT type="text" onkeypress="return is_it_E(event)" onblur="this.value=xA(this.value)" name="email" id="eml"><br /> <br /> <input name="info" type="submit" value="Done>>"> </font> </CENTER> </FORM> </body> </html> </code> Hello Coding Forums, I am working on building a watch app for the Pebble smartwatch that works in combination with a Bluetooth light bulb that could trigger on and off functionality. I have bits of the source code from a the same bulb project someone started from another site that is coded Java, so I imported them into cloud pebble their java library. I've been working on this since last year and I'm wondering what at all could I be doing wrong. I get the "cards" to show up, but as far as a connection to the bulbs I have not established that yet. I've attached my source code and if anyone has any time to give me some pointers that would be appreciated massively. I know that Hubble worked on a similar project, to control lighting from a pebble smartwatch so I know it can be done. I've even tested this code with other developers who are experienced and they are also wondering why the connection does not take place. It would be really neat if I got this to work. Thank you everyone. Attached Thumbnails Hi all, I use a forum hosting provider called forumotion and they have a chatbox feature on it. When a new message arrives I would like it to say so in the browser tab like facebook does. Here is the current code I am using: Code: <div id="fbfcbframe" style="display:none;background:white;padding:0px;position:fixed;bottom:25px;right: 23px;border:1px solid black;width:900px;"><div style="font-family:'lucida grande',tahoma,verdana,arial,sans-serif;font-size:11px;background-color: #526EA6;margin:-1px;margin-bottom:0px;padding: 4px 8px 5px;color:white;border-bottom: 1px solid #526EA6;border: 1px solid #254588;text-align:left;">Chat | <a href="http://www.thefacebookforum.net/Chat-Rules-and-Reminders-h22.htm"><font color="white">Rules and Reminders</font></a> | <a href="http://www.thefacebookforum.net/Chatbox-Reports-h33.htm" title="Submit your report"><font color="white"> Make a Report</font></a> <div style="height:16px;width:16;text-align:center;cursor:pointer;position: absolute;right: 5px;top: 2px;" id="minimize" onClick="this.parentNode.parentNode.style.display='none';document.getElementById('fbfcb').className='unclicked'"><div style="margin-top:10px;background-color: #ADBED8;float: right;height: 2px;overflow: hidden;width: 9px;"></div></div></div> <iframe id="cbframe" src="/chatbox/chatbox.forum"></iframe></div><script>document.getElementById('fbfcbframe').childNodes[1].onClick="document.getElementById('fbfcb').click();return 0";function toggleframe(){var x=document.getElementById('fbfcbframe').style;if(x.display=='none'){x.display='block';}else{x.display='none';}}</script><div id="fbfcb" class="unclicked" onClick="toggleframe();if(this.getAttribute('class')=='unclicked'){this.className='clicked'}else{this.className='unclicked'}"><img src="_.gif" style="width:16px;height:16px;margin-bottom:-2px;position:relative;bottom:-5px;left:-3px;background: transparent url(http://static.ak.fbcdn.net/rsrc.php/z3O30/hash/3wq3vjh4.png) no-repeat scroll -631px -101px;"> Chat</div> <style> #cbframe{border:0px solid black;height:290px;margin:-2px;margin-bottom:0px;width:900px;background:transparent}#fbfcb{width:188px;cursor:pointer;padding:3px 12px;background:url(http://static.ak.fbcdn.net/rsrc.php/z1V2B/hash/apfsevhg.png) repeat-x 0px 0px;font-family:'lucida grande',tahoma,verdana,arial,sans-serif;font-size:11px;padding-bottom:6px;border-top:1px solid #b5b5b5;border-right:1px solid #b5b5b5;border-left:1px solid #b5b5b5;-webkit-user-select:none;text-align:left !important;position:fixed;bottom:0px;right:23px}#fbfcb:hover{width:188px;cursor:pointer;padding:3px 12px;padding-bottom:6px;background:white;font-family:'lucida grande',tahoma,verdana,arial,sans-serif;font-size:11px;border-top:1px solid #c5c5c5;border-right:1px solid #c5c5c5;border-left:1px solid #c5c5c5}.clicked{background:white !important;border:1px solid black !important;border-top-width:0px !important}.unclicked{}#minimize{height:16px;width:16;text-align:center;cursor:pointer;position:absolute;right:5px;top:2px}#minimize:hover div{background:white !important} </style> <span id="cbalarm"></span> <script type="text/javascript"> var cbmp3='http://fsb.zedge.net/content/2/3/3/3/4-813701-23333571.mp3'; var cbverif=1; var cbbegin=3; function getlastcb(){ if(jQuery('#cbframe').contents().find('#chatbox > p:last-child').length==0) return ''; else return jQuery('#cbframe').contents().find('#chatbox > p:last-child').html(); } function checkcb(){ if(getlastcb()==oldcb) return; oldcb= getlastcb(); if(oldcb=='') return; jQuery('#cbalarm').html('<object id="cbalarm" type="application/x-shockwave-flash" data="http://www.fileden.com/files/2010/6/2/2877694//dewplayer-mini.swf" width="0" height="0" style="visibility:hidden"><param name="movie" value="http://fsb.zedge.net/content/2/3/3/3/4-813701-23333571.mp3" /><param name="flashvars" value="mp3='+cbmp3+'&autoplay=1" /></object>'); } setTimeout("var oldcb=getlastcb();setInterval('checkcb()',cbverif*1000);",cbbegin*1000); </script> I know it is messy, it is to prevent rippers on forumotion. I have a facebook code script but I dont know if it is javascript or something else, the thing is it is not valid. Can anyone show me how to make it valid? <div class="rightside4"> <h3>Follow us on Facebook</h3> <script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script> <fb:like href="http://www.facebook.com/pages/Lewisham-Community-Transport-Scheme/186259418081861" show_faces="true" width="255" font="tahoma"></fb:like></div> Hey I'm looking to create a button like Facebook has that just says Like. Since I have little JavaScript experience I was wondering if anyone could point me towards a tutorial or code me one. I could do it with just a link and PHP but I want to use Ajax. http://venturebeat.com/wp-content/up...ike1020909.png So my mom owns a business and has a facebook page (for her business.) I want to know how to create a javascript that will make anyone who views her facebook page automatically like it. Is this illegal? Can anyone help? x em-jay x how can i make one of these: http://likes.adstormer.com/ ?? is there a free script out there? |