JavaScript - Help With Pesky Banned Forum Member
Hello good folks of CodingForums.com. I'm not a coder, but I have a problem that perhaps one of you might be interested in helping me solve.
I run a forum (using SimpleMachinesForum software) and one of the members started vandalizing it. I banned him, by adding his IP address to the ban list. I just found out today (buy looking at a log file) that he is accessing the site many times daily as a guest, and frankly, the guy's such a jerk, I (at first) wanted to block him. I used a "deny from xxx.xx.xxx" command on the htaccess file... BUT.... This guy is a REAL jerk. I mean... seriously. So here's what I want to do, and please tell me if (and how) it is possible: Whenever he tries to access my forum, I want him, and ONLY him, to be re-directed to some embarrassing website (something with a very loud autoplay file or multiple windows). Can this be done? My coding knowledge is ZERO, but the guy I run the forum with has some basic skills. Many thanks to any who respond. Similar TutorialsHi guys, Do you know a function for banning certain words being inputted by the user eg I want to stop a user uploading offensive words and code tags like <script>, <div> etc.. and messing with the site display Thanks Hi folks, I'm having problem setting up event handling using member functions. Consider the following code snippet: Code: function Widget() { ... this.register = function() { ... document.getElementById(this.id).addEventListener('click', this.default_click_handler, false); } this.default_click_handler = function(event) { this.do_something_useful(); //<--??? } this.do_something_useful = function() {...} } However I don't manage to call do_something_useful(), I get a this.do_something_useful() is not a function error. What am I doing wrong? Any help is appreciated, Thanks, A. Hi guys, I am facing the above problem for a chatroom app that I am making. People will enter and exit the room any time they want, so i need a member list that updates itself to reflect this on the screen of all users that are in the chatroom. What i have thought of, is to have JS call a PHP function on specific intervals, and that PHP function will retrieve user data from a database and pass it to JS to display on the list. Is this method advisable? Are there any more suitable ways of doing this? I am thinking of applying the same theory for displaying and retrieving chat messages, but i get the feeling that something's missing for this, or maybe this method is not right for displaying messages. Hi everyone, I want the source code of creating forum in JavaScript language.ASAP
This is my second post in codingforums.com I found help from many members that make me very happy and I take the code from Amphiluke Thanks for all Now I need another help to make two things First I want to merge 2 forms in 1, so instead of following forms: Code: <form action="#" onsubmit="location.href='http://www.mysite.com/article/'+this.indx.value; return false;"> <input name="indx" type="text" size="3" /> <input name="btn" type="submit" value="Go" /> </form> <form action="#" onsubmit="location.href='http://www.mysite.com/news/'+this.indx1.value; return false;"> <input name="indx1" type="text" size="3" /> <input name="btn" type="submit" value="Go" /> </form> I need to make it one with two radio buttons to choose which URL you want to open (Article or News) Second I need this form to be in space size 160x57 so the result will be nearly as this pictu Your help will be highly appreciated ADVICE: the thread titled can anyone decipher this code please on this URL http://www.codingforums.com/showthread.php?t=251191 is the only post to cause my Anti-Virus to kick in to action to prevent a backdoor malware attack. ERRing on the side of caution, I have already "reported" the post. I have both the java script and the php files, i just need to intergrate them into eachother to display the different topics and forums: New Forum: index.php : PHP Code: <?php include('../includes/db_connect.php'); include('../includes/inc-logincheck.php'); include('../includes/inc-functions.php'); include('../includes/inc-userfunctions.php'); include('../includes/inc-menu.php'); //include('../includes/smile.php'); $strTitle='Forum'; $strMessage=''; $intUserID=$_SESSION['uID']; $fetch=$user; ////include('../includes/forumhead.php'); $forum=$_GET['forum']; $viewtopic = $_GET['viewtopic']; if ($crew == "0"){ $query="SELECT * FROM `topics` WHERE `forum`='$forum'"; } $query=mysql_query("$query"); $num=mysql_num_rows($query); $col="0"; while($fo=mysql_fetch_object($query)){ if ($col=="0"){ $td="#444444"; $col="1"; }else{ $td="#555555"; $col="0"; } $hehe=mysql_num_rows(mysql_query("SELECT * FROM replys WHERE idto='$fo->id'")); } ?> <link rel="stylesheet" type="text/css" href="../includes/forum.css"> <td width="99%" background="../game/site/site/innerbg.gif" bgcolor="#222222" valign="top"> <br> <center> <table border="0" cellspacing="0" cellpadding="10" width="100%" class="cat"> <tr> <td> <script language='JavaScript' type='text/javascript' src='../includes/scripts/autosize.js'></script> <script> var box = 'reply'; var oldTopic = 5; var muted = 'no'; var set = 0; function parseUrl(url,variable){ var theurl = url.split('?'); if(theurl[1]){ pars = theurl[1].split('&'); for(i = 0; i < pars.length; i++){ var check = pars[i].split('='); if(check[0] == variable){ return check[1]; } } } return false; } function keepRefreshed(){ if(set == 0){ refresher = setTimeout("keepRefreshed()", 60000); allowButton = setTimeout("allowRefresh()", 3000); set = 1; } else { refreshTopics(); } } function allowRefresh(){ document.replyForm.refreshButton.disabled = false; } function refreshTopics(hl){ if(set == 1){ clearTimeout(refresher); clearTimeout(allowButton); } document.replyForm.refreshButton.disabled = true; refresher = setTimeout("keepRefreshed()", 60000); allowButton = setTimeout("allowRefresh()", 3000); if(document.replyForm.editIt.value == 'x'){ currentTopics = self.frames['topicsFrame'].location.href; var page = parseUrl(currentTopics, 'page'); var forum = parseUrl(currentTopics, 'forum'); var flag = parseUrl(currentTopics, 'flag'); if(flag){ add = '&flag=' + flag; } else { add = ''; } if(!page){ page = 1; } if(!forum){ forum = 1; } if(!hl){ hl = oldTopic; } self.frames['topicsFrame'].location.href = 'topics.php?forum=' + forum + '&default=' + oldTopic + '&page=' + page + '&hl=' + hl + add; } } function updateBox(id){ oldTopic = id; if(document.replyForm.editIt.value != 'x'){ document.replyForm.editIt.value = 'x'; document.replyForm.topicSubject.disabled = false; document.replyForm.selectedFlag.disabled = false; document.replyForm.submitTitle.value = 'Add!'; switchBox(true); } else { if(box == 'reply'){ document.replyForm.replyTo.value = id; document.replyForm.action = 'view.php?id=' + id + '&forum=' + 1; } } } function emotion(em){ document.replyForm.replyMes.value = document.replyForm.replyMes.value + em; document.replyForm.replyMes.scrollTop = document.replyForm.replyMes.scrollHeight; } function editThread(id, flag, points){ mes = self.frames['repliesFrame'].document.getElementById('topicMessage').value; sub = self.frames['repliesFrame'].document.getElementById('topicSubject').innerHTML; var replyform = document.replyForm; if(box == 'reply'){ switchBox(); } document.getElementById('topHeader').innerHTML = 'Edit thread'; replyform.topicSubject.value = sub; replyform.topicSubject.disabled = true; replyform.replyMes.value = mes; replyform.replyMes.focus(); replyform.editIt.value = id; replyform.selectedFlag.value = flag; replyform.selectedFlag.disabled = true; checkPoints(); replyform.addPoints.value = points; replyform.submitTitle.value = 'Edit!'; } function addQuote(type, username, id){ if(type == 'topic'){ quote = self.frames['repliesFrame'].document.getElementById('topicMessage'); } else { quote = self.frames['repliesFrame'].document.getElementById('quote_' + id); } format = '[quote=' + username + ']' + quote.innerHTML + '[/quote]\n\n'; document.replyForm.replyMes.value = document.replyForm.replyMes.value + format; document.replyForm.replyMes.scrollTop = 0; document.replyForm.replyMes.scrollTop = document.replyForm.replyMes.scrollHeight; } function switchBox(c,k){ if(document.replyForm.editIt.value != 'x'){ updateBox(oldTopic); return; } if((box == 'reply') && (!k)){ document.replyForm.action = 'topics.php?forum=1'; document.replyForm.target = 'topicsFrame'; document.replyForm.replyTo.value = 'x'; document.getElementById('topHeader').innerHTML = 'New topic'; document.getElementById('title').innerHTML = 'Add reply'; document.getElementById('topicTitle').style.display = 'block'; if(1 == 1){ document.getElementById('flagBox').style.display = 'block'; } box = 'topic'; } else { if(c){ document.replyForm.topicSubject.value = ''; document.replyForm.replyMes.value = ''; document.replyForm.addPoints.value = ''; document.replyForm.selectedFlag.value = 1; if(k){ url = 'topics.php?forum=1&hl=' + k; if(1 == 1){ if(document.replyForm.forumFilter.value){ url = url + '&flag=' + document.replyForm.forumFilter.value; } } self.frames['topicsFrame'].location.href = url; } } document.replyForm.action = 'view.php?id=' + oldTopic + '&forum=' + 1; document.replyForm.target = 'repliesFrame'; document.replyForm.replyTo.value = oldTopic; document.getElementById('topHeader').innerHTML = 'Add reply'; document.getElementById('title').innerHTML = 'Add topic'; document.getElementById('topicTitle').style.display = 'none'; document.getElementById('flagBox').style.display = 'none'; document.getElementById('addPoints').style.display = 'none'; box = 'reply'; } if(box == 'reply'){ updateButton(false); } else { checkPoints(); updateButton(true); } } function displayError(message){ if(message == 'clear'){ switchBox(true); document.getElementById('forumError').style.display = 'none'; document.getElementById('forumError').innerHTML = ''; } else { document.getElementById('forumError').style.display = 'block'; document.getElementById('forumError').innerHTML = message; } } var timel = 0; function countdown(){ timel -= 1; if(timel <= 0){ unMute(); } else { minutes = Math.floor(timel / 60); seconds = timel - (minutes * 60); document.getElementById('timeleft').innerHTML = '<b>Time left:</b> ' + minutes + ' minutes ' + seconds + ' seconds'; setTimeout("countdown()", 1000); } } function mutePlayer(muter, reason, post, timeleft){ muted = 'yes'; timel = timeleft; minutes = Math.floor(timeleft / 60); seconds = timeleft - (minutes * 60); document.getElementById('muteBox').innerHTML = 'You are unable to post because you have been muted by: <a href="viewprofile.php?viewuser=' + muter + '">' + muter + '</a><br><br><b>Reason:</b> ' + reason + '<br><div id="timeleft"><b>Time left:</b> ' + minutes + ' minutes ' + seconds + ' seconds</div><b>Post:</b><br>' + post; document.getElementById('replyBox').style.display = 'none'; document.getElementById('muteBox').style.display = 'block'; setTimeout("countdown()", 1000); } function unMute(){ muted = 'no'; document.getElementById('replyBox').style.display = 'block'; document.getElementById('muteBox').style.display = 'none'; } function checkPoints(){ var flag = document.replyForm.selectedFlag; if(flag.value == 13){ document.getElementById('addPoints').style.display = 'block'; } else { document.getElementById('addPoints').style.display = 'none'; } if(flag.value <= 3){ updateButton(true); } else { updateButton(false); } } function updateButton(upto){ if(1 == 1){ var button = document.replyForm.submitTitle; var flag = document.replyForm.selectedFlag; if((upto) && (flag.value <= 3)){ button.disabled = true; } else { button.disabled = false; } } } function updateFilter(){ var flag = document.replyForm.forumFilter.value; if(flag != 'void'){ url = 'topics.php?forum=1'; if(flag != 'all'){ url += '&flag=' + flag; } self.frames['topicsFrame'].location.href = url; } } function watchThread(){ url = 'topics.php?forum=1&hl=' + oldTopic + '&watch=' + oldTopic; if(document.replyForm.forumFilter.value){ url = url + '&flag=' + document.replyForm.forumFilter.value; } self.frames['topicsFrame'].location.href = url; } </script> <div id="forumError" display="none"></div> <center> <table border=0 cellspacing=0 cellpadding=2 width=99% bordercolor=black> <tr> <td width=40% valign=top class="insideTables"> <form name="replyForm" method="post" target="repliesFrame" action="view.php?id=5&forum=1"> <table border=1 cellspacing=0 cellpadding=2 width=100% class=sub2 bordercolor=black> <tr> <td align=center class=header><div id="topHeader">Add reply</div></td> </tr> <tr> <td> <div id="replyBox"> <div style="display:none;" id="topicTitle">Subject: <input type=text style="width:100%" name="topicSubject" maxlength=35><br>Message:<br></div> <textarea style="width:100%" rows=5 name="replyMes" style="white-space: normal;"></textarea> <div style="display:none;" id="flagBox"> <select style="width:100%;" name="selectedFlag" onChange="javascript:checkPoints()"><option selected value="1" style="background-color:#CDCDCD;">--- GAME RELATED ---</option> <option value="4" style="background-color:#69A16C;">Questions/Help</option> <option value="5" style="background-color:#69A16C;">Feature Discussion</option> <option value="6" style="background-color:#69A16C;">RIP/WS</option> <option value="7" style="background-color:#69A16C;">Bust Party</option> <option value="8" style="background-color:#69A16C;">Promotions</option> <option value="22" style="background-color:#69A16C;">Other</option> <option value="2" style="background-color:#CDCDCD;">--- OFF TOPIC ---</option> <option value="9" style="background-color:#CCAB6B;">Contests & Games</option> <option value="10" style="background-color:#CCAB6B;">Bars</option> <option value="11" style="background-color:#CCAB6B;">Rate THIS</option> <option value="21" style="background-color:#CCAB6B;">Sports</option> <option value="23" style="background-color:#CCAB6B;">Movies, Music & TV</option> <option value="24" style="background-color:#CCAB6B;">Other</option> <option value="3" style="background-color:#CDCDCD;">--- CLASSIFIEDS ---</option> <option value="13" style="background-color:#6B9FCC;">Points</option> <option value="14" style="background-color:#6B9FCC;">Crew</option> <option value="15" style="background-color:#6B9FCC;">Pictures & Music</option> <option value="16" style="background-color:#6B9FCC;">Casino</option> <option value="17" style="background-color:#6B9FCC;">Protection</option> <option value="18" style="background-color:#6B9FCC;">Organized Crime</option> <option value="19" style="background-color:#6B9FCC;">Establishment</option> <option value="20" style="background-color:#6B9FCC;">Other</option> </select> </div> <div style="display:none;" id="addPoints"> Verify: <input type=text name="addPoints" size=5> </div> <br> <input type=hidden name="replyTo"> <input type=hidden name="editIt" value="x"> <center> <a onclick="emotion(' :arrow: ')" style="cursor: pointer;"><img src="../game/emotions/arrow.gif" border=0 alt=":arrow:"></a> <a onclick="emotion(' :D ')" style="cursor: pointer;"><img src="../game/emotions/biggrin.gif" border=0 alt=":D"></a> <a onclick="emotion(' :S ')" style="cursor: pointer;"><img src="../game/emotions/confused.gif" border=0 alt=":S"></a> <a onclick="emotion(' 8) ')" style="cursor: pointer;"><img src="../game/emotions/cool.gif" border=0 alt="8)"></a> <a onclick="emotion(' :\'( ')" style="cursor: pointer;"><img src="../game/emotions/cry.gif" border=0 alt=":'("></a> <a onclick="emotion(' 8| ')" style="cursor: pointer;"><img src="../game/emotions/eek.gif" border=0 alt="8|"></a> <a onclick="emotion(' :evil: ')" style="cursor: pointer;"><img src="../game/emotions/evil.gif" border=0 alt=":evil:"></a> <a onclick="emotion(' :!: ')" style="cursor: pointer;"><img src="../game/emotions/exclaim.gif" border=0 alt=":!:"></a> <a onclick="emotion(' :idea: ')" style="cursor: pointer;"><img src="../game/emotions/idea.gif" border=0 alt=":idea:"></a> <a onclick="emotion(' :lol: ')" style="cursor: pointer;"><img src="../game/emotions/lol.gif" border=0 alt=":lol:"></a> <a onclick="emotion(' :mad: ')" style="cursor: pointer;"><img src="../game/emotions/mad.gif" border=0 alt=":mad:"></a> <br> <a onclick="emotion(' :?: ')" style="cursor: pointer;"><img src="../game/emotions/question.gif" border=0 alt=":?:"></a> <a onclick="emotion(' :redface: ')" style="cursor: pointer;"><img src="../game/emotions/redface.gif" border=0 alt=":redface:"></a> <a onclick="emotion(' :rolleyes: ')" style="cursor: pointer;"><img src="../game/emotions/rolleyes.gif" border=0 alt=":rolleyes:"></a> <a onclick="emotion(' :( ')" style="cursor: pointer;"><img src="../game/emotions/sad.gif" border=0 alt=":("></a> <a onclick="emotion(' :) ')" style="cursor: pointer;"><img src="../game/emotions/smile.gif" border=0 alt=":)"></a> <a onclick="emotion(' :o ')" style="cursor: pointer;"><img src="../game/emotions/surprised.gif" border=0 alt=":o"></a> <a onclick="emotion(' :P ')" style="cursor: pointer;"><img src="../game/emotions/toungue.gif" border=0 alt=":P"></a> <a onclick="emotion(' :twisted: ')" style="cursor: pointer;"><img src="../game/emotions/twisted.gif" border=0 alt=":twisted:"></a> <a onclick="emotion(' ;) ')" style="cursor: pointer;"><img src="../game/emotions/wink.gif" border=0 alt=";)"></a> <a onclick="emotion(' :tdn: ')" style="cursor: pointer;"><img src="../game/emotions/tdown.gif" border=0 alt=":tdn:"></a> <a onclick="emotion(' :tup: ')" style="cursor: pointer;"><img src="../game/emotions/tup.gif" border=0 alt=":tup:"></a> <br> <input type=submit value="Add!" name="submitTitle"> <input type=button value="Watch!" onClick="javascript:watchThread()"> <input type=button value="Refresh!" name="refreshButton" onClick="javascript:refreshTopics()"> </center> </div> <div id="muteBox" style="display:none;"></div> </td> </tr> <tr> <td align=center class=header>Topics (<a href="javascript:switchBox()" id="title">Add topic</a>)</td> </tr> <tr> <td> <select style="width:100%;" onChange="javascript:updateFilter()" name="forumFilter"> <option value="void" style="background-color:#CDCDCD;"> FILTER</option> <option value="all">View all</option> <option selected value="1" style="background-color:#CDCDCD;">--- GAME RELATED ---</option> <option value="4" style="background-color:#69A16C;">Questions/Help</option> <option value="5" style="background-color:#69A16C;">Feature Discussion</option> <option value="6" style="background-color:#69A16C;">RIP/WS</option> <option value="7" style="background-color:#69A16C;">Bust Party</option> <option value="8" style="background-color:#69A16C;">Promotions</option> <option value="22" style="background-color:#69A16C;">Other</option> <option value="2" style="background-color:#CDCDCD;">--- OFF TOPIC ---</option> <option value="9" style="background-color:#CCAB6B;">Contests & Games</option> <option value="10" style="background-color:#CCAB6B;">Bars</option> <option value="11" style="background-color:#CCAB6B;">Rate THIS</option> <option value="21" style="background-color:#CCAB6B;">Sports</option> <option value="23" style="background-color:#CCAB6B;">Movies, Music & TV</option> <option value="24" style="background-color:#CCAB6B;">Other</option> <option value="3" style="background-color:#CDCDCD;">--- CLASSIFIEDS ---</option> <option value="13" style="background-color:#6B9FCC;">Points</option> <option value="14" style="background-color:#6B9FCC;">Crew</option> <option value="15" style="background-color:#6B9FCC;">Pictures & Music</option> <option value="16" style="background-color:#6B9FCC;">Casino</option> <option value="17" style="background-color:#6B9FCC;">Protection</option> <option value="18" style="background-color:#6B9FCC;">Organized Crime</option> <option value="19" style="background-color:#6B9FCC;">Establishment</option> <option value="20" style="background-color:#6B9FCC;">Other</option> </select> </td> </tr> <tr> <td> <iframe width=100% height="357" src="topics.php?forum=1&flag=<?php echo "$forum"; ?>" frameborder="0" allowTransparency="true" name="topicsFrame" id="topicsFrame"></iframe> </td> </tr> </table> </form> </td> <td width=60% valign=top> <iframe width=100% height="590" src="view.php?forum=1&id=<?php echo "$viewtopic"; ?>" frameborder="0" id="repliesFrame" name="repliesFrame" allowTransparency="true"></iframe> </td> </tr> </table> </td> </tr> </table> </td> <?php include("/home/tacticsc/domains/360-tactics.co.uk/public_html/crimewave/includes/inc-footer.php"); ?> i will post the rest of the codes in comments below due to too many word count. if its not to hard please help me, i have put all the Javascript there and the php it just needs to be implimented, i have started some of it, such as getting the topics to display like so: its just when you click the topic it doesnt load into the right hand iframe and some other things like the reply box ect thanks. Dan In this forum (vbulletin) every post has a unique number as well as unique URL. Now I attempted to adopt this for my phpbb3 forum. Test page: http://engineering.forumotion.info/t...-helpful-links If you visit you can see that unlike vbulletin; phpbb3 has NO post numbers BUT its class namely topic-title has a unique URL. So in essence every post has a unique URL but NO number. Using this script, I have been able to insert post number left to class namely postbody. Code: function pagesort(no) {var a=no-1; var b=a*15; var c= b+1; return c;} $(function(){ page=$('p .pagination').find('span')[0]; b=$(page).find('strong'); c=b[0].innerHTML; var pagenumber=Number(c); var p=pagesort(pagenumber); var a=$('.postbody').get(); for(i=0;i<a.length;i++) { postno=i+p; x= $(a[i]).prepend('<span style="float: right;">#' +postno +'</span>') } }); The code works for the default number of posts per page. That being 15. Now my question is how do I get href from every post title & prepend it like I did above. I know this command Code: $('.topic-title').attr('href'); but I can't figure out the procedure. How can I get this moved over the the JavaScript forum? The issue I am having is with the JavaScript not with the Sql database. http://www.codingforums.com/showthread.php?t=220870 Hello, I was wondering whether it is possible to expand and collapse forum categories using JavaScript. The forum board I am using is phpBB. HI everybody! I am working on a forum, which recently shows a popup window on every single visit. It mainly appears on mobile devices. I have read through the source code, but I don't find the code that shows the popup. Could anyone please have a look at the source and tell me where I can find the code that encodes the popup window? That would be most helpful to me! HERE the link to the website! Any help would be much appreciated! Hello, I'm attempting to use a jQuery tooltip (Tipsy, located here) in the index of a forum. What I'd like to do is remove the forum's description and place it in a pop-up when you hover over the forum name. I've managed to get it to work, but only on the very first forum name. After that, they simply display the default browser tooltip. Here is the script code that goes in the header: Code: <script type='text/javascript'> jQuery.noConflict(); jQuery(function() { jQuery('#tooltip').tipsy({gravity: 's'}); }); </script> Here is the part of the template that is affected: Code: <h4> <a href="{parse url="showforum={$forum_data['id']}" seotitle="{$forum_data['name_seo']}" template="showforum" base="public"}" id='tooltip' title='{$forum_data['description']}'>{$forum_data['name']}</a> </h4> And the Tipsy library can be viewed he http://www.xasper.net/jquery.tipsy.js Does anyone know what could get this to work? I appreciate any assistance. Thank you. Hey everyone, I am attempting to use some code from the website Dynamic Drive and the page can be found here. http://www.dynamicdrive.com/dynamici...acceptterm.htm Basically it is javascript code that requires people to check a box before being able to submit a forum. I implemented the code into my site just fine. However I want to be able to use a image submit button rather than a submit button. Since I am not proficient with Javascript I have no idea where to go from here or how to change it to work with an image/paypal button. Here is the code I have so far. Script at top of the page Code: <script> //"Accept terms" form submission- By Dynamic Drive //For full source code and more DHTML scripts, visit http://www.dynamicdrive.com //This credit MUST stay intact for use var checkobj function agreesubmit(el){ checkobj=el if (document.all||document.getElementById){ for (i=0;i<checkobj.form.length;i++){ //hunt down submit button var tempobj=checkobj.form.elements[i] if(tempobj.type.toLowerCase()=="submit") tempobj.disabled=!checkobj.checked } } } function defaultagree(el){ if (!document.all&&!document.getElementById){ if (window.checkobj&&checkobj.checked) return true else{ alert("Please read/accept terms to submit form") return false } } } </script> Form Code: <form name="agreeform" onSubmit="return defaultagree(this)" action="https://urlhere.com" method="post"> <input name="agreecheck" type="checkbox" onClick="agreesubmit(this)"><b>I agree to the above terms</b><br> <input type="Submit" value="Submit!" disabled> <!--<input type="image" src="https://www.webpage.com" border="0" name="I2" alt="PayPal - The safer, easier way to pay online!">--> </form> <script> //change two names below to your form's names document.forms.agreeform.agreecheck.checked=false </script> Please note that the paypal button is commented out in this code as it doesn't work right now and the submit button works. I think the following code needs to be changed to a different check to check for a specific paypal button but I am not sure how to do it. Keep in mind I have four different paypal buttons on the same page so picking just this one is important. Code: if(tempobj.type.toLowerCase()=="submit") Any help with this would be greatly appreciated! Regards, Frank I am having an issue using the Cut & Paste jQuery Mega Menu. I am using it on the main page of my future forum (test forum is here - http://illini-nation.deepermethod.co...nity/index.php It's the button labeled 'Forum Categories'). The mega menu works fine on the main page of the forum, but once I drill down into the forums, the mega menu no longer works. The mega menu ONLY works on the index of the forum. Any and all help is greatly appreciated. IlliniCrusader I frequent a forum that has a pretty large community. There are a few users there I don't particularly care for. I would like to make a Greasemonkey compatible javascript code that would allow me to completely erase their posts from the page. What I want to happen is that every time Code: <li class="kpost-username"> <a rel="nofollow" title="" href="/index.php/component/kunena/profile/userid-80?Itemid=0" class="kwho-user">Rolepgeek</a> </li> appears it deletes the parent <table class="kmsg"> node. I know that I can find each of those code snippets with Code: document.getElementById('kpost-usernmae') however I am not sure how I would go about defining if it includes Code: <li class="kpost-username"> <a rel="nofollow" title="" href="/index.php/component/kunena/profile/userid-80?Itemid=0" class="kwho-user">Rolepgeek</a> </li> or not, nor am I sure on how to tell the code to delete the parent <table class="kmsg"> node when it does include it. I've been messing around a bit with some code, and I understand the general idea of how it should work, however I do not know the syntax in order to get it to work. Any help would be appreciated. HTML to a full post: Code: <table class="kmsg"> <tbody> <tr> <td class="kprofile-top"> <ul id="kpost-profiletop"> <li class="kpost-smallicons"> <span title="Gender: Unknown" class="kicon-profile kicon-profile-gender-unknown"></span> <a title="Click here to send a private message to this user." href="/index.php/component/uddeim/?task=new&recip=80&Itemid=213"><span alt="Click here to send a private message to this user." class="kicon-profile kicon-profile-pm"></span></a> <br> <div> <span class="kpost-userposts">Posts:334</span> </div> </li> <li class="kpost-personal"> Chaos will consume all... </li> <li class="kpost-avatar"> <a rel="nofollow" title="" href="/index.php/component/kunena/profile/userid-80?Itemid=0" class="kwho-user"><span class="kavatar"><img style="max-width: 72px; max-height: 72px" alt="" src="http://thekingdomsmc.com/media/kunena/avatars/resized/size72/users/avatar80.jpg" class="kavatar vbavnparnxybaoekjwjh"></span></a> </li> <li class="kpost-username"> <a rel="nofollow" title="" href="/index.php/component/kunena/profile/userid-80?Itemid=0" class="kwho-user">Rolepgeek</a> </li> <li class="kpost-userrank"> Merchant </li> <li class="kpost-userrank-img"> <img alt="" src="http://thekingdomsmc.com/components/com_kunena/template/default/images/ranks/rank3.gif"> </li> <li><span class="kicon-button kbuttononline-yes"><span class="online-yes"><span>NOW ONLINE</span></span></span></li> <li class="kpost-karma"> <span class="kmsgkarma"> Karma: -9 <a rel="nofollow" title="" href="/index.php/component/kunena/4-off-topic/karma/userid-80?do=decrease&pid=13229&0409ea1d6b1360d1a0a24ee6206c0bf4=1&Itemid=0"><span title="Smite" border="0" alt="Karma-" class="kkarma-minus"> </span></a> <a rel="nofollow" title="" href="/index.php/component/kunena/4-off-topic/karma/userid-80?do=increase&pid=13229&0409ea1d6b1360d1a0a24ee6206c0bf4=1&Itemid=0"><span title="Applaud" border="0" alt="Karma+" class="kkarma-plus"> </span></a> </span> </li> </ul> </td> </tr> <tr> <td class="kmessage-top"> <div class="kmsgbody"> <div class="kmsgtext"> Yeah. And it would be pointless, seeing as how I won't. </div> </div> <div style="display: none" class="kreply-form" id="kreply13229_form"> <form enctype="multipart/form-data" name="postform" method="post" action="/index.php/component/kunena/post?Itemid=0"> <input type="hidden" value="13229" name="parentid"> <input type="hidden" value="4" name="catid"> <input type="hidden" value="post" name="action"> <input type="hidden" value="1" name="0409ea1d6b1360d1a0a24ee6206c0bf4"> <input type="hidden" value="Shigan" name="authorname"> <input type="text" value=" To all non-bronies." maxlength="50" class="inputbox" size="35" name="subject"><br> <textarea cols="60" rows="6" name="message" class="inputbox"></textarea><br> <input type="checkbox" value="1" name="subscribeMe"> <i>Check this box to be notified of replies to this topic.</i> <br> <input type="submit" title="Click here to submit your message" value="Submit" name="submit" class="kbutton kreply-submit"> <input type="reset" title="Click here to cancel your message" value="Cancel" name="cancel" class="kbutton kreply-cancel"> <small>Note: BBcode and smileys are still usable.</small> </form> </div> </td> </tr> <tr> <td class="kbuttonbar-top"> <div> <div class="kmsgsignature"> With Order, come entropy,<br> With Life, comes death,<br> With Light, comes shadow.<br> <br> <div style="text-align: center">If one does not know Chaos, one does not realize the potential within themselves.</div> </div> </div> <div class="kmessage-editmarkup-cover"> <span class="kmessage-informmarkup"><a rel="nofollow" title="" href="/index.php/component/kunena/4-off-topic/13229-re-to-all-non-bronies/report?Itemid=0">Report to moderator</a></span> </div> <div class="kmessage-buttons-cover"> <div class="kmessage-buttons-row"> <a id="kreply13229" rel="nofollow" title="Quick Reply" href="/index.php/component/kunena/4-off-topic/13229-re-to-all-non-bronies/post?do=reply&Itemid=0" class="kicon-button kbuttoncomm btn-left kqreply"><span class="reply"><span>Quick Reply</span></span></a> <a rel="nofollow" title="Reply" href="/index.php/component/kunena/4-off-topic/13229-re-to-all-non-bronies/post?do=reply&Itemid=0" class="kicon-button kbuttoncomm btn-left"><span class="reply"><span>Reply</span></span></a> <a rel="nofollow" title="Quote" href="/index.php/component/kunena/4-off-topic/13229-re-to-all-non-bronies/post?do=quote&Itemid=0" class="kicon-button kbuttoncomm btn-left"><span class="quote"><span>Quote</span></span></a> </div> </div> <div class="kpost-thankyou"> <a rel="nofollow" title="I want to thank you for this message!" href="/index.php/component/kunena/4-off-topic/thankyou?pid=13229&0409ea1d6b1360d1a0a24ee6206c0bf4=1&Itemid=0" class="kicon-button kbuttonuser btn-left"><span class="thankyou"><span>Thank You</span></span></a></div> </td> </tr> </tbody> </table> 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> hi guys, i have a forum system that auto refreshes, but what that is doing is stopping my refresh container from refreshing to let people know if they have new inbox messages, im not very good with javascript and i cant figure out why its doing it. any help would be great, below are both of my codes. Forum refresh: Code: function keepRefreshed(){ if(set == 0){ refresher = setTimeout("keepRefreshed()", 60000); allowButton = setTimeout("allowRefresh()", 3000); set = 1; } else { refreshTopics(); } } function allowRefresh(){ document.replyForm.refreshButton.disabled = false; } function refreshTopics(hl){ if(set == 1){ clearTimeout(refresher); clearTimeout(allowButton); } document.replyForm.refreshButton.disabled = false; refresher = setTimeout("keepRefreshed()", 60000); allowButton = setTimeout("allowRefresh()", 3000); Refresh container: Code: $(window).ready(function() { $("#responsecontainer").load("includes/inc-mess-jail.php", function(response, status, xhr) { if (status == "error") { $(this).html("Error: " + xhr.status + " " + xhr.statusText); } }); var refreshId = setInterval(function() { $("#responsecontainer").load('includes/inc-mess-jail.php?randval='+ Math.random()); }, 9000); $.ajaxSetup({ cache: false }); }); as i said, any help would be great. thanks in advance. Dan Hello Everyone. I have a bit of an issue trying to get one link to open more than one link at a time. Perhaps you can either help me or suggest a better way to do so. I have created a table with hidden rows until a user clicks an open in either cell. Once the user clicks a cell, the next row of opens opens up. What I am having trouble with is getting the table headings to be opened once hidden. Each set of options needs a title or question for the user to understand what choices to make. (these are the td's with colspan of 2) I am using javascript to show and hide the cells I have so far, and I can hide them just fine, I just want to show both sets of cells once the user clicks one link. its a bit complicated because i have functions all over the place Any help you give me would be greatly appreciated. Alternatively, I can be reached on Y!: tmdela Here's the code...: <html> <head> <script language="JavaScript"> function showCell() { document.getElementById('cellName').style.visibility='visible'; } function showCell2() { document.getElementById('cellName2').style.visibility='visible'; } function showCell3() { document.getElementById('cellName3').style.visibility='visible'; } function showCell4() { document.getElementById('cellName4').style.visibility='visible'; } function showCell5(){ document.getElementById('cellName5').style.visibility='visible'; } function showCell6(){ document.getElementById('cellName6').style.visibility='visible'; } function DoAllThese12(){ showCell(); showCell2(); showCellHeader(); } function DoAllThese34(){ showCell3(); showCell4(); } function DoAllThese56(){ showCell5(); showCell6(); } </script> <!--------------------------------CSS begins here, hides the table--> <style type="text/css"> #cellName {visibility:hidden; } #cellName2 {visibility:hidden; } #cellName3 {visibility:hidden; } #cellName4 {visibility:hidden; } #cellName5 {visibility:hidden; } #cellName6 {visibility:hidden; } body{ font-family:Arial, Calibri, Sans-serif; font-size: 15px; } a{ font-family: Arial, Calibri, Sans-Serif; font-size: 11px; color:#000; } a:link{text-decoration:none} a:visited{text-decoration:none; color:#000;} a:active{text-decoration:none} a:hover{text-decoration:none;} a:visited { color: #000; } #container{ position:absolute; margin:0 auto; left: 30%; top:0px; } #maincontent{ width: 420px; margin: 0 auto; } #table{ margin:0 auto; width: 450px; } td { width: 50%; border:0px; } .pane-list { margin: 0; padding: 0; list-style: none; } .pane-list li { background: #f9dfec; padding: 10px 20px 2px; border-top: solid 2px #FF0066; cursor: pointer; } .pane-list li:hover { background: #F6A8B6; } </style> </head> <!--------------------------------------------body--> <body> <div id="container"> <div id="maincontent"> <h3>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer id ante eu nunc aliquet malesua</h3> <p> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer id ante eu nunc aliquet malesuaLorem ipsum dolor sit amet, consectetur adipiscing elit. Integer id ante eu nunc aliquet malesuaLorem ipsum dolor sit amet, consectetur adipiscing elit. Integer id ante eu nunc aliquet malesuaLorem ipsum dolor sit amet, consectetur adipiscing elit. Integer id ante eu nunc aliquet malesua </p> <p> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer id ante eu nunc aliquet malesuaLorem ipsum dolor sit amet, consectetur adipiscing elit. Integer id ante eu nunc aliquet malesuaLorem ipsum dolor sit amet, consectetur adipiscing elit. Integer id ante eu nunc aliquet malesuaLorem ipsum dolor sit amet, consectetur adipiscing elit. Integer id ante eu nunc aliquet malesua </p> <BR> </div><!--maincontent--> <!-------------------------------------Container for table--> <div id="menu"> <!-------------------------------------Line 1 of table: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer id ante eu nunc aliquet malesua?--> <div id="table"> <center> <table border="0" id="table"> <tr> <td colspan="2">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer id ante eu nunc aliquet malesua? </td> </tr> <td> <ul class="pane-list"> <li> <h3> <a href="#" onclick="DoAllThese12()">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer id ante eu nunc aliquet malesua <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer id ante eu nunc aliquet malesua</p> </a> </h3> </li> </ul> </td> <td> <ul class="pane-list"> <li> <h3> <a href="http://www.google.com">My cancer has spread. <p> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer id ante eu nunc aliquet malesua</p> </a> </h3> </li> </ul> </td> </tr> <!------------------------------------Line 2 of Table: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer id ante eu nunc aliquet malesua--> <tr> <td colspan="2">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer id ante eu nunc aliquet malesua? </td> </tr> <td id="cellName"> <ul class="pane-list"> <li> <h3> <a href="#" onclick="DoAllThese34()">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer id ante eu nunc aliquet malesua</a> </h3> </li> </ul> </td> <td id="cellName2"> <ul class="pane-list"> <li> <h3> <a href="http://www.google.com">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer id ante eu nunc aliquet malesua</a> </h3> </li> </ul> </td> </tr> <!------------------------------------Line 3 of Table: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer id ante eu nunc aliquet malesua--> <tr> <td colspan="2">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer id ante eu nunc aliquet malesua? </td> </tr> <tr> <td id="cellName3"> <ul class="pane-list"> <li> <h3> <a href="#" onclick='DoAllThese56()'>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer id ante eu nunc aliquet malesua</a> </h3> </li> </ul> </td> <td id="cellName4"> <ul class="pane-list"> <li> <h3> <a href="#" onclick="DoAllThese56()">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer id ante eu nunc aliquet malesua</a> </h3> </li> </ul> </td> </tr> </table> </center> </div><!--table--> </div><!--menu--> </div><!--container--> </body> </html> Hey guys. This is vague because I dont know what exactly to tell you but please reply with me so I can fix this. I want to add something to my forum. Specifically, I want to add a HTML and Picture button for when you go to reply. Like posting an article here, there are also these options (font, alignment, insert image) I do not know how to achieve this but shouldnt be too hard. Here are the two sources you will need to look through to help me fix the forum. http://neoweather.com/FWFORUM.JS http://static.websimages.com/JS/fw.js THANKS |