[LP7] Processing LDML within JS

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[LP7] Processing LDML within JS

Jonas Rosling
Sorry if this kind of question has been posted earlier. Coulden't find
it in the ListSearch though.

I'v got a problem with processing Lasso code within JavaScript code. My
code looks as bellow:

<SCRIPT LANGUAGE="JavaScript">
               
        <!-- Begin
                function verify() {
                var themessage = "You forgot the following files: \n";
                if (document.form.banner[Loop_Count]_.value=="") {
                themessage = themessage + "\n - Banner [Loop_Count]";
                }
                //alert if fields are empty and cancel form submit
                if (themessage == "You forgot the following files: \n") {
                document.form.submit();
                }
                else {
                alert(themessage);
                return false;
                   }
                }
        //  End -->
               
<SCRIPT LANGUAGE="JavaScript">

Anyone able to help out?

Thanks in advance // Jonas



--
------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [LP7] Processing LDML within JS

Douglas Burchard
On May 19, 2005, at 1:31 AM, Jonas Rosling wrote:

> <SCRIPT LANGUAGE="JavaScript">
>
>     <!-- Begin
>         function verify() {
>         var themessage = "You forgot the following files: \n";
>         if (document.form.banner[Loop_Count]_.value=="") {
>         themessage = themessage + "\n - Banner [Loop_Count]";
>         }
>         //alert if fields are empty and cancel form submit
>         if (themessage == "You forgot the following files: \n") {
>         document.form.submit();
>         }
>         else {
>         alert(themessage);
>         return false;
>            }
>         }
>     //  End -->
>
> <SCRIPT LANGUAGE="JavaScript">

Just take out the HTML comment container and replace it with the  
[HTML_Comment] ... [/HTML_Comment ] tags:

<SCRIPT LANGUAGE="JavaScript">

     [HTML_Comment] Begin
         function verify() {
         var themessage = "You forgot the following files: \n";
         if (document.form.banner[Loop_Count]_.value=="") {
         themessage = themessage + "\n - Banner [Loop_Count]";
         }
         //alert if fields are empty and cancel form submit
         if (themessage == "You forgot the following files: \n") {
         document.form.submit();
         }
         else {
         alert(themessage);
         return false;
            }
         }
     //  End [/HTML_Comment]

<SCRIPT LANGUAGE="JavaScript">


--
Douglas Burchard, President
DouglasBurchard.com, Web Applications
15024 NE 66th Street
Redmond, WA  98052, USA

direct: (206) 227-8161
[hidden email]
http://www.douglasburchard.com/


--
------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Loading...