Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
Contributor
zippygrill
Posts: 11
Registered: ‎01-05-2012
My Device: BlackBerry PlayBook

Load static html page based on the active tab.

Here is what im trying to do 

 

This is the file that loads the tabed html page.

 

------------------------

<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
<!--
* Copyright 2010-2011 Research In Motion Limited.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
-->
<html>
<head>
<meta name="viewport" content="initial-scale=1.0,user-scalable=no" />
<meta name="x-blackberry-defaultHoverEffect" content="false" />
<link rel="stylesheet" type="text/css" href="../../../css/styles_tab.css"><link />
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js"></script>

</head>

<body style="width: 98%;">

<div style="width: 1000px; margin: 0 auto 0 auto;">

<h1>Starea tehnica si controlul acesteia(30 min.)</h1>

<ul id="navigation">
<li class="one selected"><a href="#">#1</a></li>
<li class="two"><a href="#">#2</a></li>
<li class="three"><a href="#">#3</a></li>
<li class="four"><a href="#">#4</a></li>
<li class="five"><a href="#">#5</a></li>
<li class="shadow"></li>
</ul>

<div id="content">
<h2>In here should be the content</h2>

<ol>
<li>Based on the active tab(the tabs are static html content) here should be different content.<br /> Is it posibile to dinamicly load the content when pressed another tab?!</li>
</ol>

</div>

</div>
<script type="text/javascript">
$(document).ready(function(){
$("ul#navigation li a").click(function() {
$("ul#navigation li").removeClass("selected");
$(this).parents().addClass("selected");
return false;
});
});
</script>
</body>
</html>

------------------------------

 

Baseclly im trying to load different content(html page) when a tab is selected, for example #1 or #2 or doesnt matter which one.

Can anyone provide with a example or a link?!

Developer
SumiGhosh
Posts: 435
Registered: ‎09-20-2011
My Device: Z10 LE, Playbook, DevAlpha C, 9900, 9380

Re: Load static html page based on the active tab.

 

Just download the sample from here and check it. You have a pill buttons section in this sample app, just check it. 

 

 

https://github.com/blackberry/WebWorks-Samples/tree/master/UIExamples

Contributor
zippygrill
Posts: 11
Registered: ‎01-05-2012
My Device: BlackBerry PlayBook

Re: Load static html page based on the active tab.

thanks. i'll come back if any further questions :smileyhappy: