Working with if statements

justhere

Новичок
Регистрация
21.02.2011
Сообщения
13
Благодарностей
0
Баллы
0
So I'm a little curious about how to work with if statements, the platform I am working with has some changes now and again so for example sometimes there is a captcha and sometimes there isn't. If i code the project for captcha only then it may have only 50% success instead of 90%.

So say there are two types of forms;

1. With <input type="text" name="captcha">

2. One without it...

How do I make an if statement that if the captcha does or does't exist still carry on with posting?

Any help appreciated :-)
 

step85

Client
Регистрация
19.02.2010
Сообщения
1 839
Благодарностей
287
Баллы
83

justhere

Новичок
Регистрация
21.02.2011
Сообщения
13
Благодарностей
0
Баллы
0
I am little stuck on the logic operation...

http://img98.imageshack.us/i/logics.jpg/

I have already collected DOM source of the page, so what would I put in expression to see if name="captcha" exsists in the page :confused:
 

ollyno1uk

Client
Регистрация
01.03.2011
Сообщения
10
Благодарностей
1
Баллы
0
could you not just put the captcha field then have a branch coming off the red exit so if it fails, ie the captcha is not there, it will move on to the next step?
 

justhere

Новичок
Регистрация
21.02.2011
Сообщения
13
Благодарностей
0
Баллы
0
Good point olly... I'll have to give it a go soon and write back... seems a much easier way to do it if it works.... :-)
 

ollyno1uk

Client
Регистрация
01.03.2011
Сообщения
10
Благодарностей
1
Баллы
0
Good luck - I am very new to this as well so perhaps there is a better way!
 

Кто просматривает тему: (Всего: 1, Пользователи: 0, Гости: 1)