hi i want show to user Prototype window when my page load completely? please show me where can i use Prototype code in the html tag for show when my page load completely. thnaks. example: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http:// www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> <!-- Prototype Window Class Part --> <script type="text/javascript" src="../javascripts/prototype.js"> </script> <script type="text/javascript" src="../javascripts/effects.js"> </ script> <script type="text/javascript" src="../javascripts/window.js"> </ script> <script type="text/javascript" src="../javascripts/ window_effects.js"> </script> <script type="text/javascript" src="../javascripts/debug.js"> </ script> <link href="../themes/default.css" rel="stylesheet" type="text/css"> </link><link href="../themes/spread.css" rel="stylesheet" type="text/css"> </link><link href="../themes/alert.css" rel="stylesheet" type="text/css"> </link><link href="../themes/alert_lite.css" rel="stylesheet" type="text/ css" > </link> <link href="../themes/alphacube.css" rel="stylesheet" type="text/ css" > </link> <link href="../themes/debug.css" rel="stylesheet" type="text/css"> </link><!-- Doc Part--> <script type="text/javascript" src="js/application.js"> </script> <link href="stylesheets/login.css" rel="stylesheet" type="text/css"> </link><link href="stylesheets/style.css" rel="stylesheet" type="text/css"> </link></head> <body onload=""> <--- i think i am write some code here for call Prototype window <script>Application.addTitle(''Open a simple window'', ''open_window1'')</ script> <div style="display:none" id="open_window1_codediv"> <xmp id="open_window1"> var win = new Window({className: "dialog", width:350, height:400, zIndex: 100, resizable: true, title: "Sample window", showEffect:Effect.BlindDown, hideEffect: Effect.SwitchOff, draggable:true, wiredDrag: true}) win.getContent().innerHTML= "test" win.setStatusBar("www.test.com"); win.showCenter(); </xmp> </div> </body> </html> --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Hey, x-men a écrit :> i want show to user Prototype window when my page load completely? > please show me where can i use Prototype code in the html tag for show > when my page load completely. > thnaks.Don''t use inline event attributes, use an observer registration in your JS file. For instance, say you have prototype.js and then your own xmen.js. Your <head> contains the following: <script type="text/javascript" src="path/to/prototype.js"></script> <script type="text/javascript" src="path/to/xmen.js"></script> Then at the bottom of your xmen.js file, use this: Event.observe(window, ''load'', function() { // Whatever init code you need to run once the page is loaded }); ''HTH -- Christophe Porteneuve aka TDD tdd-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
hi i want show to user Prototype window when my page load completely? please show me where can i use Prototype code in the html tag for show when my page load completely. thnaks. example: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http:// www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> <!-- Prototype Window Class Part --> <script type="text/javascript" src="../javascripts/prototype.js"> </script> <script type="text/javascript" src="../javascripts/ effects.js"> </ script> <script type="text/javascript" src="../javascripts/window.js"> </ script> <script type="text/javascript" src="../javascripts/ window_effects.js"> </script> <script type="text/javascript" src="../javascripts/debug.js"> </ script> <link href="../themes/default.css" rel="stylesheet" type="text/ css"> </link><link href="../themes/spread.css" rel="stylesheet" type="text/ css"> </link><link href="../themes/alert.css" rel="stylesheet" type="text/ css"> </link><link href="../themes/alert_lite.css" rel="stylesheet" type="text/ css" > </link> <link href="../themes/alphacube.css" rel="stylesheet" type="text/ css" > </link> <link href="../themes/debug.css" rel="stylesheet" type="text/ css"> </link><!-- Doc Part--> <script type="text/javascript" src="js/application.js"> </ script> <link href="stylesheets/login.css" rel="stylesheet" type="text/ css"> </link><link href="stylesheets/style.css" rel="stylesheet" type="text/ css"> </link></head> <body onload=""> <--- i think i am write some code here for call Prototype window <script>Application.addTitle(''Open a simple window'', ''open_window1'')</ script> <div style="display:none" id="open_window1_codediv"> <xmp id="open_window1"> var win = new Window({className: "dialog", width:350, height:400, zIndex: 100, resizable: true, title: "Sample window", showEffect:Effect.BlindDown, hideEffect: Effect.SwitchOff, draggable:true, wiredDrag: true}) win.getContent().innerHTML= "test" win.setStatusBar("www.test.com"); win.showCenter(); </xmp> </div> </body> </html> show me step by step with example --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Hi First do you use this code with xmp tag. I did this ugly trick on the sample page to have editable code. You should do something like this <script type="text/javascript"> function openWindow() { var win = new Window(....) win.show(); } Event.observe(window, "load", openWindow); </script> Seb On Mar 24, 2007, at 8:23 AM, x-men wrote:> > hi > > i want show to user Prototype window when my page load completely? > please show me where can i use Prototype code in the html tag for show > when my page load completely. > thnaks. > > example: > > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" > "http:// > www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> > <html xmlns="http://www.w3.org/1999/xhtml"> > <head> > <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> > <title>Untitled Document</title> > <!-- Prototype Window Class Part --> > <script type="text/javascript" src="../javascripts/prototype.js"> > </script> > <script type="text/javascript" src="../javascripts/ > effects.js"> </ > script> > <script type="text/javascript" src="../javascripts/window.js"> > </ > script> > <script type="text/javascript" src="../javascripts/ > window_effects.js"> </script> > <script type="text/javascript" src="../javascripts/debug.js"> > </ > script> > > <link href="../themes/default.css" rel="stylesheet" > type="text/ > css" >> </link> > > <link href="../themes/spread.css" rel="stylesheet" type="text/ > css" >> </link> > > <link href="../themes/alert.css" rel="stylesheet" type="text/ > css" >> </link> > > <link href="../themes/alert_lite.css" rel="stylesheet" > type="text/ > css" > </link> > <link href="../themes/alphacube.css" rel="stylesheet" > type="text/ > css" > </link> > <link href="../themes/debug.css" rel="stylesheet" type="text/ > css" >> </link> > > <!-- Doc Part--> > <script type="text/javascript" src="js/application.js"> </ > script> > <link href="stylesheets/login.css" rel="stylesheet" > type="text/ > css" >> </link> > > <link href="stylesheets/style.css" rel="stylesheet" > type="text/ > css" > >> </link> > > </head> > <body onload=""> <--- i think i am write some code here > for call Prototype window > > <script>Application.addTitle(''Open a simple window'', ''open_window1'')</ > script> > > <div style="display:none" id="open_window1_codediv"> > <xmp id="open_window1"> > var win = new Window({className: "dialog", width:350, height:400, > zIndex: 100, resizable: true, title: "Sample window", > showEffect:Effect.BlindDown, hideEffect: Effect.SwitchOff, > draggable:true, wiredDrag: true}) > > win.getContent().innerHTML= "test" > win.setStatusBar("www.test.com"); > win.showCenter(); > </xmp> > </div> > > </body> > </html> > > > show me step by step with example > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
hi i want show to user Prototype window when my page load completely? please show me where can i use Prototype code in the html tag. please help me step by step because i am new in javascript and Prototype. thanks. example: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http:// www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> <!-- Prototype Window Class Part --> <script type="text/javascript" src="../javascripts/prototype.js"> </script> <script type="text/javascript" src="../javascripts/ effects.js"> </ script> <script type="text/javascript" src="../javascripts/window.js"> </ script> <script type="text/javascript" src="../javascripts/ window_effects.js"> </script> <script type="text/javascript" src="../javascripts/debug.js"> </ script> <link href="../themes/default.css" rel="stylesheet" type="text/ css"> </link><link href="../themes/spread.css" rel="stylesheet" type="text/ css"> </link><link href="../themes/alert.css" rel="stylesheet" type="text/ css"> </link><link href="../themes/alert_lite.css" rel="stylesheet" type="text/ css" > </link> <link href="../themes/alphacube.css" rel="stylesheet" type="text/ css" > </link> <link href="../themes/debug.css" rel="stylesheet" type="text/ css"> </link><!-- Doc Part--> <script type="text/javascript" src="js/application.js"> </ script> <link href="stylesheets/login.css" rel="stylesheet" type="text/ css"> </link><link href="stylesheets/style.css" rel="stylesheet" type="text/ css"> </link></head> <body onload=""> <--- i think i am write some code here for call Prototype window <script>Application.addTitle(''Open a simple window'', ''open_window1'')</ script> <div style="display:none" id="open_window1_codediv"> <xmp id="open_window1"> var win = new Window({className: "dialog", width:350, height:400, zIndex: 100, resizable: true, title: "Sample window", showEffect:Effect.BlindDown, hideEffect: Effect.SwitchOff, draggable:true, wiredDrag: true}) win.getContent().innerHTML= "test" win.setStatusBar("www.test.com"); win.showCenter(); </xmp> </div> </body> </html> --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
In any of your js source files or script tags, use this Event.observe(window, ''load'', function(evt) { //Code here }); It sounds like you could benefit from basic Javascript instruction-- there are many ways of accomplishing the same thing without using Prototype; the advantage of this method is it''s clean, easy to read, and won''t step on other onload functions. Find a good book or online tutorial, and use it. Please also look at the official doocumentation (prototypejs.org) or try a Google search. In addition to the volumes of information on this question on the internet, it has been answered on this list multiple times too. That''s probably why no one answered your question the first time. TAG On Mar 26, 2007, at 11:52 AM, x-men wrote:> > hi > > i want show to user Prototype window when my page load completely? > please show me where can i use Prototype code in the html tag. > please help me step by step because i am new in javascript and > Prototype. > thanks. > > example: > > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" > "http:// > www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> > <html xmlns="http://www.w3.org/1999/xhtml"> > <head> > <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> > <title>Untitled Document</title> > <!-- Prototype Window Class Part --> > <script type="text/javascript" src="../javascripts/prototype.js"> > </script> > <script type="text/javascript" src="../javascripts/ > effects.js"> </ > script> > <script type="text/javascript" src="../javascripts/window.js"> > </ > script> > <script type="text/javascript" src="../javascripts/ > window_effects.js"> </script> > <script type="text/javascript" src="../javascripts/debug.js"> > </ > script> > > <link href="../themes/default.css" rel="stylesheet" > type="text/ > css" >> </link> > > <link href="../themes/spread.css" rel="stylesheet" type="text/ > css" >> </link> > > <link href="../themes/alert.css" rel="stylesheet" type="text/ > css" >> </link> > > <link href="../themes/alert_lite.css" rel="stylesheet" > type="text/ > css" > </link> > <link href="../themes/alphacube.css" rel="stylesheet" > type="text/ > css" > </link> > <link href="../themes/debug.css" rel="stylesheet" type="text/ > css" >> </link> > > <!-- Doc Part--> > <script type="text/javascript" src="js/application.js"> </ > script> > <link href="stylesheets/login.css" rel="stylesheet" > type="text/ > css" >> </link> > > <link href="stylesheets/style.css" rel="stylesheet" > type="text/ > css" > >> </link> > > </head> > <body onload=""> <--- i think i am write some code here > for call Prototype window > > <script>Application.addTitle(''Open a simple window'', ''open_window1'')</ > script> > > <div style="display:none" id="open_window1_codediv"> > <xmp id="open_window1"> > var win = new Window({className: "dialog", width:350, height:400, > zIndex: 100, resizable: true, title: "Sample window", > showEffect:Effect.BlindDown, hideEffect: Effect.SwitchOff, > draggable:true, wiredDrag: true}) > > win.getContent().innerHTML= "test" > win.setStatusBar("www.test.com"); > win.showCenter(); > </xmp> > </div> > > </body> > </html> > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---