Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP 3 Classic ASP Active Server Pages 3.0 > Classic ASP Basics
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old May 17th, 2005, 01:26 AM
Authorized User
 
Join Date: Jun 2003
Location: Melbourne, Victoria, Australia.
Posts: 90
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to tdaustin Send a message via Yahoo to tdaustin
Default Passing a ASP varible to a javascript

Hi all,

Im currently writing a script that allows a multiple records to be selected for editing. The only thing that changes is the id number eg. edit.asp?SID=123

Then i use loop through all the ids and open the edit page passing the id along. The only problem is i cant pass the asp variable that holds the record number to open

how do i output my ASP variable into the javascript url section

heres the code
Code:
<%

SID = Request.Form("select")
SelectAll = Request.Form("SelectAll")
' split profile id's into array

SID = Split(SID,",")
ProfileCount = 0

' loop though ids and open window with javascript
Do While Not ProfileCount > Ubound(SID)
ProfileCount = ProfileCount + 1
%>

<SCRIPT language="JavaScript1.2">

{
    window.open("../Profile_Edit.asp?SID=ineedmyvariablehere");
}
</SCRIPT>
<%
Loop
%>
Thanks Tim:)

TDA
__________________
TDA
Reply With Quote
  #2 (permalink)  
Old May 17th, 2005, 01:44 AM
Friend of Wrox
Points: 2,473, Level: 20
Points: 2,473, Level: 20 Points: 2,473, Level: 20 Points: 2,473, Level: 20
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2004
Location: India
Posts: 642
Thanks: 0
Thanked 43 Times in 42 Posts
Default

Hi
Please try:
window.open("../Profile_Edit.asp?SID=<%=asp_variable_name%>");

Om Prakash
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Passing values from asp to a javascript Abhilash Classic ASP Basics 11 June 15th, 2011 12:38 PM
Passing asp control id to javascript jazzcatone ASP.NET 1.0 and 1.1 Professional 0 October 18th, 2006 01:38 PM
Passing Javascript Variables to Asp.Net? Grumpy ASP.NET 2.0 Basics 4 September 8th, 2006 11:52 PM
passing data btwn asp page and javascript include Justine Classic ASP Professional 8 August 20th, 2004 02:23 AM
Varible mrideout BOOK: Beginning ASP.NET 1.0 3 July 22nd, 2004 01:57 PM



All times are GMT -4. The time now is 10:14 AM.


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