CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> Tips & Solutions

 Link with javascript as alternative to Tabs

Print topic Send  topic

Author Message
MichaelMcDonald

Posts: 584
Posted: 07/13/2014, 5:16 PM

Here's an example - you will need to set the value of the URL parameter with an initial value before this will work as this java script reads the existing URL parameters and updates an existing one. If you can come up with a java script for the button which provides an initial value as opposed to updating could you post here please ...

At the moment this only works with numeric values.

1. Enclose your link in <li></li>
2. create your #href and in this example give it id="link1"
3. The following script will get the URL parameter string and will change the value of "tab" to = 1.

<script type="text/javascript">;
var reExp = /tab=\d+/;
var url = window.location.search;
var url = url.substring(1);
var newUrl = url.replace(reExp, "tab=" + 1);
document.getElementById('link1').href += newUrl
</script>


And if you wanted that link to have a url param value of 2 ...



<script type="text/javascript">;
var reExp = /tab=\d+/;
var url = window.location.search;
var url = url.substring(1);
var newUrl = url.replace(reExp, "tab=" + 2);
document.getElementById('link1').href += newUrl
</script>


Now you can set panels Visible = true/false based on the get values of tab to emulate a tabbed environment.

_________________
Central Coast, NSW, Australia.

Use the EXETA Online Business Valuation Tool to
value your business.

www.exeta.com.au
View profile  Send private message
sabakanwal

Posts: 1
Posted: 12/16/2014, 11:59 PM

If you submit and get a redirection error or blank page and see that the url has appended ?ccsForm = FORM NAME then check the session save path in your Common.php file and ensure that it is correct. This is why pages work OK on one site but not on another.
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright 2003-2004 by UltraApps.com  and YesSoftware, Inc.