473,595 Members | 2,442 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

popup window using ASP and VBscript

Hi everyone

I am having a little problem with an asp page.
I am trying to create a master/detail page, but on this occasion, it's only
a small amount of detail, so i want to create a small page, for the detail,
and have that pop up. something you would do for instance to show a link to
a larger graphic on your detail page.
It's obvious that i am doing something wrong, because instead of opening the
new page, in the pop up, the main page moves to the detail, and the pop up
window then opens up as an error.
For example here
http://www.tripak.me.uk/sublisting.a...9&TexSpecID=34
Clicking on a link there will give me the detail page, but not where i want
it.

This is my code from the master page, and the error is probably here
<a href="info.asp? GradeID=<%=(rsS ublisting("Grad eID"))%>"
onClick="window .open('nameofwi ndow','','width =100,height=100 ');return
false"><%=rsSub Listing("Grades ")%></a>

Could someone point out what i have done wrong?

Thanks so much

Raphael
Jul 19 '05 #1
11 50595
Try

<A href="#"
onclick="window .open('nameofwi ndow','info.asp ?GradeID=<%=rsS ublisting("Grad e
ID")%>',width=1 00,height=100)" ><%=rsSubListin g("Grades")%> </A>

Ray at work

"Raphael Gluck" <iwish i could tell you @alas blame the spammers> wrote in
message news:u0******** ******@TK2MSFTN GP10.phx.gbl...
Hi everyone

I am having a little problem with an asp page.
I am trying to create a master/detail page, but on this occasion, it's only a small amount of detail, so i want to create a small page, for the detail, and have that pop up. something you would do for instance to show a link to a larger graphic on your detail page.
It's obvious that i am doing something wrong, because instead of opening the new page, in the pop up, the main page moves to the detail, and the pop up
window then opens up as an error.
For example here
http://www.tripak.me.uk/sublisting.a...9&TexSpecID=34
Clicking on a link there will give me the detail page, but not where i want it.

This is my code from the master page, and the error is probably here
<a href="info.asp? GradeID=<%=(rsS ublisting("Grad eID"))%>"
onClick="window .open('nameofwi ndow','','width =100,height=100 ');return
false"><%=rsSub Listing("Grades ")%></a>

Could someone point out what i have done wrong?

Thanks so much

Raphael

Jul 19 '05 #2
Thanks
I tried that, but it doesnt seem to work, I entered all this

<A href="#"
onclick="window .open('nameofwi ndow','info.asp ?GradeID=<%=rsS ublisting("Grad e
ID")%>',width=1 00,height=100)" ><%=rsSubListin g("Grades")%> </A>

And it just doesnt move. I can see an error triangle in the bottom of the
web page, line 188 which doesnt contain anything to help me
Have i misunderstood your script line? must i modify it?

Please help

Raphael
Jul 19 '05 #3
sorry if this a double post, but it doesnt look like it sent

Thanks Ray
my pages are in ASP and VBscript
would that be possible cause or is that a silly question?

Raphael
Jul 19 '05 #4
The problem you're having has to do with javascript, not ASP. Try loading
your page and doing a view-source and debugging the client-side code after
checking what error the browser is reporting.

Ray at work

"Raphael Gluck" <iwish i could tell you @alas blame the spammers> wrote in
message news:eM******** *****@TK2MSFTNG P09.phx.gbl...
sorry if this a double post, but it doesnt look like it sent

Thanks Ray
my pages are in ASP and VBscript
would that be possible cause or is that a silly question?

Raphael

Jul 19 '05 #5
Thanks Ray, But still not

Can i ask you again are you sure this code is the correct one?

<A href="#"
onclick="window .open('nameofwi ndow','info.asp ?GradeID=<%=rsS ublisting("Grad e
ID")%>',width=1 00,height=100)" ><%=rsSubListin g("Grades")%> </A>
The error doesnt seem to be confined to one line, though the page displays.
Maybe i need to tell you more.
The page i am on is sublisting.asp
The page i am trying to get to pop up is called info.asp
When i roll over the mouse over the link, sublisting.asp? Item_ID etc...
I know you're way better at this than me, but arent i supposed to see
info.asp? etc...

Do i need to insert something into the ahref tag? instead of "#"

Please help

Raphael
Jul 19 '05 #6
Gazing into my crystal ball I observed "Raphael Gluck" <iwish i could
tell you @alas blame the spammers> writing in
news:eZ******** ******@TK2MSFTN GP10.phx.gbl:
Thanks Ray, But still not

Can i ask you again are you sure this code is the correct one?

<A href="#"
onclick="window .open('nameofwi ndow','info.asp ?GradeID=<%=rsS ublisting("G
rade ID")%>',width=1 00,height=100)" ><%=rsSubListin g("Grades")%> </A>
The error doesnt seem to be confined to one line, though the page
displays. Maybe i need to tell you more.
The page i am on is sublisting.asp
The page i am trying to get to pop up is called info.asp
When i roll over the mouse over the link, sublisting.asp? Item_ID etc...
I know you're way better at this than me, but arent i supposed to see
info.asp? etc...

Do i need to insert something into the ahref tag? instead of "#"

Please help

Raphael


That's the problem with using javascript for links. You haven't provided a
method for non-javascript users. <a href="#"> will only take the user to
the top of the page.

What you need to do is:
<A href="info.asp? GradeID=<%=rsSu blisting("Grade ID")%>"
onclick="window .open('nameofwi ndow','info.asp ?GradeID=<%=rsS ublisting
("Grade ID")%>',width=1 00,height=100); return false" title="Open <%
=rsSublisting(" Grade ID")%> in a new window" target="_blank" ><%
=rsSubListing(" Grades")%></A>

The above does three things:
1. The return false allows users without javascript to open the page.
2. The title attribute indicates that the page will open in a new window.
For accessibility reasons, users should know that pages are going to open
in new windows.
3. The target attribute opens in a new window for non-javascript users.

Note: users with pop-up stoppers may still have problems with
target="_blank" , therefore, it might be better to omit it and suggest the
user open in a new window.

--
Adrienne Boswell
Please respond to the group so others can share
http://www.arbpen.com
Jul 19 '05 #7
Thank you Adrienne

I tried your script yesterday, but it gave me errors as you can see,
I have just tried again, and now it's not giving me errors, but still not
achieving its purpose

It's opening the new page, but as a full sized browser window.
It's because i am VB illiterate, I guess that's bad.
I hope you can help me if you have a minute

Thanks so much

Raphael
Jul 19 '05 #8
"Adrienne" wrote:

What you need to do is:
<A href="info.asp? GradeID=<%=rsSu blisting("Grade ID")%>"
onclick="window .open('nameofwi ndow','info.asp ?GradeID=<%=rsS ublisting
("Grade ID")%>',width=1 00,height=100); return false" title="Open <%
=rsSublisting(" Grade ID")%> in a new window" target="_blank" ><%
=rsSubListing(" Grades")%></A>
Everybody keeps mixing up the order of the parameters in window.open():
http://msdn.microsoft.com/workshop/a...ods/open_0.asp

Here's a better idea -- instead of "_blank", use TARGET="nameofw indow" and
omit the [return false]. And use a more descriptive window name, for crying
out loud. Your link should look something like this:

<A HREF="info.asp? GradeID=<%=rsSu blisting.Fields ("Grade ID").Value%>"
ONCLICK="window .open('','grade Details','heigh t=100,width=100 ')"
TITLE="Open <%=rsSublisting .Fields("Grade ID").Value%> in a new
window"
TARGET="gradeDe tails"


If scripting is defective or absent, this will open in a default-sized
window named "gradeDetai ls". If scripting is functional, the properly sized
(and named) window will be created with the click event, and will
immediately be used as the target of the anchor.
Tested successfully in the following browsers:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; .NET CLR 1.1.4322)
Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.4) Gecko/20030624
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2) Opera 7.11 [en]
--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
Jul 19 '05 #9
thank you very much, i will try this option too.
I appreciate it

Raphael
"Dave Anderson" <GT**********@s pammotel.com> wrote in message
news:eq******** ******@TK2MSFTN GP12.phx.gbl...
"Adrienne" wrote:

What you need to do is:
<A href="info.asp? GradeID=<%=rsSu blisting("Grade ID")%>"
onclick="window .open('nameofwi ndow','info.asp ?GradeID=<%=rsS ublisting
("Grade ID")%>',width=1 00,height=100); return false" title="Open <%
=rsSublisting(" Grade ID")%> in a new window" target="_blank" ><%
=rsSubListing(" Grades")%></A>
Everybody keeps mixing up the order of the parameters in window.open():

http://msdn.microsoft.com/workshop/a...ods/open_0.asp
Here's a better idea -- instead of "_blank", use TARGET="nameofw indow" and
omit the [return false]. And use a more descriptive window name, for crying out loud. Your link should look something like this:

<A HREF="info.asp? GradeID=<%=rsSu blisting.Fields ("Grade ID").Value%>"
ONCLICK="window .open('','grade Details','heigh t=100,width=100 ')"
TITLE="Open <%=rsSublisting .Fields("Grade ID").Value%> in a new
window"
TARGET="gradeDe tails"
>
If scripting is defective or absent, this will open in a default-sized
window named "gradeDetai ls". If scripting is functional, the properly

sized (and named) window will be created with the click event, and will
immediately be used as the target of the anchor.
Tested successfully in the following browsers:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; .NET CLR 1.1.4322)
Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.4) Gecko/20030624
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2) Opera 7.11 [en]
--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use of this email address implies consent to these terms. Please do not contact me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.

Jul 19 '05 #10

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

Similar topics

7
3211
by: E Michael Brandt | last post by:
I have been lurking here for some time, and now would like to ask a question of you clever coders: My JustSo PictureWindow 3 Extension for Dreamweaver has stumbled in the face of the new Opera 8. Jspw3 opens a popup window (using varname=window.open(...)) but there are now two problems: 1) Opera8 interprets a top,left of 0,0 to be top left of the browser window rather than of the entire screen, unlike the other modern browsers I've...
4
34853
by: GrantS | last post by:
I am having a problem closing a popup window opened modally. When I try to close the window (when the user hits save button and the data has been processed), the Popup window opens as a full screen as a new window. The original window plus the Modally opened Pop remain in a separate window. What I want to do is close the popup and return to the original window with its view state maintained. The control use to fire the popup window...
0
435
by: ChrisB | last post by:
I'm attempting to open a new window from a LinkButton in a DataGrid. I can set a session variable in the ItemCommand event for the LinkButton like so: // this is used to handle the ItemCommand event private void itmCmd(object source, System.Web.UI.WebControls.DataGridCommandEventArgs e) { string itemGFNo = ""; if (e.CommandName == "EditTask")
1
1526
by: Ken | last post by:
Is there a way to show a popup window using code behind in VB? Partial java script code: Open('htmpage.html')
7
2591
by: Drew Berkemeyer | last post by:
Hello, We have an application that we have written using ASP.NET. On one of our pages we open a popup window using javascript. The popup window has a save and a cancel button. Both of them are server-side controls and do a postback. While processing on the server we add javascript to the page load (i.e. onload=window.opener.focus(); window.close()). However, the window.close() command does not close the IE popup window. This happens...
5
1707
by: Angel | last post by:
I created a popup window using createPopup method. Is there anyway to keep the popup open until the user clicks a button within the popup to close the popup window. Right now the popup window will close if I click outside the popup window. I do not want that to happen until the user clicks a button in the popup window. thanks....
1
6615
by: sundarachaitanyam | last post by:
hi, I am just wondering how to create a modal popup using javascript. The popup window shouldnt contain minimize,close and maximize buttons and it should be resizable? I am trying using window.open but not getting the desirable results. Any help is greatly appreciated.
4
4282
by: jyo123 | last post by:
Hi, Is there any way to write perl script to save the popup window into specified location.Please anyone help on this. Thanks is advance.
3
7703
by: pavanip | last post by:
Hi, I have written the code for display popup window using javascript in button onclient click event. <asp:Button ID="Button1" runat="server" Style="position: static" OnClientClick="openwindow()" Text="Execute"/> <script type="text/javascript"> function openwindow() { window.open("AssignedTickets.aspx",'window','width=630,height=620,background=silver,menubar=no, resizable=no') }
0
7957
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
7883
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
8262
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
8379
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...
0
8252
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
5839
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5421
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3915
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2391
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

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.