SitePoint Sponsor |
|
User Tag List
Results 1 to 2 of 2
Thread: fields in popup window
-
Apr 30, 2003, 17:08 #1
- Join Date
- Apr 2003
- Location
- canada
- Posts
- 158
- Mentioned
- 1 Post(s)
- Tagged
- 0 Thread(s)
fields in popup window
Hello everybody,
i'm trying to create a user id and password field, 2 button(cancel, submit) and 2 links to in a popup window.. so when someone clicks a link the above options would popup in a window for the user to input.
I'm not a javascript programmer so can someone tell me how i can do this in the following code if not point me to a tutorial...
Any help you guys can give me would be greatly appreciated.. I'll leave the javascripting to the javascripting people..heheh
Thanks everybody
Code:<html> <head> <script Language="JavaScript"> function popup(url, name, width, height) { settings= "toolbar=no,location=no,directories=no,"+ "status=no,menubar=no,scrollbars=no,"+ "resizable=no,width="+width+",height="+height; Authwindow=window.open("http://"+url,name,settings); } </script> </head> <body> <a href="#" onClick="popup('www.yahoo.com', 'Win1', 300, 300); return false"> Click Here To Go to Yahoo</a> </body> </html>
-
May 2, 2003, 13:21 #2
- Join Date
- Mar 2002
- Posts
- 327
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
The simplest way is to popup a JS window that contains an HTML page that has all the controls in it. You call it like:
function show_accessories()
{
var win1;
win1 = window.open("accessories.htm","accs",
"resizable=no,height=400,width=120,alwaysRaised=yes,status=no,top=120,left=5");
}
Either that or you use the reference to the window (in this case win1) and do a document.write to it. Hope this helps.
NickAll4YourPC for all your PC needs. Custom software.
Websites. Web marketing. Training.
http://members.aol.com/nickjc67
Bookmarks