Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...Calling a javascript alert from code behind in dotnetnuke 04.9.3Calling a javascript alert from code behind in dotnetnuke 04.9.3
Previous
 
Next
New Post
12/23/2010 2:33 AM
 
Hi,

At the time of comparing 2 values in a function  i have to show an alert when a value is greaterthan other -  so i tried to call a java script alert using the following way

Dim result As String = "Are you sure you want to continue"
Dim sReturn as String = "<script language='javascript'> + result + "');</script>"

Page.ClientScript.RegisterClientScriptBlock(Me.GetType(), "Alert", sReturn)

Page.ClientScript.RegisterStartupScript(Me.GetType(), "Alert"," + result  + "');", True)

I tried by using both the methods but cannot see the alert.  Is there anything i need to register the client script in the page load. if so how to register the script.

Could you help me in working this javascript alert .

Note :- This function is not in page load.

Its not showing the alert in the forum.....
 
New Post
12/23/2010 9:34 AM
 
the dotnetnuke.web.ui.utilities class has a GetClientAlert method that you could use.

Buy the new Professional DNN7: Open Source .NET CMS Platform book Amazon US
 
New Post
12/24/2010 1:06 AM
 

Hi Thanks for the reply... but i couldn't find the function GetClientAlert but i found only this

DotnetNuke.Ui.Utilities.ClientAPI.RegisterStartUpScript - this also not working

 
New Post
12/24/2010 2:11 AM
 
my apologies, that method was only added in 5.0. You can use the method you found instead, heres an example http://www.dotnetnuke.com/Community/Forums/tabid/795/forumid/111/threadid/299671/scope/posts/Default.aspx

Buy the new Professional DNN7: Open Source .NET CMS Platform book Amazon US
 
New Post
3/19/2012 12:35 PM
 
Is there a GetClientAlert method for DNN 6.+? Thanks
 
Previous
 
Next
HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...Calling a javascript alert from code behind in dotnetnuke 04.9.3Calling a javascript alert from code behind in dotnetnuke 04.9.3


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out