469,270 Members | 1,153 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,270 developers. It's quick & easy.

Javascript and Iframe load date with ASP

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

Oct 25 '05 #1
3 1690
> 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/...nt/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.

Oct 26 '05 #2
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

Oct 26 '05 #3
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

Oct 27 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by joaopedrogoncalves | last post: by
1 post views Thread by jeff_m | last post: by
8 posts views Thread by chrisdude911 | last post: by
5 posts views Thread by Cloy | last post: by
5 posts views Thread by ken.roberts | last post: by
16 posts views Thread by Phlip | last post: by
2 posts views Thread by sorobor | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.