Could you post an example page?

Upon initial inspection... without delving too deep, I notice this:

Your references to the form elements are just that - not form element
values.

$('StateProvince') should be $('StateProvince').value or $F('StateProvince')
$('City') should be $('City').value or $F('City')

And anywhere you've used vanilla JS document.getElementById('') would be
better read as: $

document.getElementById = $




script: function (input_zip) { return ('http://cebsql05/
addressvalidation/default.aspx?city='+$('City')+'&state='+$<http://cebsql05/addressvalidation/default.aspx?city=%27+$%28%27City%27%29+%27&state=%27+$>
('StateProvince')+'&zip='+ input_zip); },
       callback: function (obj) {
           t = obj.value.split(',');
           document.getElementById('City').value = t
[0];
           document.getElementById('ZipPostal').value = obj.info;
           setSelectedState2(t[1].replace('
',''));
           document.getElementById('Country').focus()







On Fri, Jun 19, 2009 at 6:09 AM, vincejun <vince...@gmail.com> wrote:

>
> Hi guys,
>
> I have downloaded the newest prototype.js 1.6 version.
>
> I am using AJAX:
>
> I have used the prototype in my page lets say newpage1.asp and its
> working fine.
>
> but when i bind a new page shippingandbillinginfo.asp the prototype
> does not work.
>
> below code is inside my newpage1.asp
> function FindOldCustomerInfo(custid)    {
> var url = "ShippingandBillingInfo.asp";
>
>
> I was trying to capture the event focus on my second page
> (ShippingandBillingInfo.asp) but its not working, it only worked on my
> newpage1.asp
>
> I was trying to have this code work
>
> $('ZipPostal')
>    .observe('focus', respondToFocus2)
>    .observe('change', respondToChange2);
>
> function respondToChange2(event) {
>    var element = Event.element(event);
>    alert(element.value);
> }
>
> function respondToFocus2(event) {
>    var element = Event.element(event);
>    var options = {
>        script: function (input_zip) { return ('http://cebsql05/
> addressvalidation/default.aspx?city='+$('City')+'&state='+$<http://cebsql05/%0Aaddressvalidation/default.aspx?city=%27+$%28%27City%27%29+%27&state=%27+$>
> ('StateProvince')+'&zip='+ input_zip); },
>        callback: function (obj) {
>            t = obj.value.split(',');
>            document.getElementById('City').value = t
> [0];
>            document.getElementById('ZipPostal').value = obj.info;
>            setSelectedState2(t[1].replace('
> ',''));
>            document.getElementById('Country').focus()
>        }
>    };
>
>    document.getElementById('SubmitOrder').disabled = false;
>    var xml=new AutoComplete('ZipPostal',options);return true;
> }
>
> but it wont work on the page ShippingandBillinginfo.asp
>
> please advice on what I should do.
>
> Thanks.
>
> >
>

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

Reply via email to