Problem with ajax call on Orbeon.

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Problem with ajax call on Orbeon.

Rohit Mani Tripathi
<html>
<head>
<script >
var request;
var request1;
function convertToXML(){
	var uid = document.getElementById("uid").value;
	var url = "servlet1?uid=" +uid;
	
 if(window.XMLHttpRequest){
		request = new XMLHttpRequest();
		
	} else if (window.ActiveXObject){
	    request = new ActiveXObject("Msxml2.XMLHTTP");
           request1 = new ActiveXObject("Microsoft.XMLHTTP");    
      }
	
		request.open("post",url,true);
	request.onreadystatechange = callback;
	request.send(null);
	
}

function callback() {
	if(request.readyState == 4){
		if(request.status == 200){
				//nonMSPopulate();
			
		}
	}
}

function nonMSPopulate(){
	var response = request.responseText;
	var xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
	xmlDoc.async = "false";
	xmlDoc.loadXML(response);
	bin = xmlDoc.getElementsByTagName("binary");
	var uname = document.getElementById("uname");
	alert("bin[0].firstChild.data"+bin[0].firstChild.data);
	if(bin[0].firstChild.data != "null"){
	uname.value =  bin[0].firstChild.data;
	
	}else{
	
		uname.value="";
	}
	 oct = xmlDoc.getElementsByTagName("octal").value;
	var uvalue = document.getElementById("uvalue");
	if(oct[0].firstChild.data != "null"){
	uvalue.value=oct[0].firstChild.data;
	}else {
		uvalue.value="";
	
	}
}


</script>
</head>
<body>



<input type="text" name="uid" id="uid" onkeyup="convertToXML(this.value);"/>
<input type="text" name="uname"/>
<input type="text" name="uvalue"/>



</body>

</html>





This is a xhtml page running on orbeon,i am not able to call ajaxcall in IE,if i try with mozilla request object is creating but i post is not working and is not calling the servlet
problem with orbeon forms .

i know many people would have been used this feature , so an urgent reply is needed. thanks in advance .. :) :)



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Problem with ajax call on Orbeon.

Rohit Mani Tripathi
Is it require to configure our web.xml?

On Thu, Feb 16, 2012 at 1:47 PM, Rohit Mani Tripathi <[hidden email]> wrote:
<html>
<head>
<script >
var request;
var request1;
function convertToXML(){
	var uid = document.getElementById("uid").value;
	var url = "servlet1?uid=" +uid;
	
 if(window.XMLHttpRequest){
		request = new XMLHttpRequest();
		
	} else if (window.ActiveXObject){
	    request = new ActiveXObject("Msxml2.XMLHTTP");
           request1 = new ActiveXObject("Microsoft.XMLHTTP");    
      }
	
		request.open("post",url,true);
	request.onreadystatechange = callback;
	request.send(null);
	
}

function callback() {
	if(request.readyState == 4){
		if(request.status == 200){
				//nonMSPopulate();
			
		}
	}
}

function nonMSPopulate(){
	var response = request.responseText;
	var xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
	xmlDoc.async = "false";
	xmlDoc.loadXML(response);
	bin = xmlDoc.getElementsByTagName("binary");
	var uname = document.getElementById("uname");
	alert("bin[0].firstChild.data"+bin[0].firstChild.data);
	if(bin[0].firstChild.data != "null"){
	uname.value =  bin[0].firstChild.data;
	
	}else{
	
		uname.value="";
	}
	 oct = xmlDoc.getElementsByTagName("octal").value;
	var uvalue = document.getElementById("uvalue");
	if(oct[0].firstChild.data != "null"){
	uvalue.value=oct[0].firstChild.data;
	}else {
		uvalue.value="";
	
	}
}


</script>
</head>
<body>



<input type="text" name="uid" id="uid" onkeyup="convertToXML(this.value);"/>
<input type="text" name="uname"/>
<input type="text" name="uvalue"/>



</body>

</html>





This is a xhtml page running on orbeon,i am not able to call ajaxcall in IE,if i try with mozilla request object is creating but i post is not working and is not calling the servlet
problem with orbeon forms .

i know many people would have been used this feature , so an urgent reply is needed. thanks in advance .. :) :)




--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Re: Problem with ajax call on Orbeon.

Erik Bruchez
Administrator
Rohit,

This doesn't look particularly like an Orbeon Forms-related page.

This said I wouldn't use XMLHTTP and the likes "by hand", as it's
error prone and not necessarily cross-browser. Use a library, like YUI
(which Orbeon uses) or jQuery.

-Erik

On Thu, Feb 16, 2012 at 12:21 AM, Rohit Mani Tripathi
<[hidden email]> wrote:

> Is it require to configure our web.xml?
>
>
> On Thu, Feb 16, 2012 at 1:47 PM, Rohit Mani Tripathi
> <[hidden email]> wrote:
>>
>> <html>
>> <head>
>> <script >
>> var request;
>> var request1;
>> function convertToXML(){
>> var uid = document.getElementById("uid").value;
>> var url = "servlet1?uid=" +uid;
>>
>>  if(window.XMLHttpRequest){
>> request = new XMLHttpRequest();
>>
>> } else if (window.ActiveXObject){
>>    request = new ActiveXObject("Msxml2.XMLHTTP");
>>            request1 = new ActiveXObject("Microsoft.XMLHTTP");
>>       }
>>
>> request.open("post",url,true);
>> request.onreadystatechange = callback;
>> request.send(null);
>>
>> }
>>
>> function callback() {
>> if(request.readyState == 4){
>> if(request.status == 200){
>> //nonMSPopulate();
>>
>> }
>> }
>> }
>>
>> function nonMSPopulate(){
>> var response = request.responseText;
>> var xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
>> xmlDoc.async = "false";
>> xmlDoc.loadXML(response);
>> bin = xmlDoc.getElementsByTagName("binary");
>> var uname = document.getElementById("uname");
>> alert("bin[0].firstChild.data"+bin[0].firstChild.data);
>> if(bin[0].firstChild.data != "null"){
>> uname.value =  bin[0].firstChild.data;
>>
>> }else{
>>
>> uname.value="";
>> }
>> oct = xmlDoc.getElementsByTagName("octal").value;
>> var uvalue = document.getElementById("uvalue");
>> if(oct[0].firstChild.data != "null"){
>> uvalue.value=oct[0].firstChild.data;
>> }else {
>> uvalue.value="";
>>
>> }
>> }
>>
>>
>> </script>
>> </head>
>> <body>
>>
>>
>>
>> <input type="text" name="uid" id="uid"
>> onkeyup="convertToXML(this.value);"/>
>> <input type="text" name="uname"/>
>> <input type="text" name="uvalue"/>
>>
>>
>>
>> </body>
>>
>> </html>
>>
>>
>>
>>
>>
>> This is a xhtml page running on orbeon,i am not able to call ajaxcall in
>> IE,if i try with mozilla request object is creating but i post is not
>> working and is not calling the servlet
>>
>>
>> problem with orbeon forms .
>>
>> i know many people would have been used this feature , so an urgent reply
>> is needed.  thanks in advance ..    :)  :)
>>
>
>
>
> --
> You receive this message as a subscriber of the [hidden email] mailing
> list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> OW2 mailing lists service home page: http://www.ow2.org/wws
>


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: Problem with ajax call on Orbeon.

Rohit Mani Tripathi
thanks Erik, but now i am able to do it.

But now i am facing another problem with the dynamic drop down list, could you suggest me about this. like i want to achieve the situation where,, if change in selection in one drop down list it should reflect change of item set in second drop down.. i need a quick reply please.. thanks in advance


On Sat, Feb 18, 2012 at 11:27 AM, Erik Bruchez <[hidden email]> wrote:
Rohit,

This doesn't look particularly like an Orbeon Forms-related page.

This said I wouldn't use XMLHTTP and the likes "by hand", as it's
error prone and not necessarily cross-browser. Use a library, like YUI
(which Orbeon uses) or jQuery.

-Erik

On Thu, Feb 16, 2012 at 12:21 AM, Rohit Mani Tripathi
<[hidden email]> wrote:
> Is it require to configure our web.xml?
>
>
> On Thu, Feb 16, 2012 at 1:47 PM, Rohit Mani Tripathi
> <[hidden email]> wrote:
>>
>> <html>
>> <head>
>> <script >
>> var request;
>> var request1;
>> function convertToXML(){
>>      var uid = document.getElementById("uid").value;
>>      var url = "servlet1?uid=" +uid;
>>
>>  if(window.XMLHttpRequest){
>>              request = new XMLHttpRequest();
>>
>>      } else if (window.ActiveXObject){
>>          request = new ActiveXObject("Msxml2.XMLHTTP");
>>            request1 = new ActiveXObject("Microsoft.XMLHTTP");
>>       }
>>
>>              request.open("post",url,true);
>>      request.onreadystatechange = callback;
>>      request.send(null);
>>
>> }
>>
>> function callback() {
>>      if(request.readyState == 4){
>>              if(request.status == 200){
>>                              //nonMSPopulate();
>>
>>              }
>>      }
>> }
>>
>> function nonMSPopulate(){
>>      var response = request.responseText;
>>      var xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
>>      xmlDoc.async = "false";
>>      xmlDoc.loadXML(response);
>>      bin = xmlDoc.getElementsByTagName("binary");
>>      var uname = document.getElementById("uname");
>>      alert("bin[0].firstChild.data"+bin[0].firstChild.data);
>>      if(bin[0].firstChild.data != "null"){
>>      uname.value =  bin[0].firstChild.data;
>>
>>      }else{
>>
>>              uname.value="";
>>      }
>>       oct = xmlDoc.getElementsByTagName("octal").value;
>>      var uvalue = document.getElementById("uvalue");
>>      if(oct[0].firstChild.data != "null"){
>>      uvalue.value=oct[0].firstChild.data;
>>      }else {
>>              uvalue.value="";
>>
>>      }
>> }
>>
>>
>> </script>
>> </head>
>> <body>
>>
>>
>>
>> <input type="text" name="uid" id="uid"
>> onkeyup="convertToXML(this.value);"/>
>> <input type="text" name="uname"/>
>> <input type="text" name="uvalue"/>
>>
>>
>>
>> </body>
>>
>> </html>
>>
>>
>>
>>
>>
>> This is a xhtml page running on orbeon,i am not able to call ajaxcall in
>> IE,if i try with mozilla request object is creating but i post is not
>> working and is not calling the servlet
>>
>>
>> problem with orbeon forms .
>>
>> i know many people would have been used this feature , so an urgent reply
>> is needed.  thanks in advance ..    :)  :)
>>
>
>
>
> --
> You receive this message as a subscriber of the [hidden email] mailing
> list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> OW2 mailing lists service home page: http://www.ow2.org/wws
>


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws




--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: Re: Problem with ajax call on Orbeon.

Erik Bruchez
Administrator
Rohit,

We have an example using the Data-bound Select1:

http://wiki.orbeon.com/forms/doc/developer-guide/xbl-components/databound-select1

-Erik

On Mon, Feb 20, 2012 at 4:07 AM, Rohit Mani Tripathi
<[hidden email]> wrote:

> thanks Erik, but now i am able to do it.
>
> But now i am facing another problem with the dynamic drop down list, could
> you suggest me about this. like i want to achieve the situation where,, if
> change in selection in one drop down list it should reflect change of item
> set in second drop down.. i need a quick reply please.. thanks in advance
>
>
> On Sat, Feb 18, 2012 at 11:27 AM, Erik Bruchez <[hidden email]> wrote:
>>
>> Rohit,
>>
>> This doesn't look particularly like an Orbeon Forms-related page.
>>
>> This said I wouldn't use XMLHTTP and the likes "by hand", as it's
>> error prone and not necessarily cross-browser. Use a library, like YUI
>> (which Orbeon uses) or jQuery.
>>
>> -Erik
>>
>> On Thu, Feb 16, 2012 at 12:21 AM, Rohit Mani Tripathi
>> <[hidden email]> wrote:
>> > Is it require to configure our web.xml?
>> >
>> >
>> > On Thu, Feb 16, 2012 at 1:47 PM, Rohit Mani Tripathi
>> > <[hidden email]> wrote:
>> >>
>> >> <html>
>> >> <head>
>> >> <script >
>> >> var request;
>> >> var request1;
>> >> function convertToXML(){
>> >>      var uid = document.getElementById("uid").value;
>> >>      var url = "servlet1?uid=" +uid;
>> >>
>> >>  if(window.XMLHttpRequest){
>> >>              request = new XMLHttpRequest();
>> >>
>> >>      } else if (window.ActiveXObject){
>> >>          request = new ActiveXObject("Msxml2.XMLHTTP");
>> >>            request1 = new ActiveXObject("Microsoft.XMLHTTP");
>> >>       }
>> >>
>> >>              request.open("post",url,true);
>> >>      request.onreadystatechange = callback;
>> >>      request.send(null);
>> >>
>> >> }
>> >>
>> >> function callback() {
>> >>      if(request.readyState == 4){
>> >>              if(request.status == 200){
>> >>                              //nonMSPopulate();
>> >>
>> >>              }
>> >>      }
>> >> }
>> >>
>> >> function nonMSPopulate(){
>> >>      var response = request.responseText;
>> >>      var xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
>> >>      xmlDoc.async = "false";
>> >>      xmlDoc.loadXML(response);
>> >>      bin = xmlDoc.getElementsByTagName("binary");
>> >>      var uname = document.getElementById("uname");
>> >>      alert("bin[0].firstChild.data"+bin[0].firstChild.data);
>> >>      if(bin[0].firstChild.data != "null"){
>> >>      uname.value =  bin[0].firstChild.data;
>> >>
>> >>      }else{
>> >>
>> >>              uname.value="";
>> >>      }
>> >>       oct = xmlDoc.getElementsByTagName("octal").value;
>> >>      var uvalue = document.getElementById("uvalue");
>> >>      if(oct[0].firstChild.data != "null"){
>> >>      uvalue.value=oct[0].firstChild.data;
>> >>      }else {
>> >>              uvalue.value="";
>> >>
>> >>      }
>> >> }
>> >>
>> >>
>> >> </script>
>> >> </head>
>> >> <body>
>> >>
>> >>
>> >>
>> >> <input type="text" name="uid" id="uid"
>> >> onkeyup="convertToXML(this.value);"/>
>> >> <input type="text" name="uname"/>
>> >> <input type="text" name="uvalue"/>
>> >>
>> >>
>> >>
>> >> </body>
>> >>
>> >> </html>
>> >>
>> >>
>> >>
>> >>
>> >>
>> >> This is a xhtml page running on orbeon,i am not able to call ajaxcall
>> >> in
>> >> IE,if i try with mozilla request object is creating but i post is not
>> >> working and is not calling the servlet
>> >>
>> >>
>> >> problem with orbeon forms .
>> >>
>> >> i know many people would have been used this feature , so an urgent
>> >> reply
>> >> is needed.  thanks in advance ..    :)  :)
>> >>
>> >
>> >
>> >
>> > --
>> > You receive this message as a subscriber of the [hidden email]
>> > mailing
>> > list.
>> > To unsubscribe: mailto:[hidden email]
>> > For general help: mailto:[hidden email]?subject=help
>> > OW2 mailing lists service home page: http://www.ow2.org/wws
>> >
>>
>>
>> --
>> You receive this message as a subscriber of the [hidden email] mailing
>> list.
>> To unsubscribe: mailto:[hidden email]
>> For general help: mailto:[hidden email]?subject=help
>> OW2 mailing lists service home page: http://www.ow2.org/wws
>>
>
>
>
> --
> You receive this message as a subscriber of the [hidden email] mailing
> list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> OW2 mailing lists service home page: http://www.ow2.org/wws
>


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: Re: Re: Problem with ajax call on Orbeon.

Rohit Mani Tripathi
thanks Erik, thanks very much..that helps me

On Wed, Feb 22, 2012 at 3:37 AM, Erik Bruchez <[hidden email]> wrote:
Rohit,

We have an example using the Data-bound Select1:

http://wiki.orbeon.com/forms/doc/developer-guide/xbl-components/databound-select1

-Erik

On Mon, Feb 20, 2012 at 4:07 AM, Rohit Mani Tripathi
<[hidden email]> wrote:
> thanks Erik, but now i am able to do it.
>
> But now i am facing another problem with the dynamic drop down list, could
> you suggest me about this. like i want to achieve the situation where,, if
> change in selection in one drop down list it should reflect change of item
> set in second drop down.. i need a quick reply please.. thanks in advance
>
>
> On Sat, Feb 18, 2012 at 11:27 AM, Erik Bruchez <[hidden email]> wrote:
>>
>> Rohit,
>>
>> This doesn't look particularly like an Orbeon Forms-related page.
>>
>> This said I wouldn't use XMLHTTP and the likes "by hand", as it's
>> error prone and not necessarily cross-browser. Use a library, like YUI
>> (which Orbeon uses) or jQuery.
>>
>> -Erik
>>
>> On Thu, Feb 16, 2012 at 12:21 AM, Rohit Mani Tripathi
>> <[hidden email]> wrote:
>> > Is it require to configure our web.xml?
>> >
>> >
>> > On Thu, Feb 16, 2012 at 1:47 PM, Rohit Mani Tripathi
>> > <[hidden email]> wrote:
>> >>
>> >> <html>
>> >> <head>
>> >> <script >
>> >> var request;
>> >> var request1;
>> >> function convertToXML(){
>> >>      var uid = document.getElementById("uid").value;
>> >>      var url = "servlet1?uid=" +uid;
>> >>
>> >>  if(window.XMLHttpRequest){
>> >>              request = new XMLHttpRequest();
>> >>
>> >>      } else if (window.ActiveXObject){
>> >>          request = new ActiveXObject("Msxml2.XMLHTTP");
>> >>            request1 = new ActiveXObject("Microsoft.XMLHTTP");
>> >>       }
>> >>
>> >>              request.open("post",url,true);
>> >>      request.onreadystatechange = callback;
>> >>      request.send(null);
>> >>
>> >> }
>> >>
>> >> function callback() {
>> >>      if(request.readyState == 4){
>> >>              if(request.status == 200){
>> >>                              //nonMSPopulate();
>> >>
>> >>              }
>> >>      }
>> >> }
>> >>
>> >> function nonMSPopulate(){
>> >>      var response = request.responseText;
>> >>      var xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
>> >>      xmlDoc.async = "false";
>> >>      xmlDoc.loadXML(response);
>> >>      bin = xmlDoc.getElementsByTagName("binary");
>> >>      var uname = document.getElementById("uname");
>> >>      alert("bin[0].firstChild.data"+bin[0].firstChild.data);
>> >>      if(bin[0].firstChild.data != "null"){
>> >>      uname.value =  bin[0].firstChild.data;
>> >>
>> >>      }else{
>> >>
>> >>              uname.value="";
>> >>      }
>> >>       oct = xmlDoc.getElementsByTagName("octal").value;
>> >>      var uvalue = document.getElementById("uvalue");
>> >>      if(oct[0].firstChild.data != "null"){
>> >>      uvalue.value=oct[0].firstChild.data;
>> >>      }else {
>> >>              uvalue.value="";
>> >>
>> >>      }
>> >> }
>> >>
>> >>
>> >> </script>
>> >> </head>
>> >> <body>
>> >>
>> >>
>> >>
>> >> <input type="text" name="uid" id="uid"
>> >> onkeyup="convertToXML(this.value);"/>
>> >> <input type="text" name="uname"/>
>> >> <input type="text" name="uvalue"/>
>> >>
>> >>
>> >>
>> >> </body>
>> >>
>> >> </html>
>> >>
>> >>
>> >>
>> >>
>> >>
>> >> This is a xhtml page running on orbeon,i am not able to call ajaxcall
>> >> in
>> >> IE,if i try with mozilla request object is creating but i post is not
>> >> working and is not calling the servlet
>> >>
>> >>
>> >> problem with orbeon forms .
>> >>
>> >> i know many people would have been used this feature , so an urgent
>> >> reply
>> >> is needed.  thanks in advance ..    :)  :)
>> >>
>> >
>> >
>> >
>> > --
>> > You receive this message as a subscriber of the [hidden email]
>> > mailing
>> > list.
>> > To unsubscribe: mailto:[hidden email]
>> > For general help: mailto:[hidden email]?subject=help
>> > OW2 mailing lists service home page: http://www.ow2.org/wws
>> >
>>
>>
>> --
>> You receive this message as a subscriber of the [hidden email] mailing
>> list.
>> To unsubscribe: mailto:[hidden email]
>> For general help: mailto:[hidden email]?subject=help
>> OW2 mailing lists service home page: http://www.ow2.org/wws
>>
>
>
>
> --
> You receive this message as a subscriber of the [hidden email] mailing
> list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> OW2 mailing lists service home page: http://www.ow2.org/wws
>


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws




--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws