473,770 Members | 6,736 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

I am trying to create something like this:
Response.Write "<a
href=""javascri pt:openWindow(' www.domain.com/events/EventDetails.as p?EventID=" &
rsEvents("OccID ") &
"','Today','sta tus=yes,scrollb ars=yes,resizab le=yes,width=50 0,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.windo w" 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 1834
JS

function openPopup(ID)

{

var url = "yourURL?Id =" + ID

window.open(url yWindow','width =500,height=440 ,left=150,top=8 0,directories=n o
,location=no,me nubar=no,scroll bars=yes,status =no,toolbar=no, resizable=no');

}

ASP
Response.Write "<A href = 'javascript:ope nPopup(" & Rs("ID") * ")';>"
QL Server Programmer
--------------------------------------
"mmac" <mm**@junkmail. bin> wrote in message
news:%2******** ********@TK2MSF TNGP11.phx.gbl. ..
I am trying to create something like this:
Response.Write "<a
href=""javascri pt:openWindow(' www.domain.com/events/EventDetails.as p?EventID
=" & rsEvents("OccID ") &
"','Today','sta tus=yes,scrollb ars=yes,resizab le=yes,width=50 0,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.windo w" 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("OccI D")
theLinkText = "Your Link"
Response.Write "<a href=""#""
onClick=""windo w.open('www.dom ain.com/events/EventDetails.as p?EventID="
& theEventID &
"','Today','sta tus=yes,scrollb ars=yes,resizab le=yes,width=50 0,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.Wri te "<a
href=""javascr ipt:openWindow( 'www.domain.com/events/EventDetails.as p?EventID=" &
rsEvents("OccI D") &
"','Today','st atus=yes,scroll bars=yes,resiza ble=yes,width=5 00,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.windo w" 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.c om/events/eventdetails.as p?EventId=" + ID
window.open(url yWindow','width =500,height=440 ,left=150,top=8 0,directories=n o
,location=no,me nubar=no,scroll bars=yes,status =no,toolbar=no, resizable=no');

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


"Roji. P. Thomas" <la********@som ewhere.com> wrote in message
news:eM******** ******@tk2msftn gp13.phx.gbl...
JS

function openPopup(ID)

{

var url = "yourURL?Id =" + ID

window.open(url yWindow','width =500,height=440 ,left=150,top=8 0,directories=n o ,location=no,me nubar=no,scroll bars=yes,status =no,toolbar=no, resizable=no');
}

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

href=""javascri pt:openWindow(' www.domain.com/events/EventDetails.as p?EventID =" &
rsEvents("OccID ") &

"','Today','sta tus=yes,scrollb ars=yes,resizab le=yes,width=50 0,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.windo w"
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("Event Name")
Response.Write "<a
href=""javascri pt:window.open( 'www.mydomain.c om/events/EventDetails.as p?Even
tID=" & theEventID &
"','Today','sta tus=yes,scrollb ars=yes,resizab le=yes,width=50 0,height=500')" "
" & theLinkText & "</a>"
This presents the following as a link as shown in the bottom of the browser:

javascript:wind ow.open('www.my domain.com/events/EventDetails.as p?EventID=215
73673','Today', 'status=yes,scr ollbars=yes,res izable=yes,widt h=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.co mcast.giganews. com...

<%
theEventID = "1234" 'rsEvents("OccI D")
theLinkText = "Your Link"
Response.Write "<a href=""#""
onClick=""windo w.open('www.dom ain.com/events/EventDetails.as p?EventID="
& theEventID &
"','Today','sta tus=yes,scrollb ars=yes,resizab le=yes,width=50 0,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.Wri te "<a
href=""javascr ipt:openWindow( 'www.domain.com/events/EventDetails.as p?EventI

D=" &
rsEvents("OccI D") &


"','Today','st atus=yes,scroll bars=yes,resiza ble=yes,width=5 00,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.windo w" 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=""windo w.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("Event Name")
Response.Write "<a
href=""javascr ipt:window.open ('www.mydomain. com/events/EventDetails.as p?Even
tID=" & theEventID &
"','Today','st atus=yes,scroll bars=yes,resiza ble=yes,width=5 00,height=500') ""
" & theLinkText & "</a>"


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

javascript:win dow.open('www.m ydomain.com/events/EventDetails.as p?EventID=215
73673','Today' ,'status=yes,sc rollbars=yes,re sizable=yes,wid th=500,height=5 00
')

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.c omcast.giganews .com...


<%
theEventID = "1234" 'rsEvents("OccI D")
theLinkText = "Your Link"
Response.Write "<a href=""#""
onClick=""windo w.open('www.dom ain.com/events/EventDetails.as p?EventID="
& theEventID &

"','Today','st atus=yes,scroll bars=yes,resiza ble=yes,width=5 00,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.Wri te "<a


href=""javasc ript:openWindow ('www.domain.co m/events/EventDetails.as p?EventI

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


"','Today','s tatus=yes,scrol lbars=yes,resiz able=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.windo w" 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.comc ast.giganews.co m...

Sorry, I lost my mind a sec ...

change

href=""#"" onClick=""windo w.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("Event Name")
Response.Write "<a
href=""javascr ipt:window.open ('www.mydomain. com/events/EventDetails.as p?Eve

n
tID=" & theEventID &


"','Today','st atus=yes,scroll bars=yes,resiza ble=yes,width=5 00,height=500') "

"
" & theLinkText & "</a>"


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


javascript:win dow.open('www.m ydomain.com/events/EventDetails.as p?EventID=21

5
73673','Today' ,'status=yes,sc rollbars=yes,re sizable=yes,wid th=500,height=5 0

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.c omcast.giganews .com...


<%
theEventID = "1234" 'rsEvents("OccI D")
theLinkText = "Your Link"
Response.Write "<a href=""#""
onClick=""windo w.open('www.dom ain.com/events/EventDetails.as p?EventID="
& theEventID &

"','Today','st atus=yes,scroll bars=yes,resiza ble=yes,width=5 00,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.Wri te "<a

href=""javasc ript:openWindow ('www.domain.co m/events/EventDetails.as p?Event

ID=" &
>rsEvents("OccI D") &
"','Today','s tatus=yes,scrol lbars=yes,resiz able=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.windo w"
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
2762
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 that for example the following code would work as well in browsers as under Windows Scripting Host: str = "tableA";
9
12323
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
3193
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() { } Client.prototype.fullname = "John Smith"; var s = "Client"; eval("var o = new " + s + "();"); alert(o.fullname);
4
2246
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
1911
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 that contains sub Main() it doesn't want to compile in the IDE. Is there some property I need to set? The code below is what I want to use to create my window class. How can I do it within the VisualStudio IDE? Thanks, Gary O. Public Shared...
26
5694
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 several parts of the DOM, but this does not include the window object. Thank you
3
2684
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 page. Help apprecitate,. I currently have it commented out just to show the line to you better: function onCarrierSelect() { var frm = document.carrRequestForm.carrierList.selectedIndex;
34
29898
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
1364
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 assemblies and initialization is done in a seperate thread from the UI, to keep the UI from being locked up. Unfortuately 1 of the plug in assemblies provides a interface to a 3rd party
0
9591
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9425
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10225
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10053
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10001
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8880
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5312
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3969
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3573
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.