
tallmik
Posts: 23
|
| Posted: 10/19/2008, 6:23 PM |
|
Hi all...
I'm confused...
I have a page (in ccs4.1x latest). on the page, i have an update panel.
In the update panel, i have a list of <a></a>'s as my navigation menu, following that, a bunch of tabbed views that the navigation menu points at (<li><a href='?page=home'>Home</a>).
The idea here is that clicking on a link, changes what tabbed view is visible (in the "before show" action, i only turn on visibility for the tabbed view i want, based on the url parameter (home, account, about, whatever)),. so far... so good... the update panel does it's thing... and pages change without a refresh. I'm delighted. degrades nicely if javascript is turned off.
the issue tho, is that if a page in this thing has a form, along with the expected submit button, pressing the submit button does nothing... something seems to be swallowing the event.
Now... if i turn the update panel off (or just disable javascript in my brouser), things are back to working ok.
obviously i'd love to have the spiffy coolness of ajax in my app... any suggestions as to how to get this to work?
<body>
<div id="header">
{incLogo} {DateTime}
</div>
<!-- BEGIN Panel Panel6 --> Note... this is an update panel
<div id="content">
<div id="tabsF">
<ul>
<li {Tab0}><a href="?page=home"><span>Home</span></a></li>
<li {Tab1}><a href="?page=what"><span>What</span></a></li>
<li {Tab2}><a href="?page=make"><span>Make</span></a></li>
<li {Tab3}><a href="?page=mobile"><span>Mobile</span></a></li>
<li {Tab4}><a href="?page=account"><span>Account</span></a></li>
</ul>
</div>
<div class="innercontent">
<!-- BEGIN Panel Panel1 -->{incHome}<!-- END Panel Panel1 --> these are tabbed views
<!-- BEGIN Panel Panel2 -->{incWhatAre}<!-- END Panel Panel2 -->
<!-- BEGIN Panel Panel3 -->{incQR}<!-- END Panel Panel3 -->
<!-- BEGIN Panel Panel4 -->{incAbout}<!-- END Panel Panel4 -->
<!-- BEGIN Panel Panel5 -->{incAccount}<!-- END Panel Panel5 -->
<!-- END Panel Panel6 -->
</div>
</div>
<div id="footer">
{incFooter}
</div>
</body>
The before show event does this...
function Page_BeforeShow(& $sender)
{
----snip-----
$Component->Tab0->SetValue('');
$Component->Tab1->SetValue('');
$Component->Tab2->SetValue('');
$Component->Tab3->SetValue('');
$Component->Tab4->SetValue('');
$Page = CCGetFromGet("page","home");
switch ($Page)
{
case "home":
$Component->Panel1->Visible = True;
$Component->Tab0->SetValue('id="current"');
break;
case "what":
$Component->Panel2->Visible = True;
$Component->Tab1->SetValue('id="current"');
break;
case "make":
$Component->Panel3->Visible = True;
$Component->Tab2->SetValue('id="current"');
break;
case "mobile":
$Component->Panel4->Visible = True;
$Component->Tab3->SetValue('id="current"');
break;
case "account":
$Component->Panel5->Visible = True;
$Component->Tab4->SetValue('id="current"');
break;
default:
$Component->Panel1->Visible = True;
$Component->Tab0->SetValue('id="current"');
}
In this instance, incQR includable page has a form that you fill in... I'd like the browser to head off to the page in my action specifier, but as i said... with javascript enabled, the submit does not seem to fire.
<form name="inputform" method="get" action="QrImage.php" id="inputform">
<h3>Data to be encoded</h3>
<input name="Data" type="text" size="80" value="" /><br />
<input type="submit" value="send" />
<input type="reset" />
</form>
So... Any ideas as to how to get a tabbed view contained form, to acknowledge the submit and go to the page i'd like?
Thanks!
Michael
|
 |
 |
materix
Posts: 161
|
| Posted: 10/21/2008, 12:59 PM |
|
Hi.
Have you tried to place the update panel inside each tab instead?
|
 |
 |
tallmik
Posts: 23
|
| Posted: 10/21/2008, 1:32 PM |
|
Hello;
No, I've not tried that... will give that a try. I'm a bit confused tho... doesn't the update panel only do updates between entities inside it? Would a separate one for each tab not defeat the purpose then?
I should have some time this PM to have a go at that.
Michael
|
 |
 |
|

|
|
|
|