You are here: Re: match regular expressions in a webpage, not the entire source « PHP Programming Language « IT news, forums, messages
Re: match regular expressions in a webpage, not the entire source

Posted by d on 09/26/62 11:37

"charliefortune" <google@charliefortune.com> wrote in message
news:1137501487.909794.145540@g47g2000cwa.googlegroups.com...
> If I understand correctly, this won't tell me the result of executed
> scripts on the page, such as this ;
>
> if (index != -1) {
> if (productPrice[index] == 'SOLD OUT') {
> alert("This Product cannot be purchased at this time.");
> result=false;
> }
>
> This code is present in all the products, whether in stock or out, and
> I need it to run to decide whether or not the words 'SOLD OUT' are
> going to appear. I am wondering if eval() might provide the answer ? I
> am experimenting with it, with little success so far..

Eval is NEVER the answer. Ugh. Seriously, if you think eval is the answer,
you're doing something horribly wrong.

Nothing will tell you the output of executed scripts on the page, except the
browser in which it's running (which isn't possible in your case, as PHP is
not a javascript-enabled web browser). If you want to see the output,
follow the input, and make your own deductions from that :) Could you show
me the complete block of javascript? Maybe I can help you.

"Winners don't do eval" :-P

dave

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация