-
1. Re: Neither s:link nor s:button giving correct results with onclick
sherkan777 Jun 26, 2009 9:47 AM (in response to daxxy)Hi,
Why do you want to use s:button if u can do all u want by<button...>
without changing your code, also with conversation support.
-
2. Re: Neither s:link nor s:button giving correct results with onclick
swd847 Jun 26, 2009 10:41 AM (in response to daxxy)what happens if you put a return false after your location.href?
-
3. Re: Neither s:link nor s:button giving correct results with onclick
daxxy Jun 26, 2009 5:48 PM (in response to daxxy)Why don't I just use the button tag? Um, I guess because I wanted the button to be styled like the other buttons and I didn't know how to do it otherwise. However, I really cannot get anything else to work so I guess I'm going to have to figure out how to style it to look like the others.
I added return false after my location.href and still it did not work. The button tag also did not work with it.
I just realized I forgot to include in my original posting the code I tried. I must have deleted it accidentally.
Here it is FWIW:
<button onclick="location.href='http://smc.ba.ssa.gov'" type="button" >SMC</button> <s:button value="SMC" onclick="location.href='http://smc.ba.ssa.gov'" /> <s:link value="SMC" onclick="location.href='http://smc.ba.ssa.gov'" />
-
4. Re: Neither s:link nor s:button giving correct results with onclick
daxxy Jun 26, 2009 5:57 PM (in response to daxxy)I realized I needed conditional rendering so here is what I finally decided on:
<h:outputLink rendered="#{_device.smc}"
value="http://smc.ba.ssa.gov">
<button type="button">SMC</button>
</h:outputLink>I still need to figure out how to style the button to look like a richfaces component.