Jump to content

Chocolate570

Members
  • Posts

    1,550
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by Chocolate570

  1. Do you mean your server's files, or your client's files? I'm sure there's a way to do it with your server's files, but if you're trying to write to your user's hard drive...there's no chance.
  2. Did you replace "myscript.js" with the URL of your hosted script? You know you have to host it, right?
  3. Yes, but you'd need to put the javascript in a <script > tag, which has to be in an <html> tag.
  4. Can we please see your code? Both server side and client side, if possible.
  5. Try this page:http://roachfiend.com/archives/2004/12/08/...fox-extensions/
  6. Well, as far as I know, the only hosted forum software that gives you a limit on how much code you can stick in is Invisionfree, and almost no one here codes for.
  7. You can, but really, what's the point? There's no limit to how much code you can put on the page, and it won't increase the loading time by much, if at all, since you're still going through the same process tree. :)And is that you, Outkast?
  8. Target=main can be put anywhere inside the tag.
  9. Shoot, javascript 1.5 allows that? Darnit! I can't believe that! I've put at least 1000 lines of extra codes over the last year trying to allow for that... argh.
  10. Stop bumping if you like your nose where it is right now :)So you're saying it's not working? Well, I'm not sure if javascript 1.5-1.6 support the for(x in blah). Try this? <script type="text/javascript"><!--function changeVar(elementName,classname,styleType) { var element = document.getElementsByTagName(elementName); for (x=0;x<element.length;x++) { if(element[x].className==classname) { element[x].style.display=styleType; } }}changeVar('p','a','block');changeVar('div','b','none');// --></script> Try that?
  11. Skemcin, that's an entirely true point. Galaxies are like atoms. They attract eachother, have different components, and are relatively tiny compared to what holds them (the universe).
  12. What is "I know citigroup, and amazon dont" supposed to mean?
  13. Well, let me run through it. /*///////////////////////////////////Hide stuff (images/text) if ////User has not posting in ////Topic. By Choco 2006. ////No editing required. /////////////////////////////////*///URL Splitters.//Procures topic num and board URL. //This part is not really needed, as I could do this inline...but it makes//cleaner code.winFirst=window.location.href;winNext=winFirst.split('index');boardU=winNext[0];topNext=winFirst.split('showtopic=');topNum=topNext[1] //This is the topic number.url=boardU+'index.php?s=&act=Stats&CODE=who&t='+topNum;cap=winFirst.split('act=Post') //checks if you're posting. if so, don't replaceif(!cap[1]) {total=document.getElementsByTagName("body") //Gotta change the body.for(z=0;z<total.length;z++) {inHl=total[z].innerHTML;test=inHl.indexOf("hide") //Checks if we should search or not.if(test!=(-1)) {s = inHl.replace(/\[hide\]/g,"\<div class='hid'\>");s = s.replace(/\[.hide\]/g,"\<\/div\>");}}}document.body.innerHTML=s; //This might be the problem. IE doesn't like//this document.body.innerHTML.ajReq(url) //Run the ajax request and pass the URL for it to request to it. And it's overly complex because I can't edit the main forum HTML. I can add on to it, but that's through a controlled space. And to edit the main forum, I have to use javascript matching to retrieve elements and then make changes.
  14. "There are 2 things man cannot image: not being born and infinity."-Anonymous:)
  15. I checked the mozilla error console. There was only one error, and it was trivial. It said one of my variables wasn't defined. But that couldn't cause this error... could it? The variable was defined, except it was defined in a for loop. I dunno. There were no other errors.
  16. This really annoys me. My code works perfectly in Safari, FireFox (1.0-2.0), and Opera (8-9) but only IE fails the request and gives an error. Why me?Can someone please tell me what I'm doing wrong? The code is supposed to check if you are logged in on a forum and if you have posted already in the current topic. If you have, it goes through the body innerHTML and makes all of the stuff between the bbcode tags [hide] and [/hide] visible. If not, it makes them invisible. It works perfectly in every other browser, yet in IE...It either gives me an error that says something to the effect of"Internet explorer can not display the page requested."or, to my users, it gives the inbuilt alert message in my code that the AJAX request could not be completed.Test forum:z10.invisionfree.com/sweetcodingCodes:(header) //Thank you very much Mozilla Docs//For providing help with this AJAX request.function ajReq(url) { var aj = false; if (window.XMLHttpRequest) { // FF & Moz & Saf aj = new XMLHttpRequest(); } else if (window.ActiveXObject) { // Guess. try { aj = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { aj = new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) {} } } //Uh oh! Browser doesn't support ajax. if (!aj) { alert('Error: Unable to create AJAX Request Object'); return false; } //Send request aj.onreadystatechange = function() { compFun(aj); }; aj.open('GET', url, true); aj.send(null);}function compFun(aj) { if (aj.readyState == 4) { if (aj.status == 200) { rep(aj.responseText); } else { alert('Error: AJAX request returned null! Please refresh the page. If the problem persists, contact an adminstrator.'); } }}//This function takes the text, replaces it, and outputs "true" or "false" depending on whether the member has posted on the topic or not.function rep(text) { //Check member number //So I can reference it later in the script repLa=document.getElementById("userlinks") linkRa=repLa.getElementsByTagName("a"); for(i=0;i<linkRa.length;i++) { if(linkRa[i].href.split('showuser=')[1]!=null) { hlder=linkRa[i].href.split('showuser=')[1]; } } zoop=text.indexOf('showuser='+hlder); if(zoop != (-1)) { //Yippee! We got it! Now we have to 'unhide' the elements. hold=document.getElementsByTagName("*"); for(y=0;y<hold.length;y++) { if(hold[y].className.toLowerCase()=="hid") { hold[y].style.visibility="visible" } } }} Footer: /*///////////////////////////////////Hide stuff (images/text) if ////User has not posting in ////Topic. By Choco 2006. ////No editing required. /////////////////////////////////*///URL Splitters.//Procures topic num and board URL.winFirst=window.location.href;winNext=winFirst.split('index');boardU=winNext[0];topNext=winFirst.split('showtopic=');topNum=topNext[1]url=boardU+'index.php?s=&act=Stats&CODE=who&t='+topNum;cap=winFirst.split('act=Post')if(!cap[1]) {total=document.getElementsByTagName("body")for(z=0;z<total.length;z++) { inHl=total[z].innerHTML; test=inHl.indexOf("hide") if(test!=(-1)) { s = inHl.replace(/\[hide\]/g,"\<div class='hid'\>"); s = s.replace(/\[.hide\]/g,"\<\/div\>"); }}}document.body.innerHTML=s;ajReq(url) Stylesheet: .hid{visibility:hidden;} Could anyone tell me what's wrong? It's pretty urgent.Thanks.Choco
  17. Ok. First of all, your filter: thing will only work in IE. The cross-browser way to do it:opacity:.50;filter: alpha(opacity=50); -moz-opacity: 0.50;Put that in your stylesheet. Now, onto doing it.What you can do is put another div inside your transparent div. Make sure both divs have a margin and padding of 0px. For the inner div, your stylesheet would look like this: .outerDiv { padding:0px; opacity:.50; filter: alpha(opacity=50); -moz-opacity: 0.50; background-color: #000000;}.innerDiv { padding: 0px; margin: 0px; background:tranparent; color: #000000; opacity:1; filter: alpha(opacity=100); -moz-opacity: 1;} Hope that helps. I'm not sure if the child div will inherit the opacity of the parent div. :)Choco
  18. Sorry for the quick post. I was in a rush.Glad I could help. :)Choco
  19. You are allowed to put your LEGAL NAME there with a copyright sign, or if you own a company, the company's full name. But the client may not like this--you'll have to ask them if it's all right. But you do have the privelage, if you made everything yourself.
  20. function doSomething(e) { var code; if (!e) var e = window.event; if (e.keyCode) code = e.keyCode; else if (e.which) code = e.which; var character = String.fromCharCode(code); if(character.toLowerCase()=="h") { alert("your message here") }} Your body tag:<body onkeypress="doSomething(event)">Adapted from quirksmode.Choco
  21. And can we see your PHP code?
  22. Here, check out this page.http://labnol.blogspot.com/2006/01/add-to-...rk-firefox.html
  23. Well, unless you're very experienced with creating browser plugins (which I doubt anyone on this forum is), it'll be excruciatingly hard to make one.Scratch that.Check out these tutorials:http://www.borngeek.com/firefox/toolbar-tutorial/http://www.codeproject.com/atl/ietoolbartutorial.aspHope that helps. :)Choco
  24. Did you try restarting the computer?Some versions and updates of windows cause changes in the windows/ directory to be restarted before they take effect.Also, make sure the .ttf was extracted and uncompressed. :)Choco
  25. My mistake, that's what I meant.
×
×
  • Create New...