Re-creating a Registration Page ?

M

Mel Smith

Hi:

Scenario:
My new user submits a registration page to my server (either incomplete
or incorrect input in some fields).

I wish to 'rebuild' this complex registration page using the original
page *plus* fill-in user's submitted data back into the original page, then
send it back at him with an error message to correct it and re-submit.

Leaving out the usage of Javascript at the client's end (for now), is
there a 'classic' way to do this ?? or how do *you* folks do it ?

(if not, then I am faced with rebuilding the Reg Page in my CGI program
(using user's inputs instead of my original 'blank' fields), which is a
*lot* of string manipulation for each input field)

I wonder if I could start up an instance of IE on my *server*, then
learn about innerhtml stuff and do the replacement of fields somehow -- What
a hope :((

Also it would be nice if I could leave an invisible unique marker in
front of each of perhaps 20 input fields so later I could find the values I
need to replace during parsing.

Thanks,
 
N

Neredbojias

Hi:

Scenario:
My new user submits a registration page to my server (either
incomplete
or incorrect input in some fields).

I wish to 'rebuild' this complex registration page using the
original
page *plus* fill-in user's submitted data back into the original
page, then send it back at him with an error message to correct it
and re-submit.

Leaving out the usage of Javascript at the client's end (for
now), is
there a 'classic' way to do this ?? or how do *you* folks do it ?

(if not, then I am faced with rebuilding the Reg Page in my CGI
program
(using user's inputs instead of my original 'blank' fields), which is
a *lot* of string manipulation for each input field)

I wonder if I could start up an instance of IE on my *server*,
then
learn about innerhtml stuff and do the replacement of fields somehow
-- What a hope :((

Also it would be nice if I could leave an invisible unique marker
in
front of each of perhaps 20 input fields so later I could find the
values I need to replace during parsing.

Php is made for this. Conditionals on each field can "reload" the page
(with fields) until correct.
 
M

Mel Smith

Neredbojias said:
Php is made for this. Conditionals on each field can "reload" the page
(with fields) until correct.

Neredbojias:

Unfortunately (or fortunately), my CGI app is written in a c-type
languafe *xharbour -- www.xharbour.com), so I'm using that instead.

However, in the last few hours I've discovered a new method/technique
for doing this.

It involves an 'automation object' in my xharbour language that produces
an instance of an IE class, then I can 'get()' and 'set()' fields.

Altho I havern't got it 'aced' yet, it looks like:

********************************************
oIE:Visible := .F.
cWebSite := "\CGI\FORMS\TEST.HTM"

oIE:Navigate(cWebSite)
while oIE:busy
SecondsSleep(1.00)
ENDDO
x := oIE:document:getElementByID("uemail")
// now since x is an 'object'

cStr := x:get("value")
x:set("value","a new email")

cStr := x:get("value")
alert("new email="+cStr)

// etcetera ...

oIE:QUIT()

It seems to work correctly. But, I've got to do extensive testing.

(I hate to contemplate 100 users arriving simultaneously, and me starting up
100 instances of IE --- Arggg)

Sorry to trouble you folks.

-Mel Smith
 
N

Neredbojias

Neredbojias said:

Neredbojias:

Unfortunately (or fortunately), my CGI app is written in a c-type
languafe *xharbour -- www.xharbour.com), so I'm using that instead.

However, in the last few hours I've discovered a new
method/technique
for doing this.

It involves an 'automation object' in my xharbour language that
produces
an instance of an IE class, then I can 'get()' and 'set()' fields.

Altho I havern't got it 'aced' yet, it looks like:

********************************************
oIE:Visible := .F.
cWebSite := "\CGI\FORMS\TEST.HTM"

oIE:Navigate(cWebSite)
while oIE:busy
SecondsSleep(1.00)
ENDDO
x := oIE:document:getElementByID("uemail")
// now since x is an 'object'

cStr := x:get("value")
x:set("value","a new email")

cStr := x:get("value")
alert("new email="+cStr)

// etcetera ...

oIE:QUIT()

It seems to work correctly. But, I've got to do extensive testing.

(I hate to contemplate 100 users arriving simultaneously, and me
starting up 100 instances of IE --- Arggg)

Sorry to trouble you folks.

Well, as unfamiliar with xharbour as I am, it seems like you're using a
procedure relatively similar to what I suggested with php. Not sure
how good it is to create many instances of IE, but...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top