velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From i...@utm.utoronto.ca
Subject parsing a page after a button is clicked
Date Fri, 22 Jul 2005 05:04:36 GMT
I am a newbie so i apologize for any stupidity on my part.
Basically, this is my scenario:
I have a vm file with a tr with some velocity statements, call it tr1...and it 
also contains some  HTMl.
then, in a separte vm file, the user is to click a button, then tr1 will show, 
with the appropriate things happening based on the logic. my understanding of 
the limitations of velocity may not be the best, but i know you cannot execute 
a #parse statement within a script.  
I have tried several things, none of which give the desired result...either 
end up showing the row prematurely or not at all. 
I would appreciate any suggestions or any suggested readings..i have read the 
velocity user guide with no results.
this is the actual code:

vm file #1...this is the first page

<tr id="tr2"  >
  <td>

<form name="navBarStart">
<input name="start" type="button" value="START"  style='width: 80px;'
OnClick=	"
	hideElement('tr2');
	showElement('tr1');">
</form>
</td>
	
</tr>
</table>
</td>
 </tr>
</table>
 </td>
</tr>


after i click the button, i should show this:





<TR>
<TD>
 ##=============== SET UP QUESTION FORM ================#
 #set($setLink = $link.setAction("Delivery")) 
 #set($setLink = $setLink.setScreen("student,Deliver")) 
 #set($setLink = $setLink.setPage("student,Deliver.vm")) 
 <FORM name="Response" action="$setLink" method="get" autocomplete="off">
	
  <tr class="tr1" id="tr1" align="center">
 #parse("navigations/deliverBits/questionIntro.vm")		    
    #if($thisQuestion.getQuestiontype().hasInsQuesGap())
	#parse("navigations/deliverBits/navBars/navBarInstructions.vm")
    #else
	#parse("navigations/deliverBits/startQuestion.vm")
</form>

  #end
</table>
				
</td>
 </tr>	



---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org


Mime
View raw message