2009/10/29 Richard Quadling <[email protected]>: > 2009/10/29 Russell Keith <[email protected]>: >> Ok, maybe I’m just being dense, but I am reading the API for forms and I am >> getting nothing from it. >> >> >> >> What is proper use of the $F utility and what can it do for me? I have read >> the Form.Element.getValue and it means nothing to me. >> >> >> >> I have this form: >> >> >> >> <form name="createPDF" action="/pdf/pdf_process.php" method="POST"> >> >> <input type="hidden" name="A_NAME" value="John" /> >> >> <input type="hidden" name="APPLY_DATE" value="<?=date("m/d/Y")?>" /> >> >> <input type="hidden" name="A_BIRTH_DATE" value="01/01/01" /> >> >> <input type="hidden" name="L_NAME" value="Jane" /> >> >> <input type="hidden" name="L_BIRTH_DATE" value="01/01/01" /> >> >> <input type="hidden" name="A_ACCOUNT" value="111111111" /> >> >> </form> >> >> >> >> When I try to do alert($F(‘A_NAME’)); I get an ‘Object does not support this >> property or method’ error. I get the same error when I try to submit the >> form with ‘document.createPDF.submit();’ is there something wrong with my >> form? >> >> >> >> > > $F() returns the element. So, > > alert($F('A_ACCOIUNT').value); > > should be what you are looking for, > > -- > ----- > Richard Quadling > "Standing on the shoulders of some very clever giants!" > EE : http://www.experts-exchange.com/M_248814.html > Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731 > ZOPA : http://uk.zopa.com/member/RQuadling >
OOps. Completely wrong. The form elements do not have IDs, so you need to add them for $F() to work. http://api.prototypejs.org/dom/form/element.html#getvalue-class_method See that the parameter is an element. -- ----- Richard Quadling "Standing on the shoulders of some very clever giants!" EE : http://www.experts-exchange.com/M_248814.html Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731 ZOPA : http://uk.zopa.com/member/RQuadling --~--~---------~--~----~------------~-------~--~----~ 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 [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~----------~----~----~----~------~----~------~--~---
