aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes Popup window for ajax Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Popup window for ajax" Watch "Popup window for ajax" New topic
Author

Popup window for ajax

Nakata kokuyo
Ranch Hand

Joined: Apr 13, 2005
Posts: 442
good day to all, if i need to create a popup box which allow user to enter password and after user enter password , it go check for password validation, how to we do that ? can someone please enlighten me ?

thank you
[ November 06, 2006: Message edited by: Nakata kokuyo ]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61654
    
  67

Your question is too vage for a serious answer. What kind of "popup box"? A new window? A floating div? An IE-only modal dialog?
[ November 01, 2006: Message edited by: Bear Bibeault ]

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Nakata kokuyo
Ranch Hand

Joined: Apr 13, 2005
Posts: 442
sorry, Bear Bibeault , i make confuse on it , it suppose a new popup windows, mind to guide me how do i use ajax in popup window, thank you
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Have you tried a basic tutorial on Ajax?

http://developer.apple.com/internet/webcontent/xmlhttpreq.html

Eric
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61654
    
  67

A popup window is just like any other page so there are myriad ways to use Ajax within it. Again, what specific problem are you trying to solve?
Nakata kokuyo
Ranch Hand

Joined: Apr 13, 2005
Posts: 442
hi bear,

i have a page.jsp, this page have a checkbox, when tick on checkbox, it prompt a popup window and this popup window allow user enter password in order to further proceed, if popup window enter wrong password, it should display error message in popup window, if correct password , it will close the popup window and checkbox ticked

the popup window is construct as follow :




when i enter correct password or incorrect password , it doesn't prompt the error message but does return the whole xml file and replaced the popup window, can i know which part i have done wrong ?

below is part of action



thank you for guidance

[ November 06, 2006: Message edited by: Nakata kokuyo ]

[ November 06, 2006: Message edited by: Nakata kokuyo ]

[ November 06, 2006: Message edited by: Nakata kokuyo ]

[ November 06, 2006: Message edited by: Nakata kokuyo ]
[ November 07, 2006: Message edited by: Nakata kokuyo ]
Nakata kokuyo
Ranch Hand

Joined: Apr 13, 2005
Posts: 442
i finally checkout that function initRequest(url) is not work right after i change to <button> , previously, i'm using image , so it actually called the action but not ajax function

may be it cause by ajax.request is not create, but i'm not sure how to further debug it ? can someone give me some tips ?
[ November 07, 2006: Message edited by: Nakata kokuyo ]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61654
    
  67

Originally posted by Nakata kokuyo:
is not work right after i change to <button> rather than <image>


I would concentrate on figuring out why the button code isn't working.
Nakata kokuyo
Ranch Hand

Joined: Apr 13, 2005
Posts: 442
sorry for confusing , bear , i put it in wrong way to express my problem, the button is work but not image , cause when using image , it will active the action "measure_checkpassword"
Nakata kokuyo
Ranch Hand

Joined: Apr 13, 2005
Posts: 442
hi all, the problem solved as i make a stupid mistake where i didn't import the prototype.js source properly
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Popup window for ajax