[Proto-Scripty] Re: Preventing Autocompleter

2010-08-04 Thread Eric
Sorry for the late reply (Holidays :o) ) but why don't you just
disable the city field until the state field is filled?

On Jul 5, 9:19 pm, Jonathan Snelling jon.snell...@gmail.com wrote:
 There should be a before or a conditional parameter you can pass. That
 returns true to continue or false to not send the request.

 On Monday, July 5, 2010, infringer infrin...@gmail.com wrote:
  No takers?  I guess there is no way to do this?

  On Jul 1, 6:51 pm, infringer infrin...@gmail.com wrote:
  I have an autocompleter on a City field.  But I don't want it to send
  the request UNLESS the state field is filled in?

  Any suggestions on how to prevent it from sending the request?  No
  need for the unnecessary requests going back and forth.

  Thanks,
  -David

  --
  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 
  athttp://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] Re: window.open on ajax response

2010-08-04 Thread Eric
The browser probably blocks the popup because it is not opened by a
direct action of the user.

What you may try is:
- On the click event:
  - Open the window on a blanc (or temporary) url
  - Launch the Ajax request
- On the Ajax's onComplete:
  - Change the url of the previously opened window

Eric

On Jul 13, 11:15 am, ColinFine colin.f...@pace.com wrote:
 On Jul 12, 5:31 am, Hari hariharanwebm...@gmail.com wrote:

  But even this doesn't help since function call happens by a call back
  and not user action. So the browser popup blocker click in.
  One way i could think is make the Ajax call synchronous. But I think
  its not a great idea to make the Ajax call synchronous...

 I don't see how this would make any difference.

 What you have not made clear are what are the circumstances in which
 your browser blocks popups.
 Without knowing that it is hard to suggest a solution.

 It seems unlikely to me that it makes a difference whether the window
 is opened from a callback or not, but I don't know.

 Colin

-- 
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: Login-Function broke with Firefox 4.0b2

2010-08-04 Thread Eric
Are you sure your firebug is compatible with this FF version?
I experienced this kind of issues (js errors occurring without any
error message or exception) in the past due to conflict between new FF
and old Firebug.

I also noticed that for some reason when one exception is fired during
an Ajax call, Firebug sometime doesn't show anything.
For what it worth, did you try to put a breakpoint in Ajax.Request's
handler (the code that will actually call your callback)?

Eric

On Jul 28, 12:43 pm, Marcus Schwarz msspamf...@gmx.de wrote:
 Hi there,

 I'm using a login based on prototype's Ajax-functions on my website. It
 works perfectly with every up-to-date browser, but for the new Firefox
 4.0 Beta 2 it is broken.

 I'm doing the following:

 // several pre-checks
 if (ok) {
         new Ajax.Request('dispatcher.php', {method:'post', parameters: {mode:
 'login', server: $('l_server').value, login: $('l_loginname').value,
 pass: $('l_password').value, l_ref: $('l_ref').value}, onSuccess:
 _handleLoginSuccess, onFailure: _handleLoginFailure});

 }

 dispatcher.php contacts some server based on the users' choice,
 establishes a session and sends that session-cookie back to the browser,
 alongside with further information like a target url.  The json-result
 looks like:
 {error:false,target:url here,ident:4e932}
 The cookie is set correctly in the response-header.

 Now the onSuccess-handler should handle this result. But: nothing
 happens. The handler:

 function _handleLoginSuccess(e) {
         console.debug(e);
         e = e.responseJSON;
 [blahblahblah]

 }

 There is no console output, there is nothing of the payload executed. If
 I set a breakpoint inside the handler, it is never reached. The
 failure-handler isn't called either.

 Now I'm stuck. Anyone having a great idea how to track down that
 problem? I'm using prototypes last stable release 1.6.1

 Thank you in advance

 Marcus

-- 
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: Touch screen / mouse gesturing.

2010-08-04 Thread Eric
About ideas/suggestions, instead of using text input for entering car
and personal pin numbers, have you considered using bar codes?
It is surprisingly easy to add barcode reading from a website using
ZXing (http://code.google.com/p/zxing).

In big lines, you have to install the free scanner on the phone
(available on iPhone, android and some others), and then the phone's
web browser can understand specially formated urls (see doc for
details) that will when navigated to (i.e when user press a button) :
- Start the scanner
- Navigate to one of your url with the scanned barcode value as GET
parameter

I would be surprised that any company owning a fleet of vehicles
nowadays would not having already sticked on them some barcode ID for
maintainability purpose.

FWIW, that would be a killer app to use (press one button, point
phone's camera to car's code until it beeps, point phone's camera to
your id badge until it beeps, and press a confirmation button) :o)

Eric

PS: Of course, don't remove the text input for peoples using an
iPad ;o)
On Jul 29, 1:41 pm, Richard Quadling rquadl...@gmail.com wrote:
 Hi.

 I'm developing a tiny little web page app which allows vehicle
 inspectors to see the work last carried out on a vehicle.

 The display shows the order header (who, when) and the order details (what).

 At the bottom of the display, there are 3 buttons - Prev, New Search, Next.

 The display is fed using AJAX, so no screen redraws and is very responsive.

 Along with the Prev and Next buttons, a user can press 'P' or 'N'.

 The app only has 2 input boxes and a button on the first page
 (vehicle number and personal pin number for the inspector which is
 linked to the contract(s) which are linked to the vehicle).

 The main display has the 3 buttons described above and there is an
 error notification page (vehicle not found, invalid pin number,
 etc.). This page has the New Search button.

 All working great on a desktop (IE8, Chrome and FireFox).

 The app is going to be mainly used via a browser on a mobile internet
 device (could be an iPhone, an iPad, or anything that has a browser).

 For the touch screen systems, I'd like to be able to implement some
 touch screen support.

 I'd like to implement something where if the user wipes their finger
 from left to right (like turning a page), then they are choosing
 Previous. If they wipe right to left, then are choosing Next.

 Are there any standards for this (OK, I'm just being hopefully) ?

 Can I simulate this using Prototype?

 At a guess, I think the following steps are needed ...

 1 - On mousedown, record position and time.
 2 - On mouseup, determine direction and duration.
 3 - For a short duration and a fairly low difference in the vertical
 movement, assume the intent is to trigger the page turning
 4 - For a long duration or a big difference in the vertical movement,
 do nothing extra.

 Assuming something like the above is right, how does
 highlight/cut/paste mechanism work?

 For this app, the content is pretty generic and no real need for cut and 
 paste.

 Any ideas/suggestions/etc. would be gratefully received.

 Regards,

 Richard Quadling.

-- 
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: IE 8 Error: The data necessary to complete this operation is not yet available

2010-08-04 Thread Eric
I think IE8 features a not that bad javascript debugger.
If you activate it and reload your page, it will stop on the faulty
line.


On Jul 30, 10:45 pm, KammylandSoftware kammyl...@gmail.com wrote:
 Using the latest Prototype and Scriptaculous scripts hereto (July,
 2010) I am getting this error in IE 8:

 The data necessary to complete this operation is not yet available.

 As IE does not give us a script filename but only a all-scripts-
 aggregate line number where the error occured, I have no idea what
 could be causing this. I did a Google search, but the only reasonable
 hit I got does not seem to exists anymore.

 Regards.

-- 
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: $$()

2010-08-04 Thread Eric

On Jul 30, 1:26 pm, Richard Quadling rquadl...@gmail.com wrote:
 $('form_id').observe('blur', function(ev) {
  var el = ev.findElement('input[type=text]');
  if (el) {
   // el is the element that triggered the blur.
 .../...
 [1]http://api.prototypejs.org/dom/event/findelement/

According to the provided link, If no matching element is found, the
document itself (HTMLDocument node) is returned..

Is it a bug in the documentation?
Until now, I've been paranoid testing (el  el != document) but I
have a feeling that your test works as we think it should (returning
null or undefined when no matching element is found).

Any enlightenment on this topic is welcome :o)

Eric

-- 
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: window.open on ajax response

2010-08-04 Thread T.J. Crowder
Hi,

  But even this doesn't help since function call happens by a call back
  and not user action. So the browser popup blocker click in.
  One way i could think is make the Ajax call synchronous. But I think
  its not a great idea to make the Ajax call synchronous...

 I don't see how this would make any difference.

It makes a difference because most browsers' popup blocking will allow
a window to be opened by code running during an event handler for a
user-initiated event (like a click), but block windows opened by code
running at other times (like an Ajax callback). So the synchronous
version would still be running during the event handler, so _may_
work. But then the OP would have to make a synchronous ajax call,
which is a Bad Thing. :-)

-- T.J.

On Jul 13, 10:15 am, ColinFine colin.f...@pace.com wrote:
 On Jul 12, 5:31 am, Hari hariharanwebm...@gmail.com wrote:

  But even this doesn't help since function call happens by a call back
  and not user action. So the browser popup blocker click in.
  One way i could think is make the Ajax call synchronous. But I think
  its not a great idea to make the Ajax call synchronous...

 I don't see how this would make any difference.

 What you have not made clear are what are the circumstances in which
 your browser blocks popups.
 Without knowing that it is hard to suggest a solution.

 It seems unlikely to me that it makes a difference whether the window
 is opened from a callback or not, but I don't know.

 Colin

-- 
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.