Jump to content

[SOLVED] Checking for Elements, stop when satisfied.


iPixel

Recommended Posts

Ok so i've got these <tr>'s with ID's such as

xDates_0000_1

xDates_0000_2

xDates_0000_3

xDates_0000_4

xDates_0000_5

 

You get the idea, the example ended at _5 but i could have much more or much less, that part i dont really know.

 

is there a way in JS to loop and check for ID's and once an ID is not found stop?

Or in other words look for ID's till you cant find one. So the loop will go..

 

looking for ID xDates_0000_1  --- YAY found it ---- Do this and that

looking for ID xDates_0000_2  --- YAY found it ---- Do this and that

looking for ID xDates_0000_3  --- Hmm cant find it ---- Ok exit and go on...

 

Thanks

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.