By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,902 Members | 1,462 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,902 IT Pros & Developers. It's quick & easy.

using asp with a window.open

P: n/a
hey guys,

this may not be the right place, but i wanted to give it a shot.

i have an if statement, based on the data of a mssql db.

if the if is .eof
do nothing

else

<SCRIPT language="JavaScript">
function newwindow()
{
window.open('read_im.asp?ito=<%=vim1%>&ifrom=<%=vi m2%>&imessage=<%=vim3%>','jav','width=300,height=3 00,resizable=yes,titlebar=no,toolbar=no');
}
</script>

so this SHOULD make a popup if not.eof
it isn't working. i checked the retures, it is finding data in the db, so it
should make this popup, yet it isn't working.

can someone help? or should i move this to another NG

thanks
Bam
Mar 25 '07 #1
Share this Question
Share on Google+
6 Replies


P: n/a
Jeff wrote:
hey guys,

this may not be the right place, but i wanted to give it a shot.

i have an if statement, based on the data of a mssql db.

if the if is .eof
do nothing

else

<SCRIPT language="JavaScript">
function newwindow()
{

window.open('read_im.asp?ito=<%=vim1%>&ifrom=<%=vi m2%>&imessage=<%=vim3%>','jav','width=300,height=3 00,resizable=yes,titlebar=no,toolbar=no');
} </script>
so this SHOULD make a popup if not.eof
it isn't working. i checked the retures, it is finding data in the
db, so it should make this popup, yet it isn't working.

can someone help? or should i move this to another NG

thanks
Bam
Show the real code (preferable from a small repro page).

Actually, try getting it to work without the recordset involved.
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Mar 25 '07 #2

P: n/a
Jeff wrote on 25 mrt 2007 in microsoft.public.inetserver.asp.general:
hey guys,

this may not be the right place, but i wanted to give it a shot.

i have an if statement, based on the data of a mssql db.

if the if is .eof
That is pseudocode, what is your serverside code?
do nothing
Same.

btw, why not do:

<% 'vbscript
if not blablah.eof then
......
else
You should send this to clientside, so where is the closure of the ASP
code?
<SCRIPT language="JavaScript">
function newwindow()
{
window.open('read_im.asp?ito=<%=vim1%>&ifrom=<%=vi m2%>&imessage=<%=
vim3%>','jav','width=300,height=300,resizable=yes, titlebar=no,toolb
ar=no'); }
</script>
All kinds of derverside variables the are not declared to ouw knowledge.

So you build a clientside function, but where do you execute that
function?
so this SHOULD make a popup if not.eof
it isn't working. i checked the retures, it is finding data in the db,
so it should make this popup, yet it isn't working.
No, it SHOULD not, see the above remarks.

[additionally, the browser might not want to do pop-ups.]
can someone help? or should i move this to another NG
If you, due to debugging, think it is a serverside code problem, please
ask here.

First make real ASP code, either vbscript of jscript, and if that does
not work, tell us what debugging errors you found.

Show us the code you come up with including the database opening lines,
the sql string and the clientside SQL result string using a breakpoint
insert with:
<%
response.write SQL
response.end
%>
and a browser view source of the result of that breakpoint.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Mar 25 '07 #3

P: n/a
>
Show the real code (preferable from a small repro page).

Actually, try getting it to work without the recordset involved.
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
good idea... have to bolt for a bit, but will let you know the results.

thanks
Mar 25 '07 #4

P: n/a

"Jeff" <ba*@gig-gamers.comwrote in message
news:46**********************@roadrunner.com...
hey guys,

this may not be the right place, but i wanted to give it a shot.

i have an if statement, based on the data of a mssql db.

if the if is .eof
do nothing

else

<SCRIPT language="JavaScript">
function newwindow()
{

window.open('read_im.asp?ito=<%=vim1%>&ifrom=<%=vi m2%>&imessage=<%=vim3%>','jav','width=300,height=3 00,resizable=yes,titlebar=no,toolbar=no');
}
</script>

so this SHOULD make a popup if not.eof
it isn't working. i checked the retures, it is finding data in the db, so
it should make this popup, yet it isn't working.

can someone help? or should i move this to another NG

thanks
Bam
i am looking into this, and will probably have to got to javascript ng.

i took all wariables out, and am just trying to have the page run the
open.window script, and it isn't working. but before i did that, here is
what i limited the code to

varIMid = 6

if varIMid = 6 then
%>

SCRIPT language="JavaScript">
<!--hide

function newwindow()
{
window.open('read_im.asp','jav','width=300,height= 300,resizable=yes,titlebar=no,toolbar=no');
}
//-->
</SCRIPT>

<% else
end if %>

now this should return a popup since the variable DOES = 6.

so again, i don't know if the javascript is not correct, or if this is
something else.

Mar 25 '07 #5

P: n/a

"Jeff" <ba*@gig-gamers.comwrote in message
news:46***********************@roadrunner.com...
>
"Jeff" <ba*@gig-gamers.comwrote in message
news:46**********************@roadrunner.com...
hey guys,

this may not be the right place, but i wanted to give it a shot.

i have an if statement, based on the data of a mssql db.

if the if is .eof
do nothing

else

<SCRIPT language="JavaScript">
function newwindow()
{
window.open('read_im.asp?ito=<%=vim1%>&ifrom=<%=vi m2%>&imessage=<%=vim3%>','
jav','width=300,height=300,resizable=yes,titlebar= no,toolbar=no');
}
</script>

so this SHOULD make a popup if not.eof
it isn't working. i checked the retures, it is finding data in the db,
so
it should make this popup, yet it isn't working.

can someone help? or should i move this to another NG

thanks
Bam
i am looking into this, and will probably have to got to javascript ng.

i took all wariables out, and am just trying to have the page run the
open.window script, and it isn't working. but before i did that, here is
what i limited the code to

varIMid = 6

if varIMid = 6 then
%>

SCRIPT language="JavaScript">
<!--hide

function newwindow()
{
window.open('read_im.asp','jav','width=300,height= 300,resizable=yes,titlebar
=no,toolbar=no');
}
//-->
</SCRIPT>

<% else
end if %>

now this should return a popup since the variable DOES = 6.

so again, i don't know if the javascript is not correct, or if this is
something else.
If you use view source in the browser is the function present in the page?
What is calling the function?
Have you tried placing it in a HTM file to see whether it works there?
In what way is it not working, are you expecting a window with no titlebar?
Because that isn't likely outside of the trusted zone.
Mar 26 '07 #6

P: n/a
If you use view source in the browser is the function present in the page?
What is calling the function?
Have you tried placing it in a HTM file to see whether it works there?
In what way is it not working, are you expecting a window with no
titlebar?
Because that isn't likely outside of the trusted zone.

what i meant by not working, was it won't popup with the querystrings
attached.
i found a work around for this, by doing some other stuff. without the
strings, it works, but not with.
what i didn't know, was was there a different way to put querystrings into
javascript for the purpose of a popup.

thanks for the reply
Mar 27 '07 #7

This discussion thread is closed

Replies have been disabled for this discussion.