473,395 Members | 1,706 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

How do I create a pop up window within ASP code?

I am trying to create something like this:
Response.Write "<a
href=""javascript:openWindow('www.domain.com/events/EventDetails.asp?EventID=" &
rsEvents("OccID") &
"','Today','status=yes,scrollbars=yes,resizable=ye s,width=500,height=500')"">"

I know there is something wrong with the above, the example I drew from used
"/dsn/wwwdomaincom" and I don't know what to do with "dsn" so I am trying to
figure out how to make it work without it.

I would like to create a seperate function for the "open.window" function but
every attempt I make doesn't allow the params "& rsEvents("OccID") " to work. I
am giving up on this approach and hoping I can do the same thing from ASP
instead.

How do I create a seperate function that I can re-use in other places that will
allow this extended information to be passed? Javascript or ASP is fine. I just
can seem to get over this hill.

Jul 19 '05 #1
6 1815
JS

function openPopup(ID)

{

var url = "yourURL?Id=" + ID

window.open(urlyWindow','width=500,height=440,left =150,top=80,directories=no
,location=no,menubar=no,scrollbars=yes,status=no,t oolbar=no,resizable=no');

}

ASP
Response.Write "<A href = 'javascript:openPopup(" & Rs("ID") * ")';>"
QL Server Programmer
--------------------------------------
"mmac" <mm**@junkmail.bin> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
I am trying to create something like this:
Response.Write "<a
href=""javascript:openWindow('www.domain.com/events/EventDetails.asp?EventID
=" & rsEvents("OccID") &
"','Today','status=yes,scrollbars=yes,resizable=ye s,width=500,height=500')"""

I know there is something wrong with the above, the example I drew from used "/dsn/wwwdomaincom" and I don't know what to do with "dsn" so I am trying to figure out how to make it work without it.

I would like to create a seperate function for the "open.window" function but every attempt I make doesn't allow the params "& rsEvents("OccID") " to work. I am giving up on this approach and hoping I can do the same thing from ASP
instead.

How do I create a seperate function that I can re-use in other places that will allow this extended information to be passed? Javascript or ASP is fine. I just can seem to get over this hill.

Jul 19 '05 #2


<%
theEventID = "1234" 'rsEvents("OccID")
theLinkText = "Your Link"
Response.Write "<a href=""#""
onClick=""window.open('www.domain.com/events/EventDetails.asp?EventID="
& theEventID &
"','Today','status=yes,scrollbars=yes,resizable=ye s,width=500,height=500')"">"
& theLinkText & "</a>"
%>

Brynn
www.coolpier.com


On Sun, 18 Jan 2004 21:23:32 -0800, "mmac" <mm**@junkmail.bin> wrote:
I am trying to create something like this:
Response.Write "<a
href=""javascript:openWindow('www.domain.com/events/EventDetails.asp?EventID=" &
rsEvents("OccID") &
"','Today','status=yes,scrollbars=yes,resizable=y es,width=500,height=500')"">"

I know there is something wrong with the above, the example I drew from used
"/dsn/wwwdomaincom" and I don't know what to do with "dsn" so I am trying to
figure out how to make it work without it.

I would like to create a seperate function for the "open.window" function but
every attempt I make doesn't allow the params "& rsEvents("OccID") " to work. I
am giving up on this approach and hoping I can do the same thing from ASP
instead.

How do I create a seperate function that I can re-use in other places that will
allow this extended information to be passed? Javascript or ASP is fine. I just
can seem to get over this hill.


I participate in the group to help give examples of code. I do not guarantee the effects of any code posted. Test all code before use!

Brynn
www.coolpier.com
Jul 19 '05 #3
Roji
I had to modify a bit to make the vars correct and may have messed it up
some. I tried the following but keep getting the following error in the
browser:
runtime error '800a000d' Type mismatch: '[string: ")';>"]'

JS
<script>
function openPopup(ID)

{

var url = "www.mydomain.com/events/eventdetails.asp?EventId=" + ID
window.open(urlyWindow','width=500,height=440,left =150,top=80,directories=no
,location=no,menubar=no,scrollbars=yes,status=no,t oolbar=no,resizable=no');

}
</script>
ASP
Response.Write "<a href = 'javascript:openPopup(" & RsEvents("OccID") *
")';>"


"Roji. P. Thomas" <la********@somewhere.com> wrote in message
news:eM**************@tk2msftngp13.phx.gbl...
JS

function openPopup(ID)

{

var url = "yourURL?Id=" + ID

window.open(urlyWindow','width=500,height=440,left =150,top=80,directories=no ,location=no,menubar=no,scrollbars=yes,status=no,t oolbar=no,resizable=no');
}

ASP
Response.Write "<A href = 'javascript:openPopup(" & Rs("ID") * ")';>"
QL Server Programmer
--------------------------------------
"mmac" <mm**@junkmail.bin> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
I am trying to create something like this:
Response.Write "<a

href=""javascript:openWindow('www.domain.com/events/EventDetails.asp?EventID =" &
rsEvents("OccID") &

"','Today','status=yes,scrollbars=yes,resizable=ye s,width=500,height=500')""
"

I know there is something wrong with the above, the example I drew from

used
"/dsn/wwwdomaincom" and I don't know what to do with "dsn" so I am trying to
figure out how to make it work without it.

I would like to create a seperate function for the "open.window"
function but
every attempt I make doesn't allow the params "& rsEvents("OccID") " to work. I
am giving up on this approach and hoping I can do the same thing from

ASP instead.

How do I create a seperate function that I can re-use in other places

that will
allow this extended information to be passed? Javascript or ASP is fine.
I just
can seem to get over this hill.


Jul 19 '05 #4
I modified your example to fit and came up with the following:

theEventID = rsEvents("OccID")
theLinkText = rsEvents("EventName")
Response.Write "<a
href=""javascript:window.open('www.mydomain.com/events/EventDetails.asp?Even
tID=" & theEventID &
"','Today','status=yes,scrollbars=yes,resizable=ye s,width=500,height=500')""
" & theLinkText & "</a>"
This presents the following as a link as shown in the bottom of the browser:

javascript:window.open('www.mydomain.com/events/EventDetails.asp?EventID=215
73673','Today','status=yes,scrollbars=yes,resizabl e=yes,width=500,height=500
')

which looks good to me except for the javascript window.open at the
beginning bnut for all i know that could be normal too.

"Brynn" <z@z.com> wrote in message
news:40***************@news.comcast.giganews.com.. .

<%
theEventID = "1234" 'rsEvents("OccID")
theLinkText = "Your Link"
Response.Write "<a href=""#""
onClick=""window.open('www.domain.com/events/EventDetails.asp?EventID="
& theEventID &
"','Today','status=yes,scrollbars=yes,resizable=ye s,width=500,height=500')"""
& theLinkText & "</a>"
%>

Brynn
www.coolpier.com


On Sun, 18 Jan 2004 21:23:32 -0800, "mmac" <mm**@junkmail.bin> wrote:
I am trying to create something like this:
Response.Write "<a
href=""javascript:openWindow('www.domain.com/events/EventDetails.asp?EventI

D=" &
rsEvents("OccID") &


"','Today','status=yes,scrollbars=yes,resizable=y es,width=500,height=500')"

">"

I know there is something wrong with the above, the example I drew from used"/dsn/wwwdomaincom" and I don't know what to do with "dsn" so I am trying tofigure out how to make it work without it.

I would like to create a seperate function for the "open.window" function butevery attempt I make doesn't allow the params "& rsEvents("OccID") " to work. Iam giving up on this approach and hoping I can do the same thing from ASP
instead.

How do I create a seperate function that I can re-use in other places that willallow this extended information to be passed? Javascript or ASP is fine. I justcan seem to get over this hill.


I participate in the group to help give examples of code. I do not

guarantee the effects of any code posted. Test all code before use!
Brynn
www.coolpier.com

Jul 19 '05 #5

Sorry, I lost my mind a sec ...

change

href=""#"" onClick=""window.open(' ... etc...

On Mon, 19 Jan 2004 20:48:02 -0800, "mmac" <no@thank.you> wrote:
I modified your example to fit and came up with the following:

theEventID = rsEvents("OccID")
theLinkText = rsEvents("EventName")
Response.Write "<a
href=""javascript:window.open('www.mydomain.com/events/EventDetails.asp?Even
tID=" & theEventID &
"','Today','status=yes,scrollbars=yes,resizable=y es,width=500,height=500')""
" & theLinkText & "</a>"


This presents the following as a link as shown in the bottom of the browser:

javascript:window.open('www.mydomain.com/events/EventDetails.asp?EventID=215
73673','Today','status=yes,scrollbars=yes,resizab le=yes,width=500,height=500
')

which looks good to me except for the javascript window.open at the
beginning bnut for all i know that could be normal too.

"Brynn" <z@z.com> wrote in message
news:40***************@news.comcast.giganews.com. ..


<%
theEventID = "1234" 'rsEvents("OccID")
theLinkText = "Your Link"
Response.Write "<a href=""#""
onClick=""window.open('www.domain.com/events/EventDetails.asp?EventID="
& theEventID &

"','Today','status=yes,scrollbars=yes,resizable=y es,width=500,height=500')""
"
& theLinkText & "</a>"
%>

Brynn
www.coolpier.com


On Sun, 18 Jan 2004 21:23:32 -0800, "mmac" <mm**@junkmail.bin> wrote:
>I am trying to create something like this:
>Response.Write "<a


href=""javascript:openWindow('www.domain.com/events/EventDetails.asp?EventI

D=" &
>rsEvents("OccID") &


"','Today','status=yes,scrollbars=yes,resizable= yes,width=500,height=500')"

">"
>
>I know there is something wrong with the above, the example I drew fromused >"/dsn/wwwdomaincom" and I don't know what to do with "dsn" so I am tryingto >figure out how to make it work without it.
>
>I would like to create a seperate function for the "open.window" functionbut >every attempt I make doesn't allow the params "& rsEvents("OccID") " towork. I >am giving up on this approach and hoping I can do the same thing from ASP
>instead.
>
>How do I create a seperate function that I can re-use in other placesthat will >allow this extended information to be passed? Javascript or ASP is fine.I just >can seem to get over this hill.
>
>
>


I participate in the group to help give examples of code. I do not

guarantee the effects of any code posted. Test all code before use!

Brynn
www.coolpier.com



Brynn
www.coolpier.com

I participate in the group to help give examples of code.
I do not guarantee the effects of any code posted.
Test all code before use!
Jul 19 '05 #6
That looks like what you had originally if I recall right and it did
something odd.... can't recall what it was... I'll try it again tonight.
thanks for the help I really appreciate it.
I need to find a syntax checker for this stuff
"Brynn" <z@z.com> wrote in message
news:40*************@news.comcast.giganews.com...

Sorry, I lost my mind a sec ...

change

href=""#"" onClick=""window.open(' ... etc...

On Mon, 19 Jan 2004 20:48:02 -0800, "mmac" <no@thank.you> wrote:
I modified your example to fit and came up with the following:

theEventID = rsEvents("OccID")
theLinkText = rsEvents("EventName")
Response.Write "<a
href=""javascript:window.open('www.mydomain.com/events/EventDetails.asp?Eve

n
tID=" & theEventID &


"','Today','status=yes,scrollbars=yes,resizable=y es,width=500,height=500')"

"
" & theLinkText & "</a>"


This presents the following as a link as shown in the bottom of the browser:


javascript:window.open('www.mydomain.com/events/EventDetails.asp?EventID=21

5
73673','Today','status=yes,scrollbars=yes,resizab le=yes,width=500,height=50

0
')

which looks good to me except for the javascript window.open at the
beginning bnut for all i know that could be normal too.

"Brynn" <z@z.com> wrote in message
news:40***************@news.comcast.giganews.com. ..


<%
theEventID = "1234" 'rsEvents("OccID")
theLinkText = "Your Link"
Response.Write "<a href=""#""
onClick=""window.open('www.domain.com/events/EventDetails.asp?EventID="
& theEventID &

"','Today','status=yes,scrollbars=yes,resizable=y es,width=500,height=500')"

"
"
& theLinkText & "</a>"
%>

Brynn
www.coolpier.com


On Sun, 18 Jan 2004 21:23:32 -0800, "mmac" <mm**@junkmail.bin> wrote:

>I am trying to create something like this:
>Response.Write "<a

href=""javascript:openWindow('www.domain.com/events/EventDetails.asp?Event

ID=" &
>rsEvents("OccID") &
"','Today','status=yes,scrollbars=yes,resizable= yes,width=500,height=500')

"">"
>
>I know there is something wrong with the above, the example I drew from
used
>"/dsn/wwwdomaincom" and I don't know what to do with "dsn" so I am
tryingto
>figure out how to make it work without it.
>
>I would like to create a seperate function for the "open.window"
functionbut
>every attempt I make doesn't allow the params "& rsEvents("OccID") "
towork. I
>am giving up on this approach and hoping I can do the same thing from
ASP >instead.
>
>How do I create a seperate function that I can re-use in other places

that will
>allow this extended information to be passed? Javascript or ASP is

fine.I just
>can seem to get over this hill.
>
>
>

I participate in the group to help give examples of code. I do not

guarantee the effects of any code posted. Test all code before use!

Brynn
www.coolpier.com



Brynn
www.coolpier.com

I participate in the group to help give examples of code.
I do not guarantee the effects of any code posted.
Test all code before use!

Jul 19 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

22
by: nobody | last post by:
hello everybody, is there a way of creating an array with help of a function that would accept the name of this array as a parameter and then create global Array type variable of that name? so...
9
by: pow67 | last post by:
Is there a javascript statement which can be incorporated in a hyperlink which will open a new page that fills the screen while leaving the page with the link open? Thanks in advance. CW
8
by: Steve Neill | last post by:
Can anyone suggest how to create an arbitrary object at runtime WITHOUT using the deprecated eval() function. The eval() method works ok (see below), but is not ideal. function Client() { }...
4
by: jm | last post by:
I can't find anything on the subject with C#. Thank you for any guidance. I want to create MDI windows within IE, not IE as a child window of something else.
2
by: Gary Owsiany | last post by:
Until now I have been using the default "windows application" template to create a new window. What I would like to do is play with dynamic window creation. However, when I just create a class...
26
by: yb | last post by:
Hi, Is there a standard for the global 'window' object in browsers? For example, it supports methods such as setInterval and clearInterval, and several others. I know that w3c standardized...
3
by: jojowebdev | last post by:
Picking up from Friday.. I am still having trouble creating the Select Menu option. I got parts of the correct syntax but it is still not creating the selected carrier as an option in the parent...
34
by: Tom | last post by:
I'd greatly appreciate advice and code snippets on how to create a ram disk within a C/C++ program. I also need to be able to determine the free space. Thanks in advance for any help.
0
by: =?Utf-8?B?QmFydE1hbg==?= | last post by:
Greetings, To begin with we have an archetecture which has a manager Asssembly which loads "Plug-in" assemblies using reflection, when a the UI prompts the manager. This loading of the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.