Solved

asp to javascript variables???

Posted on 1998-08-17
5
172 Views
Last Modified: 2011-09-20
I've a script like this,
<SCRIPT LANGUAGE="JavaScript">
<!--
         function WinOpen2() {          msg=window.open("thomas.html","ButtonWindow","toolbar=no,width=420,height=260,directories=no,status=no,scrollbars=no,resize=no,menubar=no");
        }
//-->
</SCRIPT>
and I want this (it doesn't work)
msg=window.open("ptext.asp?addn="<%=rs("ok")%>,
                                                     =============
Any solution???
0
Comment
Question by:manne
5 Comments
 

Author Comment

by:manne
ID: 1836770
Edited text of question
0
 
LVL 4

Expert Comment

by:mitek
ID: 1836771
what about something like this ?

msg = window.open('ptext.asp?addn=<%=rs("ok")%>','toolbar=no,width=420,height=260')
0
 
LVL 10

Expert Comment

by:MasseyM
ID: 1836772
What is the rs for?  Is that referring to a recordset?  If it is, you would need to do <%=rs.fields("ok") %> rather than <%=rs("ok")%>
Also, are you sure you are establishing a database connection if this is a recordset...


0
 
LVL 12

Accepted Solution

by:
Otta earned 100 total points
ID: 1836773
> I want this (it doesn't work)
>   msg=window.open("ptext.asp?addn="<%=rs("ok")%>

Try: msg=window.open("ptext.asp?addn=<%=rs(""ok"")%")

i.e., one 'opening-left-parenthesis', one 'opening-quote',
some text (using the "two-quotes-to-make-one" rule)
a 'closing-quote' and a 'closing-quote'.
0
 

Author Comment

by:manne
ID: 1836774
solved!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now