Sometimes you don't necessarily want it to submit the page when you click on a tab, so I was having a think about options to override the functionality.
I found an interesting discussion here on OTN, but I came up with something else involving On Demand processes. I'm still deciding whether it's an overkill for my situation, but I thought I'd post it as it may help someone else one day.
The solution involved :
- Current tab page template
- Script on page zero
- On-demand page process
<td class="t9tabCurrent"> <a href="#TAB_LINK#" class="t9tabCurrent">#TAB_LABEL#</a> #TAB_INLINE_EDIT# </td>I modified it to:
This calls a script I defined on page zero, passing through the original #TAB_LINK# code.
My on demand process just encapsulates the code, so it's a call to a package I have defined. The g_x01 variable is the value I added in the AJAX call :
This function definition simply replicates existing behaviour, but without the page submit.
You could extend this to do whatever you like, depending on which tab has been pressed. I know in the past I've considered wanting to pass parameters on tab press...
Hopefully all the code is displayed ok, I'm having trouble finding an easy way to paste html examples into blogspot. I'm happy for any suggestions on that matter...
So, is anyone still working or reading blogs right now, or am I one of few? ;-)