[ColdBox 4.0] Anchor tags and SES Routing

45 views
Skip to first unread message

Chad Baloga

unread,
Mar 26, 2015, 5:36:38 PM3/26/15
to col...@googlegroups.com
I am trying to use some jQuery UI menus, tabs and accordions.  The tabs are having issues because they are using anchor tags.  When I click a tab, ColdBox redirects me to my default page.  Anyone experience this or know how to resolve?  I was just using the basic example to start (https://jqueryui.com/tabs/).  Thanks

Sana Ullah

unread,
Mar 26, 2015, 6:41:33 PM3/26/15
to col...@googlegroups.com
Hi

Please check if there any JS error on tab page, seems like thats why click redirect to url.

Warm Regards
Sana

On Thu, Mar 26, 2015 at 9:36 PM, Chad Baloga <cba...@gmail.com> wrote:
I am trying to use some jQuery UI menus, tabs and accordions.  The tabs are having issues because they are using anchor tags.  When I click a tab, ColdBox redirects me to my default page.  Anyone experience this or know how to resolve?  I was just using the basic example to start (https://jqueryui.com/tabs/).  Thanks

--
--
You received this message because you are subscribed to the Google Groups "ColdBox Platform" group.
For News, visit http://blog.coldbox.org
For Documentation, visit http://wiki.coldbox.org
For Bug Reports, visit https://ortussolutions.atlassian.net/browse/COLDBOX
---
You received this message because you are subscribed to the Google Groups "ColdBox Platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to coldbox+u...@googlegroups.com.
To post to this group, send email to col...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/coldbox/6546bf2b-f04b-497f-afc1-ceb3880e1e92%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Chad Baloga

unread,
Mar 27, 2015, 7:07:17 AM3/27/15
to col...@googlegroups.com
There are no errors.  It works fine outside of the framework.  Once I put in one of my views, it keeps wanting to take me to my homepage when I click a tab.

Chad Baloga

unread,
Mar 27, 2015, 7:49:24 AM3/27/15
to col...@googlegroups.com
This is my test code that you can throw into a view...

 
<script>
   $(document).ready(function() {  
      $("#tabs3").tabs();
   });
</script>
<div id="tabs3">
  <ul>
    <li><a href="#frag-1" class="tab">Projects</a></li>
    <li><a href="#frag-2" class="tab">Users</a></li>
    <li><a href="#frag-3" class="tab">Site Settings</a></li>
  </ul>
  <div id="frag-1">
  1
  </div>
  <div id="frag-2">
  2
  </div>
  <div id="frag-3">
  3
  </div>
</div>

Robert Zehnder

unread,
Mar 27, 2015, 11:32:00 AM3/27/15
to col...@googlegroups.com
Is tis view wrapped in cfoutput tags? If so the li's should be ##frag-1 etc... Just a thought..

Chad Baloga

unread,
Mar 27, 2015, 12:13:02 PM3/27/15
to col...@googlegroups.com
No, it wasn't wrapped in an output.  I was able to get it to work by using...

<li><a href="index.cfm/Admin/admin#fragment-1">Projects</a></li>


Without using index.cfm/Admin/admin, it would refresh my browser to "http://127.0.0.1:8500/myproject/index.cfm"

br...@bradwood.com

unread,
Mar 27, 2015, 1:07:19 PM3/27/15
to col...@googlegroups.com
Is it an issue with the base href on the page?  The JS library might be grabbing the URL and not accounting for SES urls.

Thanks!

~Brad

ColdBox Platform Evangelist
Ortus Solutions, Corp

E-mail: br...@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com 
 
 
--------- Original Message ---------
Reply all
Reply to author
Forward
0 new messages