[Proto-Scripty] How to hyperlink images?

2009-03-07 Thread MH

I am using the MudFadeGallery slideshow by a web-developer and I have
implemented it for my own use. However, as it functions as a fade
image gallery slideshow, how am I able to get each image to be
hyperlinked with a specific href address??

This is the main script that makes the gallery work:
http://www.mudcorporation.com/code/js/MudFadeGallery-2.2.1/_lib/js/mud_FadeGallery.js

AND the mouseclick events:

function init() {
setOnMouseClick();
// images gallery
// load images note: imgsGallery[].image isn't an array of images,
just strings to hold location
imgsGallery[0] = new Object();
imgsGallery[0].image = images/image_0.jpg;
imgsGallery[0].title = Title for first Image;
imgsGallery[0].caption = This is the first image...;

imgsGallery[1] = new Object();
imgsGallery[1].image = images/image_1.gif;
imgsGallery[1].title = Title for second Image;
imgsGallery[1].caption = This is the second image...;

imgsGallery[2] = new Object();
imgsGallery[2].image = images/image_2.gif;
imgsGallery[2].title = Title for third Image;
imgsGallery[2].caption = This is the third image...;

imgsGallery[3] = new Object();
imgsGallery[3].image = images/image_3.png;
imgsGallery[3].title = Title for fourth image;
imgsGallery[3].caption = This is the fourth image...;

var start = 0;
imgs = new MudFadeGallery('imgs', 'imgDisplay', imgsGallery,
{startNum: start, preload: true, autoplay: 2});

// set the initial captions
var title = (imgsGallery[0].title) ? imgsGallery[0].title : No
Title;
var caption = (imgsGallery[0].caption) ? imgsGallery[0].caption : No
caption;
$(imgDisplay_title).innerHTML = title;
$(imgDisplay_caption).innerHTML = caption;
$(imgDisplay_number).innerHTML = 1 of  + imgsGallery.length + 
projects;
$(imgDisplay).src = imgsGallery[start].image;
}

--~--~-~--~~~---~--~~
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-scriptaculous@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] firefox, form_remote_tag, and element not updated

2009-03-07 Thread FredO

In the context of the Rails framework, I am trying to update a table
on a page asynchronously.
I have several fields that can be used to filter the records whic
populate the table.
And I am using 'form_remote_tag' more or less like this:

  % form_remote_tag  :url='/users/
update_user_rows/',  :update='user_rows' do |f| %
th %=  select_tag( :role_selector, options_for_select(role_opts,
0),  :onChange='form.submit()' ) %/th
yadda...
yadda...
yadda...
% end %

Then in a partial (included in the page) have something along the
lines of:
  div id=user_rows name=user_rows
yadda...
yadda...
yadda...
/div

In the controller I have code that looks like this:

 def update_user_rows
# gather up my selector values and compose a query array
# execute the query
# put the results in a instance variable for use by the partial
respond_to  do |wants|
  wants.js { render :partial='update_user_rows' }
 end

Everything seems to work fine except
The browser is not updating the element 'user_rows', with the response
from the server, instead it is putting up a new page with the HTML
fragment
generated by the server.

What do I have to do to get the browser to update the element
'user_rows??

--~--~-~--~~~---~--~~
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-scriptaculous@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: firefox, form_remote_tag, and element not updated

2009-03-07 Thread T.J. Crowder

Hi,

This sounds more like a Rails question than a Prototype question,
probably better asked over in the Rails group:
http://groups.google.com/group/rubyonrails-talk/topics

Knowing nothing about Rails myself, that onChange='form.submit()'
looks awfully suspicious, since submitting a form replaces the window.

HTH,
--
T.J. Crowder
tj / crowder software / com
Independent Software Engineer, consulting services available


On Mar 6, 11:20 pm, FredO sino...@gmail.com wrote:
 In the context of the Rails framework, I am trying to update a table
 on a page asynchronously.
 I have several fields that can be used to filter the records whic
 populate the table.
 And I am using 'form_remote_tag' more or less like this:

   % form_remote_tag  :url='/users/
 update_user_rows/',  :update='user_rows' do |f| %
 th %=  select_tag( :role_selector, options_for_select(role_opts,
 0),  :onChange='form.submit()' ) %/th
 yadda...
 yadda...
 yadda...
 % end %

 Then in a partial (included in the page) have something along the
 lines of:
   div id=user_rows name=user_rows
 yadda...
 yadda...
 yadda...
 /div

 In the controller I have code that looks like this:

  def update_user_rows
     # gather up my selector values and compose a query array
     # execute the query
     # put the results in a instance variable for use by the partial
     respond_to  do |wants|
       wants.js { render :partial='update_user_rows' }
  end

 Everything seems to work fine except
 The browser is not updating the element 'user_rows', with the response
 from the server, instead it is putting up a new page with the HTML
 fragment
 generated by the server.

 What do I have to do to get the browser to update the element
 'user_rows??
--~--~-~--~~~---~--~~
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-scriptaculous@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: script.aculo.us compare Jquery UI

2009-03-07 Thread Tobie Langel

Hi,

Well, why don't _you_ do something about it, then ?

Remember, this is open-source work.

You're welcomed to contribute, document, or even sponsor work if
you're into that.

Best,

Tobie

On Mar 7, 4:24 am, vtsuper vtsu...@gmail.com wrote:
 Today I read the JQuery UI 1.7http://jqueryui.com/demos/
 I found that their document is clear, their demo has been cover most
 of the cases. For example Draggable, Droppable. It is really
 convenient for the developer.

 I remeber that about 1 to 2 years before, script.aculo.us has been
 developed the same things already. So I goto read script.aculo.us.
 Sadly I found many broken 
 link.http://wiki.github.com/madrobby/scriptaculous/style-guide
 the wiki always show javascript error in IE7, the numbers of demo is
 few, it haven't cover most of the case. I can't see any improvement of
 the website.

 I support Prototype espically their OO style but it let me down again.
--~--~-~--~~~---~--~~
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-scriptaculous@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: Position of div with suggests

2009-03-07 Thread Mr. Snoot

 What do you mean? You can use stylesheet :)

Thtat's what I tried. But most of the settings in the css filey didn't
have any effect, so I thought that the position ist somehow
overwritten via javascript or sth else.

Anyways, I now got my primal (much shorter) script to work correctly,
so I don't need to make experiments with scriptaculous anymore ;-)


Thx for your help.
--~--~-~--~~~---~--~~
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-scriptaculous@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] Draggable div only barely visible

2009-03-07 Thread Al C

I new to script.aculo.us...

I added a draggable div to my pages

the div is a 'pop-up' dialog... it starts on the page empy and
hidden...

div id='edit_entry' id='edit_entry' style='display:none'/div
script type=''text/javascript''
new Draggable('edit_entry', { scroll: window });
/script

A separate script dynamically updates the contents of the div and when
the user clicks on a button and I make the div visible with

$( target ). show() ;  // where target is a variable containing the
div name

Most of the time it works exactly as intended...
Occasionally I have noticed that the div does not seem to appear...
but when you look more closely, it is there but only barely visible...
it has the wrong opacity... I think.

But I'm not doing anything with the opacity

Any clues?

TIA

Al

--~--~-~--~~~---~--~~
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-scriptaculous@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] Post Deleted

2009-03-07 Thread Bhudda Ben

I could almost cry

I posted a query here on problems I was having, got three seemingly
useful replies that were here yesterday, but I did not have time to
work with them.  Now all is gone - but an older post remains.  Did I
do something wrong?
--~--~-~--~~~---~--~~
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-scriptaculous@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 do you add methods to Form.Element

2009-03-07 Thread Walter Lee Davis

I have this little bit of fluff:

Element.addMethods({
addText: function(input, theText) {
if(typeof input.selectionStart != 'undefined'){
var start = input.selectionStart;
var end = input.selectionEnd;
input.value = input.value.substr(0, start) + 
theText +  
input.value.substr(end);
input.selectionStart = start + theText.length;
input.selectionEnd = start + theText.length;
input.focus();
}
}
});

But I want to add it only to Form.Element. I tried just tacking  
`Form.` onto the front of this, but all I got was a syntax error.  
Could someone clue me in how to add this method only to Form.Element?  
(Obviously, it doesn't make much sense in a regular Element context.)

Thanks in advance,

Walter

--~--~-~--~~~---~--~~
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-scriptaculous@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 to get the latest prototypejs source under windows system?

2009-03-07 Thread Quleczka

Hi,

  How to get the latest prototypejs source under windows system?

Do you mean how to get the current release right now or how to make it
automatically every time when new version is available?

I don't really get your question.

You can simply download it from http://prototypejs.org/download or
check google ajax libraries page
http://code.google.com/intl/pl/apis/ajaxlibs/documentation/index.html#prototype

Quleczka
--~--~-~--~~~---~--~~
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-scriptaculous@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 do you add methods to Form.Element

2009-03-07 Thread kangax

On Mar 7, 4:34 pm, Walter Lee Davis wa...@wdstudio.com wrote:
 I have this little bit of fluff:

         Element.addMethods({
                 addText: function(input, theText) {
                         if(typeof input.selectionStart != 'undefined'){
                                 var start = input.selectionStart;
                                 var end = input.selectionEnd;
                                 input.value = input.value.substr(0, start) + 
 theText +  
 input.value.substr(end);
                                 input.selectionStart = start + theText.length;
                                 input.selectionEnd = start + theText.length;
                                 input.focus();
                         }
                 }
         });

 But I want to add it only to Form.Element. I tried just tacking  
 `Form.` onto the front of this, but all I got was a syntax error.  
 Could someone clue me in how to add this method only to Form.Element?  
 (Obviously, it doesn't make much sense in a regular Element context.)

Form.Element.Methods.addText = function(){ /* ... */ };
Element.addMethods();

--
kangax
--~--~-~--~~~---~--~~
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-scriptaculous@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 do you add methods to Form.Element

2009-03-07 Thread Walter Lee Davis


On Mar 7, 2009, at 5:58 PM, kangax wrote:


 On Mar 7, 4:34 pm, Walter Lee Davis wa...@wdstudio.com wrote:
 I have this little bit of fluff:

 Element.addMethods({
 addText: function(input, theText) {
 if(typeof input.selectionStart !=  
 'undefined'){
 var start = input.selectionStart;
 var end = input.selectionEnd;
 input.value = input.value.substr(0,  
 start) + theText +
 input.value.substr(end);
 input.selectionStart = start +  
 theText.length;
 input.selectionEnd = start +  
 theText.length;
 input.focus();
 }
 }
 });

 But I want to add it only to Form.Element. I tried just tacking
 `Form.` onto the front of this, but all I got was a syntax error.
 Could someone clue me in how to add this method only to Form.Element?
 (Obviously, it doesn't make much sense in a regular Element context.)

 Form.Element.Methods.addText = function(){ /* ... */ };
 Element.addMethods();

 --
 kangax

Thanks much!

Walter


--~--~-~--~~~---~--~~
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-scriptaculous@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: writeAttribute problem

2009-03-07 Thread RobG



On Mar 7, 4:29 am, Tobie Langel tobie.lan...@gmail.com wrote:
 Hi again, Rob.

 I don't really want to argue over the benefits of attributes versus
 expandos, just wanted to outline that they weren't the same thing
 although the specs mandate a mapping of specified expandos to their
 attribute counterpart for backwards compatibility with DOM 0.

 It is also the case that IE never really figured out the difference
 between attributes and expandos which has added to the confusion.

 In short, attributes are attributes of the HTML element itself, thus
 can only be used to store and retrieve strings (HTML cannot
 distinguish types of attributes).

Strictly, the markup is interpreted by the browser and it does treat
different attribute values differently.  But I get what you are
saying.


 Expandos are properties of the DOM node (that is of the JS object
 itself).

 The expando to attribute mapping only works for attributes specified
 in HTML 4.01 spec (also note that expando can be of all the primitive
 JS types, not only string, and that those are also specified) so it
 won't work for custom attributes.

Hence why only DOM properties that map to valid HTML attributes should
be used.  Once that is realised, it follows that they can all be
reliably set using the DOM element property and that get/setAttribute
is only needed for non-valid attributes and for those, only strings
should be used.


 To illustrate this, consider the following in Firefox:

  var div = $$('div')[0];
  div.setAttribute('value', 'foo');
  div.getAttribute('value');
 foo
  div.value;
  typeof div.value;
 undefined
  var clone = div.cloneNode(true);
  clone.getAttribute('value');

 foo

  div = $$('div')[1];
  div.value = 'foo';
  div.getAttribute('value');
 null
  div.value;
 foo
  clone = div.cloneNode(true);
  clone.value;
  typeof clone.value

 undefined

 Of course, the behaviour is different in IE which shares the same
 attribute object between cloned nodes(!).

I think you agree with me.  The catch-all here is that DOM elements
are host objects and can't be trusted outside their specified
boundaries (and even then there are issues) unless you are dealing
with a specific sub-set of hosts.  Just don't to it.


--
Rob
--~--~-~--~~~---~--~~
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-scriptaculous@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: writeAttribute problem

2009-03-07 Thread RobG



On Mar 7, 12:53 pm, kangax kan...@gmail.com wrote:
 On Mar 6, 7:07 am, RobG rg...@iinet.net.au wrote:
 [...]

  The differences are in the browsers' implementation of setAttribute,
  For example, using setAttribute with any of the intrinsic event
  handlers.

 Setting intrinsic event handlers was never supported, as far as I
 remember, although some users did indeed try to set them and wondered
 why it wouldn't work. As much as I'd hate to have another exception,
 this deficiency should simply be stated in a documentation.

Yes, it was just an example of different behaviour, I wasn't
suggesting parsing attribute values.

[...]
 I personally almost always use simple property assignment, because I
 know what works and what doesn't; the speed benefits of `element.title
 = 'foo'` vs. $(element).writeAttribute('title', 'foo') are quite
 noticeable - no need to extend an element (that's O(N) in MSHTML), no
 need to call a method, no need to perform testing/translation/mapping
 inside that method, and so on and so forth.

Yes, agree fully.


--
Rob
--~--~-~--~~~---~--~~
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-scriptaculous@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] Can't stop and start Ajax.PeriodicalUpdater

2009-03-07 Thread fruehjahr

Yes, I searched right here and @ Google for a solution. But I spent
now over an hour with debugging and I can't find the solution. Please
help!

Ok, here's my script:

var liveStream = new Ajax.PeriodicalUpdater('live_buehne', '/inc/
live.php?lang=all', { method: 'get', frequency: 5, decay: 2 });

function livestart(lang){
var liveStream = new Ajax.PeriodicalUpdater('live_buehne', '/inc/
live.php?lang=all', { method: 'get', frequency: 5, decay: 2 });

}

function langChange(lang){
liveStream .stop();
liveStream = new Ajax.PeriodicalUpdater('live_buehne', '/inc/live.php?
lang='+lang, { method: 'get', frequency: 5, decay: 2 });
}

But stop() won't stop!

--~--~-~--~~~---~--~~
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-scriptaculous@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: Can't stop and start Ajax.PeriodicalUpdater

2009-03-07 Thread T.J. Crowder

Hi,

Assuming you are calling livestart() at some point, you're creating
two PeriodicalExecuters [one at initialization time and another in
livestart()].  The second one overwrites the reference to the first,
so if you later call langChange(), my guess is that you are succeeding
in stopping the second one; the first one continues.

FWIW, you're also ignoring the 'lang' parameter in livestart().

HTH,
--
T.J. Crowder
tj / crowder software / com
Independent Software Engineer, consulting services available

On Mar 7, 8:39 pm, fruehjahr fruehj...@gmail.com wrote:
 Yes, I searched right here and @ Google for a solution. But I spent
 now over an hour with debugging and I can't find the solution. Please
 help!

 Ok, here's my script:

 var     liveStream = new Ajax.PeriodicalUpdater('live_buehne', '/inc/
 live.php?lang=all', { method: 'get', frequency: 5, decay: 2 });

 function livestart(lang){
         var liveStream = new Ajax.PeriodicalUpdater('live_buehne', '/inc/
 live.php?lang=all', { method: 'get', frequency: 5, decay: 2 });

 }

 function langChange(lang){
         liveStream .stop();
         liveStream = new Ajax.PeriodicalUpdater('live_buehne', '/inc/live.php?
 lang='+lang, { method: 'get', frequency: 5, decay: 2 });

 }

 But stop() won't stop!
--~--~-~--~~~---~--~~
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-scriptaculous@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: Post Deleted

2009-03-07 Thread T.J. Crowder

Hi,

What makes you think it was deleted?  Provided you didn't send spam or
say something outrageously offensive (which seems unlikely), your
posts will not be deleted.  There's a team of moderators, but I didn't
delete anything that had actually gone out, and I tend to doubt any of
the others did.

This isn't the one?  This is all your Google profile shows for this
group.
http://groups.google.com/group/prototype-scriptaculous/browse_thread/thread/dc453955626d4db7/6680c450929ab6be

HTH,
--
T.J. Crowder
tj / crowder software / com
Independent Software Engineer, consulting services available

On Mar 7, 7:40 pm, Bhudda Ben benjamin.rud...@gmail.com wrote:
 I could almost cry

 I posted a query here on problems I was having, got three seemingly
 useful replies that were here yesterday, but I did not have time to
 work with them.  Now all is gone - but an older post remains.  Did I
 do something wrong?
--~--~-~--~~~---~--~~
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-scriptaculous@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 to get the latest prototypejs source under windows system?

2009-03-07 Thread T.J. Crowder

Hi,

Have you tried the steps listed on the Contribute page[1] and run into
a problem?

[1] http://prototypejs.org/contribute
--
T.J. Crowder
tj / crowder software / com
Independent Software Engineer, consulting services available


On Mar 7, 5:20 pm, buda www...@pochta.ru wrote:
 Does anyone know how?

 On 5 мар, 22:10, buda www...@pochta.ru wrote:

  it's not clear how for now the right way to get the latest source
  Early it was possible with Rubby for Windows with rake command

  Now, as I understand, it's not working

  How to get the latest prototypejs source under windows system?


--~--~-~--~~~---~--~~
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-scriptaculous@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
-~--~~~~--~~--~--~---