Javascript and Iframe load date with ASP

C

cevatkerim

Ok simple project!

a login page with a hidden iframe

when u click on submit after inserting your user and pass it pushes
those values to iframe and asp query the db and returns a code if it is
ok then whe whole page redirect to a url if not an error code is showed
on the page

how do I do this? I am really confused?!?!

thanks buddies!

Kerim Incedayi
 
J

Joshie Surber

when u click on submit after inserting your user and pass it pushes
those values to iframe and asp query the db and returns a code if it is
ok then whe whole page redirect to a url if not an error code is showed
on the page

how do I do this? I am really confused?!?!

I am assuming you can create most of the code yourself and just need to
be pointed in the right direction... if not please reply as such. Also
note that this is far from being the only way to do this.

In the document loaded by the iframe create a form with a hidden field
for each field the user fills out. Set the onsubmit handler of the
user-visible form to grab each value and copy its value into the iframe
form, then call submit() on the form in the iframe. The ASP script can
then take errors and turn them into javascript variables in the
resulting page loaded into the iframe, along with an onload handler
that calls whatever function on the main page that will handle errors,
passing the error(s) as arguments.

Apple has a tutorial on doing pretty much what you are asking for at
http://developer.apple.com/internet/webcontent/iframe.html
You may also want to try using AJAX to do the same thing, the most
useful tutorial for such I have seen being
http://jibbering.com/2002/4/httprequest.html

Hope this helps you.
 
C

cevatkerim

ok well I am an ASP expert I can do the server part but how can I
submit form values to iframe? if I can call the asp for ex:
login.asp?user=username&pass=password it will be ok. then I can create
a function call back to parent window and process it.. but I am not
sure about sending form values to iframe..

thanks for the help

:)

Kerim
 
C

cevatkerim

ok I got it done.. it was tricky but worked like a charm :) I added
some visuals such as a layer saying waiting for approval :)

merci!

Kerim
 

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

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,679
Members
48,796
Latest member
Greg L.

Latest Threads

Top