Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap

Feedback on: irt.org Home Page, Wednesday December 03, 2008 at 10:43:31

You are here: irt.org | About | Feedback | 5335 [ previous next ]

Feedback on:
irt.org Home Page

Sent by
Mike Landis on Wednesday December 03, 2008 at 10:43:31

Very worth reading

Too short

Not technical enough

Dear IRT.org,

The more I dig into javascript, the dumber I feel. Maybe you can
help. I've been reading
<http://www.irt.org/script/292.htm>, and a bunch of other pages, but
I'm still not getting the whole picture.

I'm trying to use PHP CAPTCHA in what I think is AJAX mode where
the user stays on the same page if validation fails and <INPUT> text
remains unchanged, but when validation succeeds, the form's action
script executes. Instinct tells me there that must be a way to use
securimage within a Javascript function that you could access through an onclick or onSubmit function.

Part of the problem may be that I don't understand how code like this works:

onclick="document.getElementById('captcha').src =
'/securimage/securimage_show.php?' + Math.random(); return false"

If you look at securimage_show.php, there's no obvious processing of the Query string. How is the argument being captured?

Similarly, if you read securimage's example_form.php, they show the
CAPTCHA image with: <img src="securimage_show.php?sid=<?php echo
md5(uniqid(time())); ?>">. This is a second use of securimage_show.php that seems to be accepting a query string, yet has no visible means of grabbing the 'sid' parameter. How does that

Am I trying to accomplish the impossible? I would really appreciate
a reference for a tutorial on this subject, an example implementation, or just an explanation of how to get the CAPTCHA code (which comes from PHP) and the <INPUT> field value into a javascript function.

Any suggestions?

Thanks, Mike

Other feedback on 'irt.org Home Page' - show all

©2018 Martin Webb