[Proto-Scripty] SSL and Ajax.updater
Please pardon if this is a duplicate, but after 24 hours it had not come back to my mailbox If I load a page using https and then update a div using Ajax.updater, is this transaction also encrypted if I use relative addressing, eg: no https:// url = 'profile.php'; new Ajax.Updater('replyPane',url ); // get the requested message or do I need to use the complete URL including the protocol ? -- Bill Drescher william {at} TechServSys {dot} com -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptacul...@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.
Re: [Proto-Scripty] SSL and Ajax.updater
anything relative to the page without a protocol inherits the protocol and the URL iirc ... To test .. use firebug and make an ajax request on the page and see what the url ends up as.. HTH Alex Mcauley http://www.thevacancymarket.com - Original Message - From: bill To: prototype-scriptaculous@googlegroups.com Sent: Thursday, February 04, 2010 11:46 AM Subject: [Proto-Scripty] SSL and Ajax.updater Please pardon if this is a duplicate, but after 24 hours it had not come back to my mailbox If I load a page using https and then update a div using Ajax.updater, is this transaction also encrypted if I use relative addressing, eg: no https:// url = 'profile.php'; new Ajax.Updater('replyPane',url ); // get the requested message or do I need to use the complete URL including the protocol ? -- Bill Drescher william {at} TechServSys {dot} com -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptacul...@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en. -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptacul...@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.
Re: [Proto-Scripty] SSL and Ajax.updater
On 2/4/2010 7:48 AM, Alex McAuley wrote: anything relative to the page without a protocol inherits the protocol and the URL iirc ... To test .. use firebug and make an ajax request on the page and see what the url ends up as.. HTH thanks, I have firebug but don't know how to see the url. -- Bill Drescher william {at} TechServSys {dot} com -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptacul...@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.
[Proto-Scripty] groups question
I am not receiving my messages back when I send them - I went to the google groups page for this group but could not find a way to set that. Any hints. -- Bill Drescher william {at} TechServSys {dot} com -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptacul...@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.
Re: [Proto-Scripty] SSL and Ajax.updater
Open firebug, click the console tab and u see the URLS when the request is made!.. Alex Mcauley http://www.thevacancymarket.com - Original Message - From: bill To: prototype-scriptaculous@googlegroups.com Sent: Thursday, February 04, 2010 3:48 PM Subject: Re: [Proto-Scripty] SSL and Ajax.updater On 2/4/2010 7:48 AM, Alex McAuley wrote: anything relative to the page without a protocol inherits the protocol and the URL iirc ... To test .. use firebug and make an ajax request on the page and see what the url ends up as.. HTH thanks, I have firebug but don't know how to see the url. -- Bill Drescher william {at} TechServSys {dot} com -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptacul...@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en. -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptacul...@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.
[Proto-Scripty] Singleton Class
Hi All, Have spent the last hour looking for a singleton class in prototype, with not a large amount of luck. Found a reasonable attempt by Jim Higgson at http://jimhigson.blogspot.com/2009/01/prototype-singleton-classes.html but didn't like the fact that if you called new again it threw an exception. To my mind, calling new should simply return the instance. I realise that this goes against the normal singleton design pattern which should be used with getInstance() rather than new, but as we can't make 'new' private as we would in other languages I felt that 'new' was the logical function to make sure it got the singleton instance (i.e. it is more likely to be used by others to create an object in Javascript and with no compile to warn you until runtime, it should 'just work'). To make it work like that I have used the following code. Comments on anything that you don't like, or that might cause an issue would be appreciated. var STUser = Class.create( { initialize: function() { if (!STUser._instance) { this.getInstance(); // Actual instance contructor, sets up variables etc. } return this; }, getInstance: function() { this._timePeriod = 120; }, getTimePeriod: function() { return STUser._instance._timePeriod; }, setTimePeriod: function(timePeriod) { STUser._instance._timePeriod = timePeriod; } }); STUser._instance = new STUser(); Tested with the following code... var user = new STUser(); alert(User 1 Time = + user.getTimePeriod()); user.setTimePeriod(100); alert(User 1 Time = + user.getTimePeriod()); var user2 = new STUser(); alert(User 2 Time = + user2.getTimePeriod()); Which worked as advertised, Appreciate any feedback, and wonder if I missed something out of prototype as was surprised there wasn't (or I couldn't find) a singleton pattern. -- daff SOFTWARE ENGINEER andrew 'daff' niles | spider tracks ltd | 117a the square po box 5203 | palmerston north 4441 | new zealand P: +64 6 353 3395 | M: +64 21 515 548 E: d...@spidertracks.co.nz mailto:d...@spidertracks.co.nz W: www.spidertracks.com http://www.spidertracks.com -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptacul...@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.
[Proto-Scripty] How would you check if a function is defined using prototype
How would you check if a function is defined using prototype Thanks, RK. -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptacul...@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.
[Proto-Scripty] Created elements work properly in Firefox, but not IE7. Why?
Hello, I ran into a problem when creating some new elements. I'm sure the problem is mine, but I can't figure out the mistake I made. Hopefully someone here can point out my error. Using Prototype 1.6.0.2, I created and inserted two new elements into a page. popup_wrapper = new Element('div', { id: 'logout_warning_popup', style: 'position:relative;' confirmation_button = new Element('input', { type: 'button', value: 'Ok', onclick: window.alert('button clicked'); popup_wrapper.insert(confirmation_button); $('content').insert(popup_wrapper); Very simple. In both IE7 and Firefox (3.5.7), the box and button appeared correctly on the page. When I clicked on the Ok input in Firefox, I received the 'button clicked' alert box. But when I clicked the box in IE7, I got no alert box at all. And no indication that a js error had occurred. My first thought was that there might be a HTML syntax error that was causing the IE problem. So I copied the HTML created by the above code and made it a static part of the page. Now the button worked properly in both IE and FF. So there's something wrong in my creation of the elements that is preventing the onclick event from firing, and I'm not sure what that is. Any advice? Thanks, Ian -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptacul...@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.
[Proto-Scripty] Re: How would you check if a function is defined using prototype
Hi, If the function is expected as a property of some object (including `window`), then I'd probably do this: if (typeof obj.functionName == 'function') So for instance: if (typeof window.globalEval == 'function') If you need to check whether a function is defined in the current scope and not on a property (so, on the current variable object or one of the others in the scope chain), I'd probably be a bit more defensive: var defined = false; try { defined = typeof functionName == 'function'; } catch (e) { } Prototype also adds a function to `Object` that does the check: if (Object.isFunction(window.globalEval)) ...which is just a shorthand way of doing the typeof. HTH, -- T.J. Crowder Independent Software Consultant tj / crowder software / com www.crowdersoftware.com On Feb 4, 3:14 pm, RK rajkishore.puj...@gmail.com wrote: How would you check if a function is defined using prototype Thanks, RK. -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptacul...@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.