[Newbies] adding protogrowl to a submit button and anchor

Riaan van Aarde - Specon Eng riaan at specon.co.za
Mon Oct 13 13:55:02 UTC 2008


Below is my code.  

On the button submit and the cancel anchor I want to add a protoGrowl for
eg. "Any changes to this form  will be submitted" or on the cancel anchor
"Changes will be cancelled".

Like this : <script language="javascript">
  		new protoGrowl({type: 'info', title: 'PLEASE NOTE', message:
'Any changes to this form  will be submitted '});
		</script>

How would I alter that above to work.  The Protogrowl Lib is already called.
Its just to add the protoGrowl message.

renderScheduleTrainingOn: html 
	self person ifNil: [
		html break.
		html unorderedList class: 'errors'; with:[html listItem:
'Please make sure that you select a Business, Department and a Person for
this search.']].
	self person ifNotNil: 
		[ html heading: person.
		html table
			class: 'scheduleList';
			with: 
				[ self renderScheduleTrainingTableHeaderOn:
html.
				self filteredTraining do: 
					[ :each | 
					self 
						renderScheduleFor: each
						on: html ].
				html tableRow
					class: 'trainingViewsSubmitButton';
					with: 
						[ html tableData
							colSpan: 11;
							with:[ html span
	
class: 'button';
	
title: 'Submit';
	
with: 
	
[ html submitButton
	
callback: [ self answer: true ];
	
confirm: 'Any changes to this form will be submitted. Are you sure you wish
to continue?';
	

	
text: 'Submit' ].
	
html text: ' or '.
								html anchor
class: 'button';
	
callback: [self answer: false];
	
confirm: 'Any changes to this form will be cancelled. Are you sure you wish
to continue?';
	
with: 
	
[ html span: 'Cancel' ] ] ] ] ]
								
								
								"confirm:
'You are about to schedule training for a person,  Click OK to confirm.'.
				html text: ' or '.
			html anchor callback: [self answer: false];
			    			
		with: [html image url: '/images/Images/ButtonCancel.gif';
altText: 'cancel'"



More information about the Beginners mailing list