Hey, welcome to ZBCode, the premier coding forum for ZB. Here you fill find some of the best Invisionfree and Zetaboards Codes on the network! Unfortunately, you're sorta hovering around in guest mode at the moment; why not join in on the fun? Register an account and you can start accessing the wealth of resources we have available here. Enjoy your stay at ZBCode, and remember to tell all your friends about us; the more members, the more codes available. ![]() Interested in joining? Click here. If you are already a member of ZBCode, feel free to login right here: |
- Pages:
- 1
- 2
| Attempt at a Request | |
|---|---|
| Tweet Topic Started: Jun 14 2009, 12:13 AM (400 Views) | |
| Dorith | Jun 14 2009, 12:13 AM Post #1 |
![]()
Has just entered the Matrix
![]()
|
Ok so I tried doing this request: http://zbcode.com/topic/1796477/ But I sorta failed, and would like to know what went wrong. I did these codes and neither worked:
Why doesn't that work? Edit: How would a post addition thing work? I got to this, then just got stuck:
Like I want it counting all the c_post which are the posts of the member originally. Through all the months and years and such. Edited by Dorith, Jun 14 2009, 02:47 AM.
|
![]() (Made emoticon using Codes Rock's Smiley Generator) | |
![]() |
|
| rockon1824 | Jun 14 2009, 09:16 AM Post #2 |
|
I never know what to put for my member title. =(
![]()
|
When you get the length of something, you're getting a number. For example, if there are four links on a page and you do this:Then b will equal 4. So, in your code, you're trying to tell it to change the class name of a number and then remove an attribute from a number. It's not working since numbers don't have classes and attributes. What it should look like is: I'm not sure how familiar you are with arrays, but in this case, since you're referring to a specific piece of information in an array (i.e. the number "b" link on the page), you need to specify the array (a) and then tell it which array value to use (b). This is written like "a[b]". There are a couple of other errors: you were also missing the closing bracket to the while loop, which is frequently one of the most common and frustrating errors in coding. Also, I think "maintitle" is the class of the div around the link in IF if I remember correctly. In this case, you would have to tell it to get the parent of the link using "parentNode":
|
| |
![]() |
|
| Gorgor | Jun 14 2009, 10:25 AM Post #3 |
|
Hello
![]()
|
Ooh, thanks for filling out my code request, it works perfectly
|
![]() |
|
| Dorith | Jun 14 2009, 03:12 PM Post #4 |
![]()
Has just entered the Matrix
![]()
|
Lol, I'm sorta learning the ropes. I keep "almost" getting the codes. Oh and I did add that other bracket in the Notepad++, guess I didn't add it here. So when it's around a Div you gotta add parentNode? Is there like a link to things that are picky like that? Also, what about my second code? How would I make a Javascript work ONLY in a specific url? |
![]() (Made emoticon using Codes Rock's Smiley Generator) | |
![]() |
|
| Reid | Jun 14 2009, 11:39 PM Post #5 |
![]()
What? The land of the free? Whoever told you that was your enemy.
![]()
|
Also, getElementsByClassName is not a function. It does not exist, sadly..you have to loop through every element and check if the className is such and such. Like to remove any post that contains the word 'pneumonoultramicroscopicsilicovolcanoconiosis' you would have to do this: hehe |
| The Resource Board | |
![]() |
|
| Dorith | Jun 15 2009, 03:41 PM Post #6 |
![]()
Has just entered the Matrix
![]()
|
Should this work?
|
![]() (Made emoticon using Codes Rock's Smiley Generator) | |
![]() |
|
| Reid | Jun 15 2009, 04:12 PM Post #7 |
![]()
What? The land of the free? Whoever told you that was your enemy.
![]()
|
Yeah it should, although it will give you something like [object HTMLTableCellElement] or something weird like that. Also, you may want to wrap your entire code in the 'if' statement. It won't write anything if you're not on that page, but you could save some coding power and make it where it won't do anything if it's not on that page and skip the loop entirely...
|
| The Resource Board | |
![]() |
|
| Viral | Jul 4 2009, 11:52 AM Post #8 |
![]()
|
Actually, it wouldn't. Without knowing what the code is supposed to do, your missing a clothing parenthesis on the if statement. |
![]() | |
![]() |
|
| Choco | Jul 4 2009, 01:36 PM Post #9 |
|
¡ʎɹoʇɔɐɟ ʎʇıʌɐɹƃ ɐ uı pǝddɐɹʇ ɯ,ı 'dןǝɥ
![]()
|
In the code that Reid just posted? Nope, the parentheses are fine.
|
It's a magical world, Hobbes, ol'd buddy... ...let's go exploring!In progress: Something Special ;) | |
![]() |
|
| Viral | Jul 4 2009, 01:47 PM Post #10 |
![]()
|
check it again |
![]() | |
![]() |
|
| 1 user reading this topic (1 Guest and 0 Anonymous) | |
| Go to Next Page | |
| « Previous Topic · Code University · Next Topic » |
- Pages:
- 1
- 2
























7:47 PM Jul 10