Home Search Member List Faq Register Login  
UltimateTabstrip
Re: specifying form variable

Thread Starter: twknox   Started: 04-01-2009 12:28 PM   Replies: 7
 Karamasoft Support Forums » General Discussions » UltimateTabstrip » Re: specifying form variable
 Printable Version    « Previous Thread   Next Thread »
  01 Apr 2009, 12:28 PM
twknox is not online. Last active: 7/15/2009 10:05:00 AM twknox

Top 10 Posts
Joined on 10-28-2008
Posts 8
specifying form variable
We are attempting to use the UltimateTabStrip control from inside of a portal.  This portal will append a value to the current form name when rendered to allow for multiple portlets on a page.  For example if we specify <form id="form1"... it becomes changed to <form id="form1_123"...

The tabstrip control is trying to use "document.form1..." to access the form.  There are a few javascript variables rendered by the portal.  These are:
   theForm = document.form1_123; 
   portletForm = document.forms['form1_123];  

Is there a way to change UltimateTabStrip to use these instead?

Thanks in advance!

  
  01 Apr 2009, 2:03 PM
Karamasoft is not online. Last active: 11/10/2017 3:24:14 PM Karamasoft

Top 10 Posts
Joined on 09-05-2004
Posts 6,818
Re: specifying form variable

UltimateTabstrip does not hard-code document.Form1 dynamically determines the client-side ID of the form containing the UltimateTabstrip control renders it as a parameter to the InitiateUltimateTabstrip method on the client-side. It sounds like your portal might be changing the ID of your form, after the UltimateTabstrip control is initialized on the server-side. When exactly and how does your form change the id from form1 to form1_123?


  
  02 Apr 2009, 3:58 AM
twknox is not online. Last active: 7/15/2009 10:05:00 AM twknox

Top 10 Posts
Joined on 10-28-2008
Posts 8
Re: specifying form variable

The value is changed as the form is rendered.  It is probably done by this module, which is required to run inside the portal:

  <httpModules>
   <!-- AquaLogic .NET Web Controls Support -->
   <add type="Com.Plumtree.Remote.Loader.TransformerProxy, AquaLogic.WCLoader, Version=3.1.0.0, Culture=neutral, PublicKeyToken=d0e882dd51ca12c5" name="PTWCFilterHttpModule"/>
</httpModules>


  
  02 Apr 2009, 12:39 PM
twknox is not online. Last active: 7/15/2009 10:05:00 AM twknox

Top 10 Posts
Joined on 10-28-2008
Posts 8
Re: specifying form variable
Any ideas?  Thanks.
  
  02 Apr 2009, 1:11 PM
Karamasoft is not online. Last active: 11/10/2017 3:24:14 PM Karamasoft

Top 10 Posts
Joined on 09-05-2004
Posts 6,818
Re: specifying form variable
If this HttpHandler is part of a third-party tool, you may want to contact them to see how they render the form id different than the ClientID of the form of your page. Otherwise, you can try debugging your app to see why the ClientID property of your form returns form1 instead of form_123. UltimateTabstrip depends on the client-side id of your form element to keep the state of the tabstrip after the page postbacks.
  
  03 Apr 2009, 7:17 AM
jthompson is not online. Last active: 12/30/2009 10:26:26 AM jthompson

Top 10 Posts
Joined on 04-03-2009
Posts 17
Re: specifying form variable
I am working on this with Tom.  Specifically what the Aqualogic portal does is rewrites the html as it processes it to avoid any conflicts of having multiple portlets on the same page with the same form id.  So, at run time, the form id is form1.  It is then renamed to form1_123 as it is  processed by the portal.  We do know at run time what it will be renamed to.  Is there any way to tell the control what form name to use? 

If not, can we write some javascript at the bottom of the page to tell the control the correct form id?

Thanks!

  
  03 Apr 2009, 11:34 AM
Karamasoft is not online. Last active: 11/10/2017 3:24:14 PM Karamasoft

Top 10 Posts
Joined on 09-05-2004
Posts 6,818
Re: specifying form variable
1. Add OnClientTabstripLoad to your UltimateTabstrip control as follows:

<kswc:ultimatetabstrip id="UltimateTabstrip1" runat="server" Scheme="MSDN" ActiveTabIndex="4" OnClientTabstripLoad="TabstripLoad">

2. Add the following client-side script block to the HEAD section of your page:

<script type="text/javascript">
function TabstripLoad(sender) {
var tabstripObj = sender;
alert(tabstripObj.utsg9);
tabstripObj.utsg9 = tabstripObj.utsg9.replace('Form1', 'Form1_123');
alert(tabstripObj.utsg9);
}
</script>

3. Note that the replace method in JavaScript is case sensitive. Make sure that you set 'Form1' and 'Form1_123' to the exact form IDs in your page. We added two alert statements for you to check their before/after values.

  
  03 Apr 2009, 11:47 AM
twknox is not online. Last active: 7/15/2009 10:05:00 AM twknox

Top 10 Posts
Joined on 10-28-2008
Posts 8
Re: specifying form variable
Thanks, this solution works.  Your help is greatly appreciated.
  
 Page 1 of 1 (8 items)
Karamasoft Support Forums » General Discussions » UltimateTabstrip » Re: specifying form variable

You can add attachments
You can post new topics
You can reply to topics
You can delete your posts
You can edit your posts
You can create polls
You can vote in polls
Forum statistics are enabled
Forum is unmoderated

© 2002-2018 Karamasoft LLC. All rights reserved.