on 2004 Mar 09 11:24 AM
Hello,
I am using the HTMLB tabstrip tag in a jsp file. I would like to implement a functionality whereby when a user clicks on a tab, it doesnt reload the contents in the tab. Right now, when i put the onselect code in the tabstrip, it surely reloads the page again. And if i dont put the onselect code then i cant switch to another tab. Catch 22.
Is there a way to avoid this reload but instead just display the clicked tab contents as it was before the user switched over.
Thanks,
Sunil
There doesn't seem to be a javascript event handler on it so I don't think it is possible in any easy way.
A possible (and horribly complex) is to
1. find the id of the element
2. in a javascript method that runs after the page is loaded travers the DOM tree and set a onClick event on the element which you found the id for in 1. This onClick event calls a js method which returns false (which I think cancels out any HTML "events" on the same click( such as reloading))
Otherwise you need to write a new tabstrib element.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
sorry, I haven't got any code (and it would take too long to build) but I could outline what it think would work. And actually the code doesn't look that complex at all
First find the real htmlb id (should be some tutorials on this.
<script><!Place at bottom of page>
function funcTabStripClientClick() {
return false;
}
var tabStripElement = document.getElementById("<htmlbelementid>");
tabStripElement .setAttribute("onClick","funcTabStripClientClick();");
</script>
References: http://developer.apple.com/internet/webcontent/dom2ii.html
User | Count |
---|---|
66 | |
10 | |
10 | |
10 | |
10 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.