JavaScript - How To Make Pop Up Windows Such On Facebook?
Hi, I'm trying to make a pop up window that should work such as the window the pops up when you press "View all friends" on one of your friends' profiles on Facebook.
Is this possible? Thank you! Similar TutorialsHi 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'm sure there are people here who are familiar with the Facebook javascript library. It's pretty straight forward, but I'm having one issue with my program and I don't see the best way around it. I have two logins for my website. A user can log in with their facebook, and it's encouraged as I'm implementing facebook features through out it, but I also need to have a very strict control over who is able to actually modify the database. Basically, if a user comes to the site and logs in with facebook, I check for their email, if it doesn't exist, an account is created, but it's level one and theres also an isReg field that's set to 0. If the email address is already found, I simply add the facebook data to the existing account. If a facebook user wants to become an actual client, I then send them through my traditional registration process. Pretty basic as far as facebook implementation goes. My problem, however, is with the facebook javascript itself. Since the program is mostly PHP based, I have the facebook login fire the script I talked about above, and it sets up the session variables I use to control who has access to what. The problem is after the ajax call, I need the page to refresh so it shows the user access stuff that's tied into the PHP program. The logout refresh works great, but as you can see with this code, if I put something like "window.location="ect"", it would send the browser into an endless loop. I need some advice on how to refresh this page so the php session stuff gets added after a Facebook login. Code: <script type="text/javascript"> window.fbAsyncInit = function() { FB.init({appId: '215993265079207', status: true, cookie: true, xfbml: true}); /* All the events registered */ FB.Event.subscribe('auth.login', function(response) { // do something with response login(); }); FB.Event.subscribe('auth.logout', function(response) { // do something with response logout(); }); FB.getLoginStatus(function(response) { if (response.session) { // logged in and connected user, someone you know login(); } }); }; (function() { var e = document.createElement('script'); e.type = 'text/javascript'; e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js'; e.async = true; document.getElementById('fb-root').appendChild(e); }()); function fbloginClick(){ FB.login(function(response) { if (response.session) { if (response.perms) { // user is logged in and granted some permissions. // perms is a comma separated list of granted permissions } else { // user is logged in, but did not grant any permissions } } else { // user is not logged in } }, {perms:'email,user_birthday'} ); } function login(){ //Fire the PHP Facebook Auth Script var xmlhttp; if (window.XMLHttpRequest){// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); }else{// code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.open("POST","http://www.thehoppr.com/clients/facebook/facebook_auth.php",true); xmlhttp.send(); } function fblogoutClick(){ FB.logout(function(response) { // user is now logged out }); } function logout(){ //Fire the PHP Logout Script var xmlhttp; if (window.XMLHttpRequest){// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); }else{// code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.open("POST","http://www.thehoppr.com/clients/logout.php",true); xmlhttp.send(); window.location.reload; } </script> Anyone got any ideas for me here? 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> 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? 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 First time poster. so be kind Hi All, I have found a bit of shared code on the net that can be used on Facebook. The way it is used is on profiles, or groups, that extend beyond an original page. You load the page and then paste the script into the address bar (in FF and chrome) and hit enter. This then goes down and looks for the 'older post' tag and expands it every 4 seconds. When it gets to the end of the group, it does not stop, it just goes into a loop and restarts from the beginning. I am wanting help to get it to stop at the end of the first pass. This is the code: Code: javascript:function clrt(){alert('Stopped Post Load');if(f_sM){clearTimeout(f_sM);}};function showMore(){ProfileStream.getInstance().showMore();f_sM = setTimeout(showMore, 4000); xsm=document.getElementById('profile_pager_container');xsm.addEventListener('click',clrt,false)}; showMore(); I have also seen it done, with the same looping results, with this code: Code: javascript:function showMore() {ProfileStream.getInstance().showMore(); setTimeout(showMore, 4000)} showMore(); Can anyone help please? Thanks I have been working on this for four hours and none of the methods online have worked. Every site has outdated screenshots and I have nowhere else to turn. There's supposedly just a couple of lines of code and "3 easy steps" to allow me to have a Facebook comment box on any page of my site. I DO NOT use Wordpress or any blogging software / sites. I am working from scratch in Dreamweaver. What am I missing?
I need a script that can go on someone's facebook profile and like everything, including all their photos and such and all of their statuses and comments on their statuses. I don't intend to use this for too terribly much evil, just winning a notification spam fight. Also, I'm a complete and total noob at scripting. Don't know where to start.
Hi All, Im looking for someone that is great with java script and facebook i have a java app right now i want to add the feature to post to friends walls and so i can change that number as well so if someone clicks on the app the script all ready post to there wall but i want it to post to 15 - 25 of there friends walls over even all friends walls as well. Need these added asap i do have some java that does this all ready just need it added to the script Thanks Hello guys. I have a daily deal aggregator site and i can't get the Facebook share to work properly. There are lots of deals on each page and each one has it's own FB share so they can post it on their wall, friends walls etc. here is the site so you can try the sha http://bit.ly/xFGzj5 Here is the code Im using now: Code: <!-- Each Deal has this button that links to FB --> <a href="http://www.facebook.com/share.php?u=<?php echo urlencode($shareurl); ?>" onclick="return fbs_click('<?php echo urlencode($shareurl); ?>','<?php echo $title; ?>')" target="_blank"><img src="../../images/fb.png" border="0" alt="Share On Facebook" class="smicon" /></a> <!--And here is the JS function:--> <script> function fbs_click(u,t) { window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&t='+encodeURIComponent(t),'sharer','toolbar=0,status=0,width=626,height=436'); return false; } </script> With this method, right now the title is not working properly, and sometimes an image shows up, sometimes it doesn't. When an image does show there are about 200 thumbnails to choose from (depending on how many deals are on the page) so the user has to cycle through it until they find the right one. Ideally, I want the url/title working properly (obviously) and have the image go to that specific deal's image by default when they click the share button. Anyone have any ideas on how to make this work??? Thank you so much! -Removed due to solution found-
Hello! I'm trying to make a website that from one link, opens multiple windows. It is for a design project (I'm still at uni). So far I have mustered just the one window. Here is the website: http://popmeup.org/ The idea is that you get bombarded with lots of nice quotes. I don't know my arse from my Javascript - but has anyone got any advice? This is my first time writing any JavaScript, so I am not very familiar with the language. I want to make a window be kept at the back, under all other windows. From what I understand, the method to do this would be window.blur(), but I cannot seem to get it to work. Have I misunderstood the functionality, or am I implementing it wrong? The part of the code I have that currently deals with this (or at least tries) is as follows: Code: <BODY onclick="window.blur()" > <img src="imageurl" id="image"></img> </BODY> I've tried a few other events to trigger this (onmouseover, setInterval, etc.) but no way I've tried has worked. So, is blur() the right method to do this? have I done something wrong in the implementation? Any help and guidance is appreciated. Backstory (if it should matter for some reason) : I found a webpage ( here and here ) that generates an image of the Earth as seen from space at a given time and I wanted to place that image, updated on a regular basis, as my desktop image. I looked around for a way to do it, but as far as I could find, there was no way to do it easily in Windows XP. Thus, I am now using Samurize (a program for overlaying graphics etc. at your desktop) to create a browser window that loads a html file that periodically updates the image. While this window cannot be moved and has no borders, it can be selected and if it is selected, the image is brought to the front, overlapping any other windows. I wish to make it such that this cannot happen; I have tried configuring Samurize as well as asking for help on their forums, but no luck so far. Hi. I don't know if anyone here has downloaded the dev edition of windows 8 yet (it was released last night 5:00p, est) I am trying to get jquery to work, but it just wont... I tried simple stuff, but I was hoping someone here knew how. Thanks I thought I did everything right but pop-up windows aren't working... Code: <td> <a href="javascript:popUp('http://www.retrocitysunglasses.com/popupfreeshipping.html')"><img src="http://www.retrocitysunglasses.com/website_graphics/header_free_shipping.jpg" alt="Free Shipping"></a> </td> Code can be found on this page (very first section after body opens): http://retrocitysunglasses.com/ You can see the website here with all the code to make it easier for you to diagnose what is happening: Code: http://www.fdfdaa.com/desktop/desktop.html When you go to the start menu and select anything on the left side, you will see that windows open 100% of the screen by default. I did that by adding maximized:true but that doesn't appear to be working for the icons on the desktop itself. If you click on one of those 4 icons on the desktop though, it isn't opening at 100% for some reason. You can see my classes file here as well: Code: http://www.fdfdaa.com/desktop/classes.js Any help will be greatly appreciated. Thank you for your time! Hi to all! Dont know if this is the right place... I have the following jquery script, the function is to sow the submit button when the textarea is selected and dissapear when not. The script works fine, the only thing missing is that I need the box to automaticly adjust height upon lines inputed, same as the facebk web. Code: <div id=\"comments_container\"> <form method=\"POST\" action=\"\"> <textarea id=\"comment_\" name=\"\" rows=\"\" cols=\"\"></textarea> <input id=\"submit_\" type=\"submit\" name=\"submit\" value=\"submit\"> </form> </div> <script type="text/javascript"> jQuery("[id^='comment_']").live('focusin focusout',function(e){ var commentText = "Write a comment...", id = this.id.replace('comment_',''), val = jQuery(this).val(); if (e.type == 'focusin'){ val = (val == commentText) ? '' : val; jQuery("#submit_"+id).show(); } else if (e.type == 'focusout') { val = (val == '') ? commentText : val; if( val == commentText){ jQuery("#submit_"+id).hide(); }} jQuery(this).val(val);}).trigger('focusout'); </script> 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 Hi, 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. |