Wrox Programmer Forums
|
Javascript How-To Ask your "How do I do this with Javascript?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 6th, 2004, 09:28 AM
Authorized User
 
Join Date: Aug 2003
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Default javascript & asp

Hi There
I have what I believe to be a reasonably simple query, but I can't seem to find a definitive answer, anyway here goes.

I have a main menu page presenting a set of options, I wish to screen these off according to an asp seesion variable ie the user authorization, so when the user clicks on the link to the page I wish to pass the asp variable to a Javascript function which will return true or false dependant upon the asp variable.

So I guess I need something like onClick="javaScript:wordhighlight('<%=Session("Aut horization_Level"%>')">

Does this seem resonably close, oh and is there an issue with apostrophes ?? Thanks for your help

 
Old March 6th, 2004, 11:07 AM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 1,285
Thanks: 0
Thanked 2 Times in 2 Posts
Default

I don't know ASP myself, but my guess is that instead of this:
Code:
javaScript:wordhighlight('<%=Session("Authorization_Level"%>')
You would put this:
Code:
javascript:wordhighlight('<%=Session("Authorization_Level")%>')
----------
---Snib---
----------
 
Old March 6th, 2004, 12:22 PM
Authorized User
 
Join Date: Aug 2003
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Default

ooops sorry yeah bit of a typo ther I'm afraid






Similar Threads
Thread Thread Starter Forum Replies Last Post
Javascript && keeps turnig into &amp;&amp; ayrton Pro VB.NET 2002/2003 3 June 27th, 2005 03:34 PM
Modal Dialog (javascript & ASP.NET) nestor082 ASP.NET 1.0 and 1.1 Basics 2 March 30th, 2005 08:38 PM
Javascript & Asp gmoney060 Classic ASP Basics 1 August 16th, 2004 02:01 PM
Unterminated string constant (javascript&asp) beatmasta Javascript 1 May 17th, 2004 11:58 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.