hi,
i have the following function which is not working for me:
function uploadimg (theform,ajaxAction,ajaxTarget){
var imgDesc = theform.getInputs('page1', 'text','imgDesc');
alert(imgDesc[0]);
defaultAction=theform.action;
defaultTarget=theform.target;
theform.action=ajaxAction;
theform.target=ajaxTarget;
theform.submit(); //Submit the form.
//Then display a loading message to the user.
setStatus ("Please wait while your image uploads...","showimg");
theform.action=defaultAction;
theform.target=defaultTarget;
}
the problem i'm having is that I can't access the value of the image
description field in my form which looks like:
<input type="text" name="imgDesc" size="40"/>
the alert above displays 'undefined' or is just blank if i do
alert(imgDesc);
can anyone see what i'm doing wrong?
thanks,
Luke
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---