[Proto-Scripty] Re: hide() not working for me on IE

2009-07-01 Thread Lavanya Shastri
It works if you do this: function hideElement(id){ $(id).style.display='none'; } function fileUploaded(id, filename) { var uploadingMessage = $(id).select('span [class~=uploadingmessage]')[0] > > ; >uploadingMessage.hide(); >

[Proto-Scripty] How can apply CSS into element created by createElement('div')?

2009-07-01 Thread serenobs
Hi. I wrote something like below: in CSS #Window { background-color: #cc; border: 1px solid; } in javascript var w = document.createElement('div'); w.id = 'Window'; With above code, CSS's property dosen't affect the w element. What's wrong? Thanks in advance. --~--~-~--~

[Proto-Scripty] How to get size of div before showing?

2009-07-01 Thread serenobs
Hi. I'd like to know the size of div before showing. For example, .my { position: absolute; } with this css, size is not determined yet. I want to place this div at center of viewport after calling Ajax.updater But I can get only initial size unless show element. How can I get right size?

[Proto-Scripty] Re: How can apply CSS into element created by createElement('div')?

2009-07-01 Thread T.J. Crowder
Hi, It should apply to it automatically (assuming you do actually append that element somewhere after creating it -- you don't show your code for doing that). If you're not seeing the CSS applied correctly and can't immediately figure out why, I'd recommend picking up with Step #3 from this trou

[Proto-Scripty] prototype window check?

2009-07-01 Thread Stefan Meyer
i want to know when a prototype window is open like this alert(top.Windows.focusedWindow.getId()); when the window is open , all works fine and i get a id, but when window isnt open, i get now info and the script stops without errors. how can i catch this? the lib is this http://prototype-w

[Proto-Scripty] Re: How to get size of div before showing?

2009-07-01 Thread Alex McAuley
You cant get the size unless it has either A. Content inside it (which gives it a width and height by the browser or B. set the size with css / inline styling HTH Alex - Original Message - From: "serenobs" To: "Prototype & script.aculo.us" Sent: Tuesday, June 30, 2009 9:40 PM Subject

[Proto-Scripty] Re: hide() not working for me on IE

2009-07-01 Thread Alex McAuley
does $(id).select('span [class~=uploadingmessage]')[0] return an(extended)/ element correctly ? - Original Message - From: "Lavanya Shastri" To: "Prototype & script.aculo.us" Sent: Wednesday, July 01, 2009 8:11 AM Subject: [Proto-Scripty] Re: hide() not working for me on IE > > I

[Proto-Scripty] Re: determine if dom:onload has happened yet?

2009-07-01 Thread Alex McAuley
Its not down to any javascript library to throw errors if something has happened once and cant happen again... You can modify the source or add methods to it if you wish to set a global variable that it has happened and check that each time it is called if you wish... Alex - Original Messa

[Proto-Scripty] Re: How to get size of div before showing?

2009-07-01 Thread serenobs
Even it has contents but in hidden, still don't know the size? I mean 1. div doesn't have any contents, so size is not determined yet. 2. after 1, div fulfilled remotely by Ajax.updater. so it has contents now. 3. But it is not rendered yet(because this element is hidden field now) At this mome

[Proto-Scripty] Re: How can apply CSS into element created by createElement('div')?

2009-07-01 Thread serenobs
Thanks for reply. It worked by using className. I'm not sure about why id was not working, but anyway it is working now using className. :) On 7월1일, 오후4시18분, "T.J. Crowder" wrote: > Hi, > > It should apply to it automatically (assuming you do actually append > that element somewhere after creati

[Proto-Scripty] resize problem.

2009-07-01 Thread serenobs
Hi again :) I'm new to prototype, javascript and I got many problems so please understand my bunch of questions :) Here is my question. I'd like to replace my div when window resized. I coded like below: function onBodyLoad() { var onResize = function(e) { var viewport = document.vi

[Proto-Scripty] Re: How can apply CSS into element created by createElement('div')?

2009-07-01 Thread Maarten
On 1 jul, 10:56, serenobs wrote: > I'm not sure about why id was not working, but anyway it is working > now using className. :) the value you used for your id attribute was 'Window', and identifier values are not allowed to start with a capital letter, so I'm guessing 'window' would have worke

[Proto-Scripty] Re: resize problem.

2009-07-01 Thread serenobs
I missed it. I'm using prototype 1.6.1.RC3. On 7월1일, 오후6시08분, serenobs wrote: > Hi again :) > > I'm new to prototype, javascript and I got many problems > so please understand my bunch of questions :) > > Here is my question. > I'd like to replace my div when window resized. > I coded like below

[Proto-Scripty] Re: How to get size of div before showing?

2009-07-01 Thread Vladimir Tkach
Fast solution - $(div.my).hide(); - update div's content by ajax / js - get $(div.my).height() / width() - $(div.my).show() 2009/6/30 serenobs > > Hi. > > I'd like to know the size of div before showing. > For example, > > .my { > position: absolute; > } > > with this css, size is not determin

[Proto-Scripty] Re: resize problem.

2009-07-01 Thread Vladimir Tkach
screen its reserved word in js 2009/7/1 serenobs > > I missed it. > I'm using prototype 1.6.1.RC3. > > On 7월1일, 오후6시08분, serenobs wrote: > > Hi again :) > > > > I'm new to prototype, javascript and I got many problems > > so please understand my bunch of questions :) > > > > Here is my questio

[Proto-Scripty] Re: MySQL - order ID

2009-07-01 Thread WLQ
Right, shouldn't then that be 'widgets'? Because the table of our original sortable list were controlled by the widgets table. So like: if($master = MyActiveRecord::FindById('widgets',$original)){ > Originals is a table in the database, it contains one of each type of   > thing you wish to be ab

[Proto-Scripty] Re: MySQL - order ID

2009-07-01 Thread Walter Lee Davis
Yes. Like any example that you will ever find on the Web, this one needs to be adjusted to match your environment. Some basic fluency in PHP is a requirement to use the MAR system, it can't divine everything for you. Walter On Jul 1, 2009, at 5:57 AM, WLQ wrote: > > Right, shouldn't then

[Proto-Scripty] Re: resize problem.

2009-07-01 Thread serenobs
i used screen as a example. I used another word in real code. On 7월1일, 오후6시38분, Vladimir Tkach wrote: > screen its reserved word in js > > 2009/7/1 serenobs > > > > > > > > > I missed it. > > I'm using prototype 1.6.1.RC3. > > > On 7월1일, 오후6시08분, serenobs wrote: > > > Hi again :) > > > > I'm n

[Proto-Scripty] Re: How to get size of div before showing?

2009-07-01 Thread serenobs
it didn't work properly. my code was something like that, but after update div's content by ajax.updater element.getWidth/Height doesn't return right size. that method returned previous size(=size before call ajax.updater). On 7월1일, 오후6시37분, Vladimir Tkach wrote: > Fast solution > - $(div.my).hi

[Proto-Scripty] Re: MySQL - order ID

2009-07-01 Thread WLQ
But here's what I get in error: array_shift() [function.array-shift]: The argument should be an array On this line: array_shift($data); > Yes. Like any example that you will ever find on the Web, this one   > needs to be adjusted to match your environment. Some basic fluency in   > PHP is a req

[Proto-Scripty] Re: MySQL - order ID

2009-07-01 Thread WLQ
But here's what I get in error: array_shift() [function.array-shift]: The argument should be an array On this line: array_shift($data); > Yes. Like any example that you will ever find on the Web, this one   > needs to be adjusted to match your environment. Some basic fluency in   > PHP is a req

[Proto-Scripty] Re: resize problem.

2009-07-01 Thread Rick Waldron
As a helpful sidenot, i think you'd benefit from NOT using onload="" document.observe('dom:loaded', function () { var onResize = function(e) { var viewport = document.viewport.getDimensions(); var screen = $('screen'); var s_view = screen.getDimensions(); scre

[Proto-Scripty] Re: MySQL - order ID

2009-07-01 Thread WLQ
But here's what I get in error: array_shift() [function.array-shift]: The argument should be an array On this line: array_shift($data); > Yes. Like any example that you will ever find on the Web, this one   > needs to be adjusted to match your environment. Some basic fluency in   > PHP is a req

[Proto-Scripty] Re: MySQL - order ID

2009-07-01 Thread WLQ
But here's what I get in error: array_shift() [function.array-shift]: The argument should be an array On this line: array_shift($data); > Yes. Like any example that you will ever find on the Web, this one   > needs to be adjusted to match your environment. Some basic fluency in   > PHP is a req

[Proto-Scripty] Re: MySQL - order ID

2009-07-01 Thread Walter Lee Davis
Which means it's not getting an array. So look and see what it IS getting. What is the value of $data at that point? (Use echo(), print_r(), something like that to output the value.) I can see the error right away, looking back over the code. It's a fairly stupid error on my part introduced

[Proto-Scripty] iterator.call is not a function"

2009-07-01 Thread Ian R
Ok. So I have a structure like this: ... ... ... And eventually what I am doing is replacing the contents of "player" with a new video, based on observing a click on one of the list items in "playlist". I've done it before but I'm trying to prototypejs it

[Proto-Scripty] "iterator.call is not a function"

2009-07-01 Thread Ian R
Ok. So I have a structure like this: ... ... ... And eventually what I am doing is replacing the contents of "player" with a new video, based on observing a click on one of the list items in "playlist". I've done it before but I'm trying to prototypejs it

[Proto-Scripty] Re: MySQL - order ID

2009-07-01 Thread Alex McAuley
Or just do if(is_array($data)) { array_shift($data); } HTH Alex - Original Message - From: "Walter Lee Davis" To: Sent: Wednesday, July 01, 2009 5:56 PM Subject: [Proto-Scripty] Re: MySQL - order ID > > Which means it's not getting an array. So look and see what it IS > ge

[Proto-Scripty] Re: iterator.call is not a function"

2009-07-01 Thread Ian R
This sent off by accident before I was done. I've resubmitted a complete post here: http://groups.google.com/group/prototype-scriptaculous/browse_thread/thread/fe0e1581be6b861f?hl=en Forgive me but I cannot seem to delete this one, though the instructions seem pretty straightforward (click the

[Proto-Scripty] Re: "iterator.call is not a function"

2009-07-01 Thread Alex McAuley
Is it returning an array ? Check with $$('div.fp_YouTube').each(function(el) { var player = el.select('.player'); var playlist = el.select('.playlist'); alert(playlist); // see if its an object return; playlist.select('li').each(function(video) { console.log(video.id); }); }); if it is returnin

[Proto-Scripty] Re: MySQL - order ID

2009-07-01 Thread WLQ
I understand I should put this: if(is_array($data)) { array_shift($data); } Instead of: array_shift($data); > Or just do > > if(is_array($data)) { >     array_shift($data); > > } > > HTH Alex > > - Original Message - > From: "Walter Lee Davis" > To: > Sent: Wednesday, July 01,

[Proto-Scripty] Re: MySQL - order ID

2009-07-01 Thread WLQ
I understand I should put this: if(is_array($data)) { array_shift($data); } Instead of: array_shift($data); > Or just do > > if(is_array($data)) { >     array_shift($data); > > } > > HTH Alex > > - Original Message - > From: "Walter Lee Davis" > To: > Sent: Wednesday, July 01,

[Proto-Scripty] Re: "iterator.call is not a function"

2009-07-01 Thread Ian R
I did check on the array situation -- it's so good and bad that finally turning to this forum and *writing it all down* usually solves the problem! In the above case, $(playlist).select('li').each didn't work, but playlist[0].select('li').each does. I'm not sure that I exactly LOVE how that wor

[Proto-Scripty] Re: Creating new lines and bypassing them through escapeHTML

2009-07-01 Thread Kash
Hi T.J., I finally got around trying your recommendation and it worked flawlessly. Thanks a ton. -- Kash On Jun 13, 3:32 am, "T.J. Crowder" wrote: > Hi, > > String#escapeHTML doesn't do anything with embedded newlines; it > "Converts HTML special characters to their entity equivalents." > Newl

[Proto-Scripty] Re: "iterator.call is not a function"

2009-07-01 Thread Rick Waldron
The reason you need to use an index on playlist is because select returns an array, so... instead of using the index[0] the way you've done, you can send it back to the el.select(): $$('div.fp_YouTube').each(function(el) { var player = el.select('.player')[0]; // <--- right here!

[Proto-Scripty] Re: horizontel scrollbar

2009-07-01 Thread david
Hi jan, you can use the live pipe extension, have a look at http://livepipe.net/control/scrollbar -- david On 25 juin, 10:24, Bangthat headkid wrote: > hello everybody, > > im not really into javascript . just want to change my "normal" > horizontel scrollbar to this one on this > sitehttp:/

[Proto-Scripty] Re: shift/move the scroll bar with prototype

2009-07-01 Thread david
Hi Stucture_Ulf, I think that it could be simply done with an Effect.Morph using the margin of the table to set it's position inside the div. So when need to center the specified row on the div, just calculate it's position (It's perhaps the difficult part) inside the div, and set margin accordin

[Proto-Scripty] InPlaceEditor Newbie

2009-07-01 Thread MANismyname
What is the best way of going about invoking the .stripScripts().stripTags(); string from prototype before the information is passed from the Scriptaculous InPlaceEditor to the server to be processed? var test = new Ajax.InPlaceEditor($('test'),'_proc.jsp',{

[Proto-Scripty] Re: Ajax.Updater - relative positioning - a footer - and IE7

2009-07-01 Thread david
Hi, Just a guess, could'nt you try to set a position value to the footer ?? perhaps to IE7 only ?? btw, I am sure that help will come quicker in a CSS group :)) -- david On 30 juin, 15:43, mtm81 wrote: > In IE7, the following page loads some content in two areas of the page > using an AJAX.Upd

[Proto-Scripty] Re: prototype window check?

2009-07-01 Thread david
hi Stefan, you could use try-catch :)) but I think depending to the exemple that besied testing directly the top.Windows.focusedWindow.getId(), perhaps test if top.Windows exist and if top.Windows.focusedWindow exist before, so if not exist don't try to get the id. it's just a guess, beause I ha

[Proto-Scripty] Re: InPlaceEditor Newbie

2009-07-01 Thread david
Hi Matt, bad idea, you should rely on server script to clear user input, not in client side. btw, the stripTag method does what you need. To integrate it in the AJAX.inPlaceEditor, just use the "callback" parameter on its creation. As doc says: << A function that will get executed just before the

[Proto-Scripty] Re: Weird Problems with Morph on IE8

2009-07-01 Thread david
Hi Tim, perhaps with code it could help, please, use www.pastie.org to share some code, or perhaps live exmple. - david On 29 juin, 06:36, "Timothy R. Butler" wrote: > Hi everyone, > I've been tinkering with Effect.Morph to create a nifty overlay of > semi-transparent bars (images with varying

[Proto-Scripty] Re: "INVALID_CHARACTER_ERR: DOM Exception 5" with Apple Safari

2009-07-01 Thread david
Hi Christoph, if you can't find a problem with code and all execution environment, image how hard it could be for us. please send exemple -- david On 28 juin, 17:36, "chkdes...@googlemail.com" wrote: > Hello > > I got the following error with safari and prototype.js with the newest > versions

[Proto-Scripty] Re: MySQL - order ID

2009-07-01 Thread Walter Lee Davis
You're solving the wrong problem, then. Keep looking, it's right there in front of you. Walter On Jul 1, 2009, at 1:36 PM, WLQ wrote: > > I understand I should put this: > if(is_array($data)) { >array_shift($data); > } > > Instead of: > array_shift($data); > >> Or just do >> >> if(is

[Proto-Scripty] Re: Ajax.Autocompleter error in IE 6

2009-07-01 Thread Momal
Thank you Sabri, this patch works very fine. On May 6, 7:05 pm, Sabri LABBENE wrote: > Hi, > You need to apply a small patch to your prototype.js > Instead of " while ((element = element.parentNode) && element != > document.body", put: > while ((element = element.parentNode) && element != docum

[Proto-Scripty] problem with Effects.Fade/Appear

2009-07-01 Thread Genieciel
Hello Group, I'm a rookie at those Web2 tricks but I'm trying to get there. I've been programming other languages for a long time, but this is something else ;-) Well I almost accomplished what I wanted until I had to move one DIV inside the main DIV... To make a story short, I use a DIV inclu

[Proto-Scripty] Charset, again

2009-07-01 Thread Tiago Becker
Hello! Is there a way to force prototype to respond with the corret encoding? I'm getting strange characters on my page (not the usual '?' char... seems like a square with "ff fd" chars on it...) I could fix this by encoding my python (backend) code with utf-8, but then it doesnt work on the ser

[Proto-Scripty] Safari 4 will not finish download with 1.6.1

2009-07-01 Thread Seppo
Hi, Anyone else having prototype 1.6.1 (RC2 & RC3) to not finish loading on Safari 4 (4.0.1)? Safari's Activity window shows extra "about:blank" page about to be loaded causing page not to finish the loading. Previous versions did not have this. Sample html file: http://www.w3.org/TR/xhtml1/DTD

[Proto-Scripty] Problem rendering toggle effect on site with multiple javascripts linked.

2009-07-01 Thread Frank1978
Tutorial: http://www.tutorialspoint.com/script.aculo.us/scriptaculous_toggle_effect.htm Test file: http://www.ofsgraphics.com/test/effects_toggle_test.html Test file Implemented (ABOUT PAGE LINK): http://www.ofsgraphics.com/test/index.html Effect page (about page html, page where the effect occ

[Proto-Scripty] Re: How can apply CSS into element created by createElement('div')?

2009-07-01 Thread T.J. Crowder
@OP: It's something else about your page, using the ID *does* work.[1] [1] http://pastie.org/531685 @Maarten: > the value you used for your id attribute was 'Window', and identifier > values are not allowed to start with a capital letter Yes they are: "ID and NAME tokens must begin with a le

[Proto-Scripty] Re: How to get size of div before showing?

2009-07-01 Thread bazikch
In CSS any element styled with "display:none;" has no sizes because he's no more in the document flow. What you can do is positionning the element ouside the viewport, ie. top: 0; left: -1000px, update it throught AJAX, get the right sizes and then position it where you want. HTH On Jul 1, 3:16