RSS

A Message Board, Guestbook, or Poll hosted for your website.
Iron Speed Technical Forums

Register Login New Posts Chat
 
Iron Speed > Forums > Using Iron Speed Designer V3.X > Error Message using RegisterJScriptAlert not showing
 
Username:  
Password:  
 
   
 


Thread Tools Search This Thread 
Reply
 
Author Comment
 
kshitijd
Registered: 07/18/06
Posts: 27

    07/28/06 at 10:56 AMReply with quote#1

I have an EditCustomerRecord page that has Permanent Address and a Mailing Address. When the user unchecks the "Same As Permanent Address" check box, it should prompt the user to enter in the mailing addres when the user tries to save the data.

 

I added this using the code telescope.

Code:
           /// <summary>
        ///     The standard event handler for ApplicationEvent events.
        /// </summary>
        /// <seealso cref="T:BaseClasses.IEventProducer" />
        /// <seealso cref="T:BaseClasses.ApplicationEventArgs" />            
        public override void OnApplicationEvent(ApplicationEventArgs args)
        {
            if (ApplicationEventArgs.EventTypes.UpdateData == args.EventType)
            {
                if (!this.Same_As_Permanent_Addr.Checked)
                {
                    if ((MailingZipCode.Text.Length > 0) &amp;&amp; (MailingAddress.Text.Length > 0)
                        &amp;&amp; (MailingCity.Text.Length > 0) &amp;&amp; (MailingState.SelectedIndex > 0))
                    {
                        base.OnApplicationEvent(args);
                    }
                    else
                    {
                        MiscUtils.RegisterJScriptAlert(this, "CANNOT_SAVE_MESSAGE", "Please fill out the Mailing Address.");
                        return;
                    }
                }
            }
        }

 

Initially I had the page set to redirect to the same page with a querystring parameter, and I thought that was causing the problem. I changed that and said stay on the same page. Even after doing I cannot get the error message to display. What is it that I need to do more to get the error message to display and stay on the same page?

 

Thanks

~KD

baljit
Registered: 10/22/08
Posts: 27

    07/08/09 at 08:36 AMReply with quote#2

Hello KD,

I saw this post about the RegisterJScriptAlert. Were you able to resolve this issue? I too have this issue and don't know how to resolve it.

Baljit
JimiJ
Avatar / Picture

MVP Developer
Registered: 03/31/05
Posts: 4,028

    12/23/09 at 12:41 AMReply with quote#3

OnApplicationEvent is no longer applicable on ISD versions 4 and up.

Also if you are using ISD 4X to 5.0, you can't use RegisterJScriptAlert if SmoothPanelUpdate is on and these are the recommended scripts:
Code:
 ClientScript.RegisterStartupScript(Me.GetType(), "clientscript02", "<script>alert('Your message here!')</script>")

ScriptManager.RegisterStartupScript(Me.Page, Page.GetType(), "ErrorMsg", "alert(" & BaseClasses.Web.AspxTextWriter.CreateJScriptStringLiteral(ex.Message) & ");", True)


Jimi J
 

__________________
Jaime Jegonia
JimiTron Software
JimiTron.Net | JimiTron.Com
Previous Thread | Next Thread
Reply

  Bookmarks  
Digg Diggdel.icio.us del.icio.usStumbleUpon StumbleUponGoogle Google

Download Iron Speed Designer

Privacy Statement