Sunday, October 24, 2010

Pass a pure html input value to controller

I have this code
Controller:
<pre>
function cloneSurvey($surveyId,$newName=null)
{

$newsurvey = $this->Survey->cloneSurvey($surveyId,$newName,
0);

}
</pre>

View:
<pre>
<div class="actions">
<h3><?php __('Actions'); ?></h3>
<ul>
<li>New name:</li><li><input type="text" name="fname"
id="newName" /></li>
<li><?php echo $this->Html->link(__('Clone this
survey', true), array('action' => 'cloneSurvey',$survey['Survey']
['id'],document.getelementbyid(newName'').value)); ?></li>
</ul>

</div>
</pre>

How can I use document.getelementbyid(newName'').value to be used as a
parameter.

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate