in reply to Re^3: copying perl array to javascript array
in thread copying perl array to javascript array

Greetings Monks, Sorry for the late response. I was away so cudnt post earlier.
I'm still having the same old problem in which the html code gets appended to the drop down options. You can see the live form at http://tigger.uic.edu/htbin/survey-send.pl
Try selecting an option from the CourseDept dropdown and the CourseName combobox will be dynamically populated. Check out the last option in the Coursename drop down menu. It has the html course appended to it. Also when you change the CourseDept option the CourseName combo box shows some of the old options aswell. This was not happening before. It started happening only after i started using Sajax.
I'm new to web stuff esp. perl and using perl javascript together is giving me problems.
Can you please help?
Thanks
  • Comment on Re^4: copying perl array to javascript array

Replies are listed 'Best First'.
Re^5: copying perl array to javascript array
by Joost (Canon) on Aug 09, 2005 at 22:23 UTC
    I've tried that link, but the javascript code didn't work for me - I get a scrambled dropdown box in CourseName.

    My general solution is to get the code to work *without* javascript first (i.e. use request/response type reloading), and when you've done that, try to improve on it with AJAX technologies - and if you can't get it to work on a specific browser, fall back to the level you *know* that works.

    I'm biased because a) I've been using linux since 1999 or something, so the most "popular" browser isn't available to me. b) I've designed a few websites for government agencies that required the web accessibility guidelines (priority one).

    By the way, XMLHttpRequest code isn't all that difficult if you know how to do javascript. I believe this article from apple is good introduction. You'll be able to write your own code (with a little experimentation).

    Also, you could take a look at HTML-Prototype: it's a browser-agnostic, reasonably well documented library for perl, that should take care of most of your problems.