Jump to content

Chocolate570

Members
  • Posts

    1,550
  • Joined

  • Last visited

  • Days Won

    2

Posts posted by Chocolate570

  1. Why won't my code work in IE? :)

    <script type="text/javascript">///////////////////////////////////////////////              |EnvelopeMod|                ////                     ~v1~                      ////         ©2006 Chocolate570            //  //         Fiddling with this code           ////   Could cause execution failiure     ////  Translation: The thing'll blow up   ////www.Seekond.com --- www.IFSZ.net ////////////////////////////////////////////////Function that takes user to correct URLfunction compArg(usr){window.location="./index.php?act=Msg&CODE=4&MID="+usr}linkAr=document.links;reg=/showuser=(\d+)/g//Going through all the linksfor(specLink=0;specLink<linkAr.length;specLink++){//If it's found a link to a user profileif(linkAr[specLink].href.match(reg)){prevIH=linkAr[specLink].parentNode.innerHTML;//If the link is located in a place where an image shouldn't appearif(prevIH.match(/Log/g) || prevIH.match(/In/g) ||     linkAr[specLink].parentNode.className=="row2");else{parent=linkAr[specLink].parentNode//Checking browser---cross-browser issuesif(navigator.userAgent.indexOf('MSIE') > -1 && navigator.userAgent.indexOf('Opera') == -1){var newEnv = document.createElement('<img  src="http://i1.tinypic.com/noiuqt.png" onclick="compArg(' + RegExp.$1 +')">');}else{newEnv=document.createElement("img");newEnv.setAttribute('src','http://i1.tinypic.com/noiuqt.png');newEnv.setAttribute('onclick', "compArg('" + RegExp.$1 + "')");}//Add envelope picture next to current linkparent.insertBefore(newEnv,linkAr[specLink])}}}</script>

    :S

  2. Instead of telling us this, how bout writing your own tutorials and then submitting them? This is called deconstructive criticism. The PHP tutorial is being overhauled at the moment, and then life will move on. But please, don't post that our tutorials...stink. Thanks.

  3. Thanks so much, hacknsack! That works perfectly.But I have another problem. :)I have an HTML table---and in it, many links.I want to add that envelope before every link, but not group them together in the beginning...for example:Envelope Envelope Envelope Chocolate570, TestingPMSystem, HacknsackIt should have EnvelopeChocolate570,EnvelopeTestingPMSystem,EnvelopeHacknsackDo you understand what I mean?

  4. K, I'm working on a script for forums.Basically, what this script does, is in specific places, it adds a picture of an envelope next to the link leading to the member profile. To get a better idea, go to this site:http://s15.invisisonfree.com/redifiedAs you can see, I've got the part where it goes next to the name down. What this script is supposed to do, is add the image next to the name---and then make the image lead to a function which extracts a specific part of the link to the player profile it's next to. Then, the envelope's link links to another part of the site, but with the variable i extracted used. For example, we have this picture:noiuqt.pngChocolate570and the code is:

    <script type="text/javascript">function goThing(test){alert("If this script were the real version, it would take you to [url="http://s15.invisionfree.com/Redified/index.php?act=Msg&CODE=04&MID="+test+""]http://s15.invisionfree.com/Redified/index...ot;+test+"[/url]. But as it isn't, all you get is this alert box. ")/*window.location="http://s15.invisionfree.com/Redified/index.php?act=Msg&CODE=04&MID="+test*/}linkAr=document.links;reg=/showuser=/gfor(specLink=0;specLink<linkAr.length;specLink++)  {  if(linkAr[specLink].href.match(reg))    {      prevIH=linkAr[specLink].parentNode.innerHTML; if(prevIH.match(/Log/g) || prevIH.match(/In/g) || linkAr[specLink].parentNode.className=="row2");else{/*c_start=prevIH.indexOf("showuser")if (c_start!=-1)  {   c_start=c_start + prevIH.length+1;  c_end=prevIH.indexOf("=",c_start)  if (c_end==-1) c_end=prevIH.length  final=prevHI.substring(c_start,c_end);  alert(final)  } */linkAr[specLink].parentNode.innerHTML='<span style="cursor:pointer;cursor:hand" onclick="goThing(2)"><img src="http://i1.tinypic.com/noiuqt.png"></span>'+prevIH;}  }}</script>

    Please don't hesitate to ask if you don't understand. I can hardly understand myself! :)~Choco

  5. W3S will not be going into any computer programming languages. They will stay as a WWW Tutorial Offerer, as their name suggests. I'm sure they will be happy to include tutorials on JSP, but I don't think any of the owners have much experience in it, or enough to write tutorials. So if anyone does have experience in a web language that is shirking from W3S, do not hesitate to offer a tutorial. After all, it's the user that makes a website, not the owner. :)

  6. What you could do is add this to your 'table' tag.

    id="tblRowDel"

    And to access how many table rows there are, you do this:

    x=document.getElementById("tblRowDel")x=x.getElementsByTagName("td")y=x.length

    Now, you can use Y with your for loop. Y contains the number of TD's in your table. :)

  7. Hmmm... I don't think you can declare global variables in javascript. Not sure. So use this code.First, put this in the body:

    <input type="hidden" id="pulsado" value="false" />

    Then, put this as your function:

    function enviar(){x=document.getElementById("pulsado").valueif (x!="true"){x="true"document.pago.submit();}}

    Hope that helps.

  8. We can't really help you wish a sig. You have to have experience in graphics software and backgrounds, inserting pictures, and text. If you don't have this experience, then you can't do anything. I myself enjoy making sigs, and it's only been a while since I've started. hitman1pb.gifsoldier5fh.pngAnd so on.

  9. I don't like the way some people on this forum are behaving. You know who you are, and it's not just one person. Having tiffs in topics, using relatively bad words, and insulting eachother generally is NOT what this forum is for. You people need to learn how to be CONSIDERATE, HELPFUL, and NICE. And that counts for EVERYONE. If anyone is going to be inconsiderate, or innappropriate, then they will be punished severely. I have watched quietly most of the time, but I'm seeing too much these days. I've noticed insulting of moderators, insulting of members, innapropriate words, and random hijacking. Has anyone seen the rules? I hope you've taken the time to read them, or at least part of them. If you haven't, then seriously, what do you think they're there for? I don't want any backtalk about this topic. I don't want private messages, and I don't want snide comments. I'm quite annoyed with a lot of people on this forum. Please don't be immature, focus on our goal to make this a great web building forum.I hope this has helped clear up some issues we've been having on this board. Keep this post in mind. Thank you.Good luck and happy coding.~Chocolate570, W3S Forum Staff

×
×
  • Create New...