Welcome Guest [Log In] [Register]
We hope you enjoy your visit.

You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.


Join our community!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Add Reply
Restrict scope of search; for loop
Topic Started: Jul 13 2009, 02:56 AM (339 Views)
militantmilo
Member
 *  
only a beginner here but here's the problem...

The code is using a for loop to search for specific user names. When a match is found, something is added to the user's postdetails box.

But the scope of the search is too wide. It searches for matches in the post field too. How do you restrict the search just to the "normalname" area.

hope i'm making sense.
Edited by militantmilo, Jul 13 2009, 02:58 AM.
Offline Profile Quote Post Goto Top
 
Roby
Member Avatar
#27

To me it sounds like you just need to add that to the if statement after your loop. It should look something like this
Code: HTML
 
<script>
loop_type(parameters){
if(var[loop].className=="normalname" && condition 2){
// execute code
}
}
</script>


If you post the code it will be easier to help you.
Offline Profile Quote Post Goto Top
 
0 users reading this topic
« Previous Topic · zIFBoards - Skinning & Code Support · Next Topic »
Add Reply