Programming Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsOtherProgramming Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old August 27th, 2004, 05:07 AM
programerneil programerneil is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Aug 2004
Posts: 14 programerneil User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 m 28 sec
Reputation Power: 0
Unhappy Asp Help for notice popup

write i have a asp notice popup and i want to make it so <%
If strstatus = "on" Then %>
<a href="javascript:notice('http://neil-1/address/notice/default.asp')"></a>
<%Else
End If
%>
but it dosent work it just shows the page nothing more but ihave all the connection code working for it
but it just wont work and ive got thejava script popup code there iam not shur how to fix it? please help.

Reply With Quote
  #2  
Old August 27th, 2004, 05:09 AM
selwonk's Avatar
selwonk selwonk is offline
Contributing User
ASP Free Frequenter (2500 - 2999 posts)
 
Join Date: Jun 2004
Posts: 2,942 selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 6 Days 9 h 49 m 28 sec
Reputation Power: 62
Hi

Can you post all your code including the notice() routine?

MK

Reply With Quote
  #3  
Old August 27th, 2004, 05:11 AM
programerneil programerneil is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Aug 2004
Posts: 14 programerneil User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 m 28 sec
Reputation Power: 0
Post

<script>
var newwindow;
function notice(url)
{
newwindow=window.open(url,'name','height=260,width =290');
if (window.focus) {newwindow.focus()}
}
</script>
<%
Dim strConnection
Dim objConnection
Dim rstnotice
strConnection = "Provider=SQLOLEDB;Data Source=;Database=address;Integrated Security=SSPI"
Set objConnection = Server.CreateObject("ADODB.Connection")
objConnection.Open strConnection
Set rstnotice = objConnection.Execute("SELECT text, name, status FROM notice ")
%>
<%
Do Until rstnotice.EOF
Dim strtext
strtext = rstnotice("text")
If Len(strtext) > 0 then
Do while Instr(1, strtext, "_")
strtext = replace(strtext, "_", " ")
Loop
Else
strtext = "&nbsp;"
End If
Dim strstatus
strstatus = rstnotice("status")
If Len(strstatus) > 0 then
Do while Instr(1, strstatus, "_")
strstatus = replace(status, "_", " ")
Loop
Else
strstatus = "&nbsp;"
End If

Dim strname
strname = rstnotice("name")
If Len(strname) > 0 then
Do while Instr(1, strname, "_")
strname = replace(name, "_", " ")
Loop
Else
strname = "&nbsp;"
End If
%>
<%
If strstatus = "on" Then %>
<a href="javascript:notice('http://neil-1/address/notice/default.asp')"></a>
<%Else
End If
%>

Reply With Quote
  #4  
Old August 27th, 2004, 05:18 AM
selwonk's Avatar
selwonk selwonk is offline
Contributing User
ASP Free Frequenter (2500 - 2999 posts)
 
Join Date: Jun 2004
Posts: 2,942 selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 6 Days 9 h 49 m 28 sec
Reputation Power: 62
Hi

Change:
Code:
<%
If strstatus = "on" Then %>
<a href="javascript:notice('http://neil-1/address/notice/default.asp')"></a> 
<%Else 
End If 
%>
to
Code:
<%
If strstatus = "on" Then %>
<script language="JavaScript">notice('http://neil-1/address/notice/default.asp');</script> 
<%Else 
End If 
%>
MK

Reply With Quote
  #5  
Old August 27th, 2004, 05:22 AM
programerneil programerneil is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Aug 2004
Posts: 14 programerneil User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 m 28 sec
Reputation Power: 0
Angry

no nothings happening?????

Reply With Quote
  #6  
Old August 27th, 2004, 05:29 AM
selwonk's Avatar
selwonk selwonk is offline
Contributing User
ASP Free Frequenter (2500 - 2999 posts)
 
Join Date: Jun 2004
Posts: 2,942 selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 6 Days 9 h 49 m 28 sec
Reputation Power: 62
Is strstatus definately equal to "on"? Add a Response.Write to check

MK

Reply With Quote
  #7  
Old August 27th, 2004, 05:30 AM
programerneil programerneil is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Aug 2004
Posts: 14 programerneil User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 m 28 sec
Reputation Power: 0
yes on the database table it is on

Reply With Quote
  #8  
Old August 27th, 2004, 05:38 AM
selwonk's Avatar
selwonk selwonk is offline
Contributing User
ASP Free Frequenter (2500 - 2999 posts)
 
Join Date: Jun 2004
Posts: 2,942 selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 6 Days 9 h 49 m 28 sec
Reputation Power: 62
Never mind what the database says it is. In your script, does Response.Write(strstatus) return "on"?

MK

Reply With Quote
  #9  
Old August 27th, 2004, 05:40 AM
selwonk's Avatar
selwonk selwonk is offline
Contributing User
ASP Free Frequenter (2500 - 2999 posts)
 
Join Date: Jun 2004
Posts: 2,942 selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 6 Days 9 h 49 m 28 sec
Reputation Power: 62
This works:
Code:
<script>
var newwindow;
function notice(url)
{
newwindow=window.open(url,'name','height=260,width   =290');
if (window.focus) {newwindow.focus()}
}
</script>
<script language="JavaScript">notice('pop1.html');</script>
This means the JavaScript is ok and either a) the condition to call the routine is not being met or b) you have some other coding issue. Do you get a JavaScript error in the bottom left hand status bar?

MK

Reply With Quote
  #10  
Old August 27th, 2004, 05:42 AM
programerneil programerneil is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Aug 2004
Posts: 14 programerneil User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 m 28 sec
Reputation Power: 0
i get know errors at the boottom status bar!

Reply With Quote
  #11  
Old August 27th, 2004, 05:44 AM
programerneil programerneil is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Aug 2004
Posts: 14 programerneil User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 m 28 sec
Reputation Power: 0
that code works but how do i make it work with the strstatus?

Reply With Quote
  #12  
Old August 27th, 2004, 06:02 AM
selwonk's Avatar
selwonk selwonk is offline
Contributing User
ASP Free Frequenter (2500 - 2999 posts)
 
Join Date: Jun 2004
Posts: 2,942 selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 6 Days 9 h 49 m 28 sec
Reputation Power: 62
Hi

Do you mean that Response.Write(strstatus) returns "on"?

MK

Reply With Quote
  #13  
Old August 27th, 2004, 09:37 AM
programerneil programerneil is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Aug 2004
Posts: 14 programerneil User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 m 28 sec
Reputation Power: 0
Angry

no it does nothing

Reply With Quote
  #14  
Old August 27th, 2004, 09:47 AM
selwonk's Avatar
selwonk selwonk is offline
Contributing User
ASP Free Frequenter (2500 - 2999 posts)
 
Join Date: Jun 2004
Posts: 2,942 selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 6 Days 9 h 49 m 28 sec
Reputation Power: 62
There ya go then... You need to find out why, fix it and your notice() script will work

MK

Reply With Quote
  #15  
Old August 27th, 2004, 09:50 AM
selwonk's Avatar
selwonk selwonk is offline
Contributing User
ASP Free Frequenter (2500 - 2999 posts)
 
Join Date: Jun 2004
Posts: 2,942 selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 6 Days 9 h 49 m 28 sec
Reputation Power: 62
What's this bit for?
Code:
strstatus = rstnotice("status")
If Len(strstatus) > 0 then
Do while Instr(1, strstatus, "_")
strstatus = replace(status, "_", " ")
loop
MK

Reply With Quote
Reply

Viewing: ASP Free ForumsOtherProgramming Help > Asp Help for notice popup


Thread Tools  Search this Thread