Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - asp var to js var
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

asp var to js var

 Post Reply Post Reply
Author
asp what that?? View Drop Down
Mod Builder Group
Mod Builder Group


Joined: 08 November 2003
Location: United States
Status: Offline
Points: 140
Post Options Post Options   Thanks (0) Thanks(0)   Quote asp what that?? Quote  Post ReplyReply Direct Link To This Post Topic: asp var to js var
    Posted: 13 November 2004 at 4:40pm
i am trying to get a asp variable to going to js....could someone help me with this?
Back to Top
Mart View Drop Down
Senior Member
Senior Member
Avatar

Joined: 30 November 2002
Status: Offline
Points: 2304
Post Options Post Options   Thanks (0) Thanks(0)   Quote Mart Quote  Post ReplyReply Direct Link To This Post Posted: 13 November 2004 at 4:44pm
What do you mean? js and asp do not declare variables as types so they should be able to be set as the same value
Back to Top
Gullanian View Drop Down
Senior Member
Senior Member
Avatar

Joined: 04 January 2002
Location: England
Status: Offline
Points: 4373
Post Options Post Options   Thanks (0) Thanks(0)   Quote Gullanian Quote  Post ReplyReply Direct Link To This Post Posted: 13 November 2004 at 4:53pm
I think you mean passing values from an ASP page into a Java applet?
Back to Top
asp what that?? View Drop Down
Mod Builder Group
Mod Builder Group


Joined: 08 November 2003
Location: United States
Status: Offline
Points: 140
Post Options Post Options   Thanks (0) Thanks(0)   Quote asp what that?? Quote  Post ReplyReply Direct Link To This Post Posted: 13 November 2004 at 5:16pm
its not a applet its just a script...ok its like this....i want to take the users id which is a asp var....and i need to plug that into a js that i am using for a menu :)
Back to Top
Mart View Drop Down
Senior Member
Senior Member
Avatar

Joined: 30 November 2002
Status: Offline
Points: 2304
Post Options Post Options   Thanks (0) Thanks(0)   Quote Mart Quote  Post ReplyReply Direct Link To This Post Posted: 13 November 2004 at 5:22pm
<script language="javascript">
function myFunction(var1)
{
var userId;
userId = '<%= UserId %>';
}
</script>

Where UserId is the variable or function
Back to Top
asp what that?? View Drop Down
Mod Builder Group
Mod Builder Group


Joined: 08 November 2003
Location: United States
Status: Offline
Points: 140
Post Options Post Options   Thanks (0) Thanks(0)   Quote asp what that?? Quote  Post ReplyReply Direct Link To This Post Posted: 13 November 2004 at 5:24pm

see i had something kinda like that but how do i plug it into where i need it now...this is what i have now

aI("text=Home Page;url=../default.asp;");

but where it says default i need it to be the var

thaks for the help

Back to Top
Mart View Drop Down
Senior Member
Senior Member
Avatar

Joined: 30 November 2002
Status: Offline
Points: 2304
Post Options Post Options   Thanks (0) Thanks(0)   Quote Mart Quote  Post ReplyReply Direct Link To This Post Posted: 13 November 2004 at 5:33pm
firstly you should use single quotes with javascript, but this should work:

aI('text=Home Page;url=<%= YourVar %>;');
Back to Top
asp what that?? View Drop Down
Mod Builder Group
Mod Builder Group


Joined: 08 November 2003
Location: United States
Status: Offline
Points: 140
Post Options Post Options   Thanks (0) Thanks(0)   Quote asp what that?? Quote  Post ReplyReply Direct Link To This Post Posted: 13 November 2004 at 5:35pm
THANK YOU!!!!  
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.