>
> <html>
> <head>
> <script src="scripts/jquery.js"
> type="text/javascript"></script>
> <script type="text/javascript" charset="utf-8">
> $(document).ready(function() {
>   $('#submit-member').click(function() {
>     var username = $(this).prev().val();
>     $("#member_info").html(username);
>     return false;
>   });
>
> });
>
> </script>
> </head>


Ok, I'm looking at this. I moved the js into a seperate file. I am
calling the function OK when the button is clicked. But something
seems wrong with

var username = $(this).prev().val();

which is ending up as undef.

I don't actually understand this line - how is it getting the value
out of the form? "this" seems to be the button itself.

I also tried something like

var username = $("#username").val();

to try to select the text box directly and get the value, but no joy either.

thanks again ... gonna sleep now :-)

-- 
Daniel McBrearty
email : danielmcbrearty at gmail.com
www.engoi.com : the multi - language vocab trainer
BTW : 0873928131

_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

Reply via email to