How to add the style of java script?

I would add some kind of alert style to this java script so that if 'required' fields are not informed or selected when the form is submitted, this part of the form is alerted with a red star like that, *

I put one of the fields below with the relevant java script. Can someone please help me achieve this?


< select name = "figure" class = "productButton" id = "figure" >

< option value = "0" > - Select model - < / option >

< option value = '7031' > Tropical Green Granite with bronze figurine sacred heart as on the photo (& pound; 7031) < / option >

< option value = '5216' > Tropical Green Granite with bronze effect figure Sacred Heart (& pound; 5216) < / option >

< option value = '5216' > Tropical Green Granite with figurine restored MF122 (& pound; 5216) < / option >

< / select >


<!-VALIDATE-> ORDER FORM

< script type = "text/javascript" >

<!--

function RequiredFormFields() {}

inform the customer to provide choices of figurine

var model = document.forms.product.figurine.value;

If (document.forms.product.figurine.selectedIndex == 0)

{

Alert ("Please indicate choice of miniature");

Returns false;

}

} / / end of function

->

< /script >


OK, it's a bit more complicated but here go us:




Test



    
    

Characters remaining:

You cannot type anything beyond the characters. Note If you select the first entry in the drop-down list, nothing happens? Because the number of characters of registration exceeds the character max relies on its own

--

Kenneth Kawamoto

http://www.materiaprima.co.UK/

Tags: Dreamweaver

Similar Questions

  • How to add the document level java script to the document via API?

    Hello

    Can someone tell me how to add a document level java script with pdf document?

    Thank you

    Amol

    Here is a link to the JavaScript documentation for the doc.addScript method: http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/JS_API_AcroJS.88.440.html

  • How to get some of the styles applied using script?

    Hi all

    I need to know how to get some styles applied using scripts ID. I don't have a lot of experience in InDesign so need help.

    Here is a screenshot with sample text with styles of such applied and highlighted.

    screenshot.png

    I need to know what the texts in my document have these styles applied as all caps, Baker pointed out, Subscript and Superscript, etc..

    Help, please.

    Thank you!

    Get in shape and make the selection, then run the script

    Examine the file for the properties you want.

    Pretty easy

  • How to add the asterisk (*) next to the label of the element

    Hello

    Can someone suggest me how to add the asterisk (*) or (∞) symbol next to the label of the element in the apex oracle 4.2.2.

    Ex: -.

    1 County IN

    2 County * IN

    Thank you and best regards,

    Ibrahim Sayyed.

    Hello

    Do tag is obsolete and not supported in HTML5

    http://www.w3schools.com/tags/tag_font.asp

    Use for example duration and styles

    *
    

    Kind regards

    Jari

  • How to add the option in the SelectItem during execution

    Hello
    Can anyone help me please with this use case?

    I have a list set to the managed bean as below. I want to add new LOV in list (DROP DOWN 2) "ZZZ" based on the value selected in the DROP DOWN 1 on the same page. So that particular one value selected in the DROP DOWN 1, I want to have this new LOV displayed in the DROP DOWN 2. I'm doing it through ValuchangeListener, but I'm not able to find how to add the LOV. Help, please.



    USER INTERFACE
    <!-- DROP DOWN 1 -->
    <af:selectOneChoice label="Order Type" id="soc2" required="true"
                                            validator="#{lovManagedBean.orderTypeValidator}"
                                            binding="#{userAuthentication.orderType}"
                                            autoSubmit="true"
                                            valueChangeListener="#{lovManagedBean.orderTypeValueChangeListener}">                    
                          <f:selectItems id="si2" value="#{lovManagedBean.orderTypeItems}"/>
    </af:selectOneChoice>
    <!-- DROP DOWN 2 -->
    <af:selectOneChoice label="Request Type" id="soc1" required="true"
                                            validator="#{lovManagedBean.requestTypeValidator}"
                                            binding="#{userAuthentication.requestType}">
                                          
                                           
                          <f:selectItems id="si1" value="#{lovManagedBean.requestTypeItems}" />
    </af:selectOneChoice>
    Managed Bean code
      public List<SelectItem> getRequestTypeItems() {
        List<SelectItem> list = new ArrayList<SelectItem>();
    
        list.add(new SelectItem("XXX","XXX"));
        list.add(new SelectItem("YYY","YYY"));
       
       
        this.requestTypeItems = list;
         return list;
      }
    
      public void orderTypeValueChangeListener(ValueChangeEvent event ) {
          System.out.println("+++ Calling LOVManagedBean.orderTypeValueChangeListener()");
          System.out.println("Old Value for order type:" + event.getOldValue() );
          System.out.println("New Value for order type:" + event.getNewValue());
          if(event.getNewValue().equals("Time and Expense")){
            //Code to add LOV in drop down
          }
              
        
      }

    You could make it according to the following example:

    Sample.JSPX:



    xmlns:f = "http://java.sun.com/jsf/core".
    xmlns:h = "http://java.sun.com/jsf/html".
    xmlns:af = "http://xmlns.oracle.com/adf/faces/rich" >




    *
    autoSubmit = 'true' immediate = "true".
    * valueChangeListener = "#{pageFlowScope.SampleBean.onValueChangeListener}" > *.
    **
    **
    **
    *
    * partialTriggers = "soc1."
    * Binding = "#{pageFlowScope.SampleBean.selectOneChoice2}" > *.
    *
    * id = "si3" / > *.
    **



    * SampleBean.Java: *.

    import java.util.ArrayList;
    import java.util.List;

    Import javax.faces.event.ValueChangeEvent;
    Import javax.faces.model.SelectItem;

    Import oracle.adf.view.rich.component.rich.input.RichSelectOneChoice;

    public class SampleBean {}
    Private RichSelectOneChoice selectOneChoice2;

    public SampleBean() {}
    DataSource.Add (new SelectItem ("XXX", "XXX"));
    DataSource.Add (new SelectItem ("YYY", "YYY"));
    System.out.println ("to the constructor");
    }

    Private list datasource = new ArrayList ();
    private SelectItem newSelectItem = new SelectItem ("ZZZ", "ZZZ");

    * public Sub onValueChangeListener (ValueChangeEvent valueChangeEvent) {*}
    * if (valueChangeEvent.getNewValue () .equals ("Add") == true) {*}
    * System.out.println("::: Adding new select item choice"); *
    * datasource.add (newSelectItem); *
    *} else {*}
    * if (valueChangeEvent.getNewValue () .equals ("JustSelect") == true) {*}
    * System.out.println("::: Removing the added select item choice"); *
    * datasource.remove (newSelectItem); *
    * System.out.println (datasource.size ()); *
    *}*
    *}*
    * this.selectOneChoice2.setValue (datasource); *
    *}*

    public void setDatasource (the list data source ) {}
    This.DataSource = data source;
    }

    public getDatasource() {list
    Returns the data source;
    }

    public void setSelectOneChoice2 (RichSelectOneChoice selectOneChoice2) {}
    this.selectOneChoice2 = selectOneChoice2;
    }

    public RichSelectOneChoice getSelectOneChoice2() {}
    Return selectOneChoice2;
    }
    }

    * Ensure that the bean is saved in pageFlowScope.*

    Thank you
    Nini

  • Is it possible to create a new file using the XML via java Script?

    Hello everyone,

    Is it possible to create a new file using the XML via java Script

    • I have xml information that need to use for file name, size.
    • Based on xml file we can create a new file in InDesign with java script?
    • Kindly help me if anyone has an idea about this.

    I use InDesign CS4 on windows 7

    Sample file is attached below.

    Kind regards

    Siva

    <UpdateAd>
    <AdId>3403699</AdId>
    <Width type="mm">91,79</Width>
    <Height type="mm">80,00</Height>
    <ProductionCategory>4</ProductionCategory>
    <BookedCCIColors>sw</BookedCCIColors>
    <WorkFlowType>PDF</WorkFlowType>
    <CustomerNumber>652224</CustomerNumber>
    <CustName1>Erich Prang</CustName1>
    <Description/>
    <Description2>R</Description2>
    <UpdateIns>
    <Titel>RHZ</Titel>
    <Publication>B2</Publication>
    <RunDate>26-07-2011</RunDate>
    <Zone>H30</Zone>
    <KDDATEN>nein</KDDATEN>
    </UpdateIns>
    <WorkflowStep>IR</WorkflowStep>
    <Proof>No</Proof>
    </UpdateAd>
    
    

    xml.png

    Try this:

    var f =File.openDialog ();
    f.open('r');
    var xml = new XML(f.read());
    f.close();
    
    var myDocument = app.documents.add();
    myDocument.documentPreferences.pageHeight = xml..Height+"mm";
    myDocument.documentPreferences.pageWidth = xml..Width+"mm";
    var rect = myDocument.pages[0].rectangles,add();
    rect.geometricBounds = myDocument.pages[0].bounds;
    rect.strokeAlignment = StrokeAlignment.INSIDE_ALIGNMENT;
    rect.strokeColor = myDocument.swatches.item("Black");
    rect.strokeWeight = 1;
    myDocument.save(File(f.path + "/" + xml..AdId + ".indd"))
    

    Substances

  • How to add the warning message when you use the function 'print' in Adobe LiveCycle Designer

    I'm trying to make the pdf document for my business that requires the addition of a warning message while everyone to use the function 'print' page...

    Does anyone know how to add the warning message about LiveCycle Designer

    Also my supervisor mentioned something using "nag" If that sounds at all

    Not in the XML code, in the case of script of pre-publication of the "print" key. If you don't have the script editor to the top on your version of designer, you can press ctrl + shift + F5 to bring it.

  • How to add the column to Adobe flex mxml or actionsctpt mx:DataGrid?

    I have the simple mxml code

    <mx:DataGrid id="DGG"
                
    editable="true">
       
    <mx:dataProvider>
           
    <mx:Object scheduledDate="4/1/2006"/>
       
    </mx:dataProvider>
    </mx:DataGrid>
    <mx:Button id="SetBut"
              
    label="Set Array as Data Provider"
              
    click="SetDP(); AddBut.visible = true;"
              
    x="100.5"
              
    y="164"
              
    width="211"/>
    <mx:Button id="AddBut"
              
    label="Add a column!"
              
    click="AddCol();"
              
    x="100.5"
              
    y="194"
              
    width="211"
              
    visible="false"/>
    <mx:Script>
        <![CDATA[
            import mx.controls.dataGridClasses.DataGridColumn;
            import mx.collections.ArrayCollection;

            [Bindable]
            public var MyAC:ArrayCollection=new ArrayCollection([{scheduledDate: "4/1/2006", homeTeam: "Chester Bucks"}]);

            public function SetDP():void
            {
                DGG.dataProvider=MyAC
            }

            public function AddCol():void
            {
                MyAC.addItem({scheduledDate: "4/5/2007", homeTeam: "Long Valley Hitters", Umpire: "Amanda Hugenkis"});
                DGG.columns.push(new DataGridColumn("Umpire"));
            }
        ]]>
    </mx:Script>

    I want to add lines to my datagrid table how do such thing?

    How to add the column to Adobe flex mxml or actionsctpt mx:DataGrid?

    (You can place this code in a Flash or AIR application - it compiles without error, but will not add any columns =)

    Change this:

    public void SetDP (): void
    {
    DGG.dataProvider = MyAC
    MyAC.addItem ({scheduledDate: "05/04/2007", homeTeam: "long hitters Valley", umpire: "Amanda Hugenkis"});
    }
               
    public void AddCol (): void
    {
    var dgc:DataGridColumn = new DataGridColumn ("Umpire");
    var ca:Array = DGG.columns;
    CA.push (DGC);
    DGG.columns = ca;
    }

    Dany

  • How to add the name of the title of graph in Excel

    Dear friends

    I'm using LabVIEW 8.0.I need how to add the name of the title of graph in Excel.

    You have the report generation tool? If so, the VI of graph Easy Excel has an entry for this.

    If you don't have the Toolbox, then you need to use ActiveX. Please do a search on the use of the ActiveX (there are examples provided with LabVIEW) to control Excel. Also, there are many examples in the thread Excel. NOTE: DON'T POST QUESTIONS IN THIS THREAD.

    In the end, you will need to search for information contained in MSDN.

  • How to change the style of picture frame

    I would like to know how to change the style of table on the front. For the example below, I would like to remove the covered framework of gray color.

    I could not find the table style editor.

    First option: use the table on the classic controls palette, which has no border.

    Second option-

    1. Select the painting tool.
    2. Right click on the border.
    3. With open color dialog box, click the space bar. This toggles the color picker to work on color FG, the background color, or both. It is also described at the bottom of the color picker.
    4. When the two have been selected, you can make the frame completely transparent by selecting the color of T.
  • How to add the full value of two buttons?

    How to add the full value of two buttons (any key) VI and display it in the output text box? I am attaching a sample program, but I know that his evil... Help, please

    Try this

  • How to add the quick launch of the desktop icon bar

    How to add the toolbar launch quick icon on the desktop. I can't find a desktop icon that will drag on

    The following Microsoft KB article

    http://support.Microsoft.com/kb/190355/en-us

    will help you.

    Good bye.

  • How to add the translation application to my email add FB?

    Original title: translation

    I need to know how to ADD the TRANSLATION software to my email add FB? Any help?

    Try here: https://www.facebook.com/help/100117036792266

    Translate the updated Facebook application on the road

  • How to add the Quazip library

    Hi, I want to try to use Quazip. Since I read, I have to add the library before use.

    I downloaded from http://quazip.sourceforge.net/

    How to add the Quazip library? Please explain the step, never add lib before.

    Thank you

    I have change the .pro file

    Like this:

    http://StackOverflow.com/questions/13341234/unzip-files-downloaded-from-Server

  • How to add the profile of lenses?

    How to add the profile of lenses?

    At the bottom of the link, you will find a link for the lens profile downloader. With this tool, you can download the profiles shared by other users.

    Work with lenses profiles in Adobe Photoshop, Lightroom and Camera Raw

Maybe you are looking for