Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

ASP.NET Forum


You are currently viewing our ASP.NET Forum as a guest. Please register to participate.
Login



Closed Thread
Calling JavaScript Alert in ASP
Old 05-26-2006, 05:42 PM Calling JavaScript Alert in ASP
Super Talker

Posts: 116
Trades: 0
Hi all,

I just finished my Send to a Friend form in ASP and the code that sends the email and it's working really well.

There's just one finishing touch I want to make.

After I send off the email, I have the ASP code redirect the user back to the original article from which they referred to their friend.

For example, this original URL was pushed through from the article page to the "send to friend" form via a hidden field with http_referer in it. I referenced this hidden field to a variable that is sent in the email (so the friend has the URL to being refered). After the email sends successfully, I then use this variable to redirect the user back to the orginal article page.

I want to let the user know their email was successfully send via a javascript alert. The code to create the email is entirely written in ASP.

Is there a way to call a javascript alert in ASP?

Thanks
Donna
DonnaZ is offline
View Public Profile
 
 
Register now for full access!
Old 05-26-2006, 09:44 PM Re: Calling JavaScript Alert in ASP
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,517
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
not directly

all you can do is to write the code for the alert into the page.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is online now
View Public Profile Visit chrishirst's homepage!
 
Old 05-27-2006, 11:47 AM Re: Calling JavaScript Alert in ASP
Super Talker

Posts: 116
Trades: 0
Thanks.
DonnaZ is offline
View Public Profile
 
Old 05-27-2006, 04:20 PM Re: Calling JavaScript Alert in ASP
ADAM Web Design's Avatar
Canadastaninianite

Posts: 5,938
Name: Adam for web page design, not program
Location: Toronto, Ontario, Canada
Trades: 0
Code:
Response.Write "<script type=""text/javascript"">" & vbCrLf
Response.Write "<!--" & vbCrLf
Response.Write "alert ('Your Email Has Been Sent');" & vbCrLf
Response.Write "-->" & VbCrLf
Response.Write "</script>" & vbCrLf
As long as you insert that after the <head> tag and before the </body> tag, you're good to go.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
(my blog)


Please login or register to view this content. Registration is FREE
(with proof)
ADAM Web Design is offline
View Public Profile Visit ADAM Web Design's homepage!
 
Closed Thread     « Reply to Calling JavaScript Alert in ASP
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.12679 seconds with 12 queries