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 Loyal (3000 - 3499 posts)
 
Join Date: Jun 2004
Posts: 3,067 selwonk User rank is First Lieutenant (10000 - 20000 Reputation Level)selwonk User rank is First Lieutenant (10000 - 20000 Reputation Level)selwonk User rank is First Lieutenant (10000 - 20000 Reputation Level)selwonk User rank is First Lieutenant (10000 - 20000 Reputation Level)selwonk User rank is First Lieutenant (10000 - 20000 Reputation Level)selwonk User rank is First Lieutenant (10000 - 20000 Reputation Level)selwonk User rank is First Lieutenant (10000 - 20000 Reputation Level)selwonk User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 1 Week 8 h 28 m 37 sec
Reputation Power: 185
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 Loyal (3000 - 3499 posts)
 
Join Date: Jun 2004
Posts: 3,067 selwonk User rank is First Lieutenant (10000 - 20000 Reputation Level)selwonk User rank is First Lieutenant (10000 - 20000 Reputation Level)selwonk User rank is First Lieutenant (10000 - 20000 Reputation Level)selwonk User rank is First Lieutenant (10000 - 20000 Reputation Level)selwonk User rank is First Lieutenant (10000 - 20000 Reputation Level)selwonk User rank is First Lieutenant (10000 - 20000 Reputation Level)selwonk User rank is First Lieutenant (10000 - 20000 Reputation Level)selwonk User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 1 Week 8 h 28 m 37 sec
Reputation Power: 185
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 Loyal (3000 - 3499 posts)
 
Join Date: Jun 2004
Posts: 3,067 selwonk User rank is First Lieutenant (10000 - 20000 Reputation Level)selwonk User rank is First Lieutenant (10000 - 20000 Reputation Level)selwonk User rank is First Lieutenant (10000 - 20000 Reputation Level)selwonk User rank is First Lieutenant (10000 - 20000 Reputation Level)selwonk User rank is First Lieutenant (10000 - 20000 Reputation Level)selwonk User rank is First Lieutenant (10000 - 20000 Reputation Level)selwonk User rank is First Lieutenant (10000 - 20000 Reputation Level)selwonk User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 1 Week 8 h 28 m 37 sec
Reputation Power: 185
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 Loyal (3000 - 3499 posts)
 
Join Date: Jun 2004
Posts: 3,067 selwonk User rank is First Lieutenant (10000 - 20000 Reputation Level)selwonk User rank is First Lieutenant (10000 - 20000 Reputation Level)selwonk User rank is First Lieutenant (10000 - 20000 Reputation Level)selwonk User rank is First Lieutenant (10000 - 20000 Reputation Level)selwonk User rank is First Lieutenant (10000 - 20000 Reputation Level)selwonk User rank is First Lieutenant (10000 - 20000 Reputation Level)selwonk User rank is First Lieutenant (10000 - 20000 Reputation Level)selwonk User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 1 Week 8 h 28 m 37 sec
Reputation Power: 185
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 Loyal (3000 - 3499 posts)
 
Join Date: Jun 2004
Posts: 3,067 selwonk User rank is First Lieutenant (10000 - 20000 Reputation Level)selwonk User rank is First Lieutenant (10000 - 20000 Reputation Level)selwonk User rank is First Lieutenant (10000 - 20000 Reputation Level)selwonk User rank is First Lieutenant (10000 - 20000 Reputation Level)selwonk User rank is First Lieutenant (10000 - 20000 Reputation Level)selwonk User rank is First Lieutenant (10000 - 20000 Reputation Level)selwonk User rank is First Lieutenant (10000 - 20000 Reputation Level)selwonk User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 1 Week 8 h 28 m 37 sec
Reputation Power: 185
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 Loyal (3000 - 3499 posts)
 
Join Date: Jun 2004
Posts: 3,067 selwonk User rank is First Lieutenant (10000 - 20000 Reputation Level)selwonk User rank is First Lieutenant (10000 - 20000 Reputation Level)selwonk User rank is First Lieutenant (10000 - 20000 Reputation Level)selwonk User rank is First Lieutenant (10000 - 20000 Reputation Level)selwonk User rank is First Lieutenant (10000 - 20000 Reputation Level)selwonk User rank is First Lieutenant (10000 - 20000 Reputation Level)selwonk User rank is First Lieutenant (10000 - 20000 Reputation Level)selwonk User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 1 Week 8 h 28 m 37 sec
Reputation Power: 185
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 Loyal (3000 - 3499 posts)
 
Join Date: Jun 2004
Posts: 3,067 selwonk User rank is First Lieutenant (10000 - 20000 Reputation Level)selwonk User rank is First Lieutenant (10000 - 20000 Reputation Level)selwonk User rank is First Lieutenant (10000 - 20000 Reputation Level)selwonk User rank is First Lieutenant (10000 - 20000 Reputation Level)selwonk User rank is First Lieutenant (10000 - 20000 Reputation Level)selwonk User rank is First Lieutenant (10000 - 20000 Reputation Level)selwonk User rank is First Lieutenant (10000 - 20000 Reputation Level)selwonk User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 1 Week 8 h 28 m 37 sec
Reputation Power: 185
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 Loyal (3000 - 3499 posts)
 
Join Date: Jun 2004
Posts: 3,067 selwonk User rank is First Lieutenant (10000 - 20000 Reputation Level)selwonk User rank is First Lieutenant (10000 - 20000 Reputation Level)selwonk User rank is First Lieutenant (10000 - 20000 Reputation Level)selwonk User rank is First Lieutenant (10000 - 20000 Reputation Level)selwonk User rank is First Lieutenant (10000 - 20000 Reputation Level)selwonk User rank is First Lieutenant (10000 - 20000 Reputation Level)selwonk User rank is First Lieutenant (10000 - 20000 Reputation Level)selwonk User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 1 Week 8 h 28 m 37 sec
Reputation Power: 185
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 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump





 Free IT White Papers!
 
Create the Optimal Architecture for your Critical Applications
Warburton's the largest independently owned bakery in the UK faced a number of difficult challenges in providing the most robust yet efficient IT infrastructure for their organization's success. IBM's services combined with their xSeries servers created the perfect platform for their SAP environment with sufficient flexibility, and did so in very time effective fashion.

 
Five Best Practices for Deploying a Successful Service-Oriented Architecture
This white paper describes the benefits you can expect with SOA, and how IBM can help take your business there.

 
Gartner Magic Quadrant for Application Delivery Controllers
Gartner summarizes its view on Application Delivery Controllers, evaluates strengths and weaknesses of solutions, and provides Magic Quadrant reporting for a quick comparison across all vendors. Learn from Gartner how you can benefit from an all-in-one device like Citrix NetScaler that delivers the highest levels of availability, performance and security.

 
Knowledge is Power
What you don't know can hurt you, and is likely costing you money and increasing your security risks during an era of scarce resources. This white paper proposes six key strategies that enterprise security managers can use to improve their network defense posture.

 
Rationalizing the Multi-Tool Environment
The rationalized multi-tool approach is flexible, scalable and cost effective. It provides the necessary input to the IT service management business processes. It preserves prior investments in monitoring tools, empowers technologists to select the best tools with which to do their jobs, and enhances effective response to incidents.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2010 by Developer Shed. All rights reserved. DS Cluster 2 Hosted by Hostway
For more Enterprise Application Development news, visit eWeek