That's great to know!
Thanks for your tips, Geoff.

Cheers,
Jeffrey Ai


Geoff Callender-2 wrote:
> 
> Hi Jeffrey,
> 
> What you do is change the submits and the links to look the same,  
> which is not quite the same as the browser-generated button, but on  
> the plus-side they'll look the same in any browser.  This approach is  
> used in many commercial sites eg. banking sites.  One place that  
> describes button-styling is
> http://particletree.com/features/rediscovering-the-button-element/ 
>   .
> 
> eg. Here are 3 "buttons" on a UserEdit page:
> 
> <div class="buttons">
>       <input type="submit" value="Save"/>
>        Refresh 
>        Cancel 
> </div>
> 
> and here's some css to style them to look the same:
> 
> .buttons a, .buttons input { margin:0 7px 0 0; background- 
> color:#f5f5f5; border:1px solid #dedede; border-top:1px solid #eee;  
> border-left:1px solid #eee; font-family:"Lucida Grande", Tahoma,  
> Arial, Verdana, sans-serif; font-size:100%; line-height:130%; text- 
> decoration:none; font-weight:bold; color:#565656; cursor:pointer;  
> padding:5px 10px 6px 7px; /* Links and submits */ }
> .buttons input { width:auto; overflow:visible; padding:4px 10px 3px  
> 7px; /* IE6 */ }
> .buttons input[type] { padding:5px 10px 5px 7px; /* Firefox */ line- 
> height:17px; /* Safari */ }
> *:first-child+html input[type] { padding:4px 10px 3px 7px; /* IE7 */ }
> .buttons input img, .buttons a img { margin:0 3px -3px 0 !important;  
> padding:0; border:none; width:16px; height:16px; }
> 
> A fuller example is in the code of JumpStart.
> 
> Cheers,
> 
> Geoff
> http://files.doublenegative.com.au/jumpstart/
> 
> On 22/12/2007, at 4:40 AM, jeffrey ai wrote:
> 
>>
>> Geoff,
>>
>> I am not quite familiar with CSS.
>> I  think  ActionLink or PageLink could only be rendered to an Anchor  
>> Link.
>> I doubt CSS can change its look like to a button.
>>
>> Cheers,
>> Jeffrey Ai
>>
>>
>> Geoff Callender-2 wrote:
>>>
>>> Another technique is to use an ActionLink or PageLink for cancel and
>>> refresh functions.  To make the submit button and ActionLink share  
>>> the
>>> same styling use css.  I think Howard recommends this approach.
>>>
>>> Cheers,
>>> Geoff
>>>
>>> On 21/12/2007, at 4:37 AM, jeffrey ai wrote:
>>>
>>>>
>>>> Homburg,
>>>>
>>>> I noticed the same problem too. If  you have a normal cancel button
>>>> in a T5
>>>> form as your save button, a post request will  be sent back to the
>>>> page to
>>>> go through the validation method and even onSuccess() method.
>>>>
>>>> My solution to this problem is to create an ActionLinkButton
>>>> component. It's
>>>> almost the same with the ActionLink component, Instead of create a
>>>> normal
>>>> link, it creates a button link like below:
>>>>
>>>> <input type="button" value="cancel"
>>>> onclick="parent.location='/xxx/YOURPAGE.cancel'" id="cancel"/>
>>>>
>>>> In your page, you could have an onActionFromCancel() method to do
>>>> whatever
>>>> redirection you want.
>>>>
>>>> Cheers,
>>>> Jeffrey Ai
>>>>
>>>>
>>>>
>>>> Sven Homburg-2 wrote:
>>>>>
>>>>> hi there,
>>>>>
>>>>> who can me explain the best practice to cancel edit page?
>>>>>
>>>>> i have a save- and cancel button (both submit components)
>>>>> surrounded by
>>>>> a form component.
>>>>>
>>>>> if user press the cancel button, the edit form should make nothing
>>>>> than
>>>>> leave the page.
>>>>> without prepare, validation, etc
>>>>>
>>>>> is this possible?
>>>>>
>>>>> -- 
>>>>> best regards
>>>>> S.Homburg
>>>>>
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>>>
>>>>>
>>>>>
>>>>
>>>> -- 
>>>> View this message in context:
>>>> http://www.nabble.com/-T5--best-practice-to-cancel-edit-page-tp14427892p14441353.html
>>>> Sent from the Tapestry - User mailing list archive at Nabble.com.
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>>>
>>
>> -- 
>> View this message in context:
>> http://www.nabble.com/-T5--best-practice-to-cancel-edit-page-tp14427892p14459523.html
>> Sent from the Tapestry - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/-T5--best-practice-to-cancel-edit-page-tp14427892p14464072.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to