[Proto-Scripty] Prototype version 1.6 hinders ColdFusion tag cfmessagebox

2010-03-02 Thread mrlife
When used to confirm (button options: yes, no), cfmessagebox sends a
button value to a javascript callbackhandler. If the user clicked the
yes button, the callbackhandler can check if the button's value is
yes. This is the behavior expected of cfmessagebox, and it works in
Prototype 1.5.1.2. If Prototype 1.6 is used instead, the button value
in the javascript callbackhandler is always the number 1, presumably
indicating that a button was clicked.  Can cfmessagebox be used
correctly with Prototype 1.6?

-- 
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] problems with prototype

2010-03-02 Thread ___
Iam trying to do the following example:

I have file called main.jsp with the code:

html xmlns=http://www.w3.org/1999/xhtml;
head
meta http-equiv=Content-Type content=text/html; charset=UTF-8/

title%=Constants.COMMON_TITLE_BASE%
/title
link href=scripts/style.css rel=stylesheet type=text/css/
link href=scripts/menu.css rel=stylesheet type=text/css/
script language=javascript src=scripts/jquery-1.3.2.min.js/
script
script language=javascript src=scripts/jquery.dimensions.js/
script
!--script language=javascript src=scripts/ajax/
prototype-1.6.0.3.js/script--
script language=javascript src=scripts/ajax/
main.prototype.ajax.js/script
script language=javascript src=scripts/ajax/prototype.js/
script



/head
body

fmt:bundle basename=common 

jsp:include page=/menu.jsp/
p
headerDNI: %=request.getRemoteUser()%  Home/header
/p
p fmt:message key=home.simple/  %=request.getRemoteUser()%!
/p

p
This is the ajax example

form id=form
First name
input type=text id=firstName name=firstName MAXLENGTH=20 /
Second name
input type=text id=secondName name=secondName MAXLENGTH=20 /

input type=submit value=Submit onclick=ajaxFunction(); /
/form

/p

pnbsp;/p

p fmt:message key=home.message/  /p

   /fmt:bundle

/body
/html

In the file main.prototype.ajax.js

i have the code:

/
***/

function getUrl(){
 url = window.location.protocol + // + window.location.host+ /
I_COLLEGE/ajax.do?ActionID=600;
return url;
}

/
***/

function getPostBody(){
return (firstName=aasecondName=bb);
}

/
/
function getOptions(){

return {method:'get',
onComplete:doComplete,
onSuccess:successFunc,
onFailure:failureFunc,
parameters:getPostBody(),
postBody:getPostBody()};

}

/
*/
function ajaxFunction(){

new Ajax.Request(getUrl(),getOptions());
}

/**/

function doComplete(){

alert('sss');

}

/*/
function successFunc(response){

 if (200 == response.status){
alert(Call is success);
}
var container = $('notice');
var content = response.responseText;
container.update(content);
}
/**/
function failureFunc(response){

 alert(Call is failed );

}
//

and when i do click in the button , checking i know that the info goes
to the servlet but then with firebug and firefox i dont get the
response.

With firebug i get:

GET ajax.do?ActionID=600firstName=aasecondName=bb
http://localhost:8080/I_COLLEGE/ajax.do?ActionID=600firstName=aasecondName=bb

Timeout

localhost:8080

so i know that there is a timeout but then i see:
Firebug's log limit has been reached. 0 entries not shown.
Preferences
uncaught exception: [Exception... '[JavaScript Error: Prototype is
not defined {file: http://localhost:8080/I_COLLEGE/scripts/ajax/
prototype.js line: 1351}]' when calling method:
[nsIDOMEventListener::handleEvent] nsresult: 0x80570021
(NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS) location: native
frame :: unknown filename :: TOP_LEVEL :: line 0 data: yes]

I try to find what happened but i cant find the solution.
Any ideas or a clear example of prototype with servlets?.

-- 
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: Prototype version 1.6 hinders ColdFusion tag cfmessagebox

2010-03-02 Thread T.J. Crowder
Hi,

Are you quite certain of your diagnosis? I can't see why Prototype
would make any difference here, it doesn't have anything specific to
cfmessagebox. Are you sure nothing else changed at the same time you
changed from 1.5.1.2 to 1.6?

If so, I'd suggest putting together a minimalist test case[1] showing
it working with 1.5.1.2 and not with 1.6 and opening a bug report on
Lighthouse[2].

[1] http://proto-scripty.wikidot.com/self-contained-test-page
[2] https://prototype.lighthouseapp.com/projects/8886/home

HTH,
--
T.J. Crowder
Independent Software Consultant
tj / crowder software / com
www.crowdersoftware.com


On Mar 1, 5:42 pm, mrlife ericsn...@gmail.com wrote:
 When used to confirm (button options: yes, no), cfmessagebox sends a
 button value to a javascript callbackhandler. If the user clicked the
 yes button, the callbackhandler can check if the button's value is
 yes. This is the behavior expected of cfmessagebox, and it works in
 Prototype 1.5.1.2. If Prototype 1.6 is used instead, the button value
 in the javascript callbackhandler is always the number 1, presumably
 indicating that a button was clicked.  Can cfmessagebox be used
 correctly with Prototype 1.6?

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