Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I combine JavaScript & ASP.NET in ASPX

Status
Not open for further replies.

markros

Programmer
May 21, 2007
3,150
US
Hi,

I need to add a new tab in my FormView but only for a specific site (particular SiteID (the info can be taken from Profile settings). The tabs are implemented using some custom code written by my colleague in this way

<label class="link" id="tab5" onclick="showReport(5,5)" title="Family Info">
Family Info</label>

My question is: how can I make the last 5 in showReport(5,5) to be variable depending on SiteID ?

Thanks in advance.
 
If "SiteID" is a JS variable, then:

Code:
<label class="link" id="tab5" onclick="showReport(5, SiteID)" title="Family Info">Family Info</label>

Otherwise you'd need to ask in the .Net forum for how to output a .Net variable to client-side code.

Hope this helps,
Dan



Coedit Limited - Delivering standards compliant, accessible web solutions

[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
No, it's not a JS variable. Anyway, I figured a way to mix ASP style code <% = NumTabs %>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top