HTML button - button attributes

I have a 'submit' button on my form that is using the 'HTML' button style.
I added the following to the 'button attributes' section:
onclick="doSave();"
When I view my source, I see 2 'onclicks' which makes the 2nd onclick get ignored.
<input type="BUTTON" value="Submit" onClick="javascript:this.disabled=true; doSubmit('SUBMIT');" onclick="doSave();">
What do I need to do to get this formatted correctly?

Bob,
Do you need it to do the items in the first on click also?
You can change the button attributes so that:
Target is a: URL
URL Target: javascript:doSave();
does that work for you?
Message was edited by:
TheJosh
(fixed an error)

Similar Messages

  • HTML Button use an image instead of Text

    I have an HTML button in its own region called A_BUTTON, its current Button display attributes are
    sytle: HTML Button
    Attributes: name="A" class="where_clause_button"
    what it does is i use a dynamic action based off the where_clause_button jquery selector and use javascript to update a hidden field. I would now like to use the Oracle Logo for example as the image of the button instead of using a text label for it. I tried adding to the Attributes src="http://www.oracleimg.com/admin/images/ocom/hp/oralogo_small.gif". When i run it the button still works the same as before but without the image and retains its Text Label, in this case its A.
    the html it generates is for the button during runtime is:
    <input type="button" src="http://www.oracleimg.com/admin/images/ocom/hp/oralogo_small.gif" class="where_clause_button" name="A" onclick="apex.submit('');" id="A_BUTTON" value="A">
    How do i retain the functionality of this button but make it an image button?
    Edited by: Brobot on Feb 9, 2011 5:22 PM

    <li>Use a template based button and customize the template with the image.
    <li>Add appropriate JS code to the URL section(prefixing with "javascript:" ) and optionally add a some ID attribute for easy JS access.

  • Jquery + json generate html buttons with condition

    Hi all,
    My need is to generate buttons with conditions described in json. Help me please, I’m newbie.
    Here is my json code (it is valid, but does not work with html code below) :
        "Caption": "Module caption",
        "IconsDirectory": "C://Images/",
        "Buttons": [
                "Conditions": [
                        "ConditionText": "1 == 1",
                        "ButtonText": "Text1",
                        "Visible": true,
                        "Colors": {
                            "FontColor": "#FFFFFF",
                            "BGColor": "#00FF00"
                        "Size": {
                            "Width": 200,
                            "Height": 50
                        "Icon": {
                            "FileName": "Smile.png",
                            "Width": 16,
                            "Height": 16
                        "Url": {
                            "UrlAddress": "http://www.google.com",
                            "OpenNewWindow": true
                        "JavaScriptAction": {
                            "Text": "alert('ok');"
                        "ConditionText": "2 == 2",
                        "ButtonText": "Text2",
                        "Visible": true,
                        "Colors": {
                            "FontColor": "#FFFFFF",
                            "BGColor": "#00FF00"
                        "Size": {
                            "Width": 200,
                            "Height": 50
                        "Icon": {
                            "FileName": "Smile.png",
                            "Width": 16,
                            "Height": 16
                        "Url": {
                            "UrlAddress": "http://www.google.com",
                            "OpenNewWindow": true
                        "JavaScriptAction": {
                            "Text": "alert('ok');"
    html code:
    <html>
    <head>
    <title>SMButtons</title>
    [removed][removed]
    [removed]        
    //When document loaded.
    $(document).ready(function(){  
    // Get data from file as JSON
                $.getJSON('weekendtask.json', function(data) {
            var buttons = data.Buttons;
               $.each(buttons, function(key, val)
                        $('<li><input type="button" value="'+ val.ButtonText +'"/></li>').appendTo('#ulObj');
       [removed]
    </head>
    <body>
    <br>
    <br>
    <div>
    <ul id='ulObj'>
    <li>1</li>
    <li>2</li>
    <li>3</li>
    </ul>
    </div>
    </body>
    </html>
    Also I would like to show here my working code (generating html buttons from json without condition).
    json code (it works) :
        "Caption": "Module caption",
        "IconsDirectory": "C://Images/",
        "Buttons": [
                "TText": "google",
                "JavaScriptAction": "alert('google')"
                "TText": "microsoft",
                "JavaScriptAction": "alert('microsoft')"
                "TText": "yahoo",
                "JavaScriptAction": "alert('yahoo')"
    html code (it works) :
    <html>
    <head>
    <title>SMButtons</title>
    <script src="jquery/jquery-1.4.2.js"></script>
    <script type="text/javascript">                 
    //When document loaded.
    $(document).ready(function(){  
    // Get data from file as JSON
                $.getJSON('Module.json', function(data) {
                // Set json data from file to variable 'persons'
        var buttons = data.Buttons;
        var icondir = data.IconsDirectory;
        // For each item of variable person append to ul list
               $.each(buttons, function(key, val)
                        //$("<li><input type='button' onClick='"+ val.Url +"' value='"+ val.Text +"'/></li>").appendTo('#aaa');
    //$("<li><input type='button' style='"+ val.Style +"' onClick='"+ val.Url +"' value='"+ val.Text +"'/></li>").appendTo('#aaa');
    //$("<li><input type='button' value='"+ val.TText +"'/></li>").appendTo('#bbb');
                        //style="height: 25px; width: 100px"
                        //$('<li><input type="button" onClick="'+ val.action +'" value="'+ val.Text +'"/></li>').appendTo('#aaa');
                        $('<li><input type="button" onClick="'+ val.JavaScriptAction +'" value="'+ val.TText +'"/></li>').appendTo('#ulObj');
        //var knop = data.Knop;
        // For each item of variable person append to ul list
               //$.each(buttons, function(key, val)
                        //$("<li><input type='button' onClick='"+ val.Url +"' value='"+ val.Text +"'/></li>").appendTo('#aaa');
    //$("<li><input type='button' style='"+ val.Style +"' onClick='"+ val.Url +"' value='"+ val.Text +"'/></li>").appendTo('#bbb');
                        //style="height: 25px; width: 100px"
                        //$('<li><input type="button" onClick="'+ val.action +'" value="'+ val.Text +'"/></li>').appendTo('#aaa');
                        //$('<li><input type="button" onClick="'+ val.action +'" value="'+ val.Text +'"/></li>').appendTo('#aaa');
       </script>
    </head>
    <body>
    <br>
    <br>
    <div>
    <ul id='ulObj'>
    <li>1</li>
    </ul>
    </div>
    <br>
    <div>
    <ul id='aaa'>
    <!--<li>1</li>-->
    </ul>
    </div>
    <!--<button type="submit" style="height: 95px; width: 550px"> </button>-->
    <!--background: url('img/submit_button.jpg'); background-position: center; background-repeat: no-repeat;  background-color:Transparent;-->
    <div>
    <ul id='bbb'>
    <!--<li><img src="img/submit_button.jpg"/></li>-->
    <!--<li>Button caption</li>-->
    </ul>
    </div>
    </body>
    </html>

    What you are saying makes great sense. It's just the mechanics behind what you've said that I'm unclear about.
    <p>
    Are you saying to create another button within the same region with the same attributes/position, so they overlay each other? Then set the conditions on both buttons?
    <p>
    If I understand the above correctly, then how do I set the conditions? I guess I'm asking where do I place the SQL statement and how does the results relate to the button conditions?
    <p>
    Thanks for the help,
    David

  • Html Button Disable/ Template button?

    I am certain that there is a post out here I just cannot find it.
    I have a bunch of users who are remote and have various connection speeds.
    They get inpatient and click my Template Based button multiple times
    Causing multple entries
    I have changed my button to a HTML button and use the
    Optional URL Redirect
    javascript:{this.disabled=true;doSubmit('Create');}
    to disable
    This works but the button is "A html button"
    IS there a way to have the HTML button look like my Template Buttons?
    My background:
    Don't sleep conferences
    Not a Web developer "I know how to spelll HTML"
    I have also attempted to create a new button template using #Button_Attribute# substituted for #link# in template but I cannot get the Button to Disable

    You could create an image that looks like the template button is rendered, and create a custom button template using &lt;input type="image" #BUTTON_ATTRIBUTES#...&gt;, specifying src="image_url" alt="image_alt_text" in the Button Attributes.

  • How can i enable the html:text box when clicking the html:button

    Hi,
    i have a text box which is disabled defaultly and i want to enable it when i click on submit button.
    <html:button property="new" value="new">
    <html:text property="name" disabled="true"/>
    how i will enable that text filed? please tell me?
    Thanks,
    swarupa

    try using javascript onclick attribute:
    onclick="document.form.name.disabled=false"
    m

  • How to Suppress HTML Button on WCC Check-in Page

    Hi,
    On the WCC checkin page there is an HTML button. When I attempt to add an asset to DAM, and click the HTML button before initial check-in I get this error
    Unable to execute service DC_CACHE_CHECKIN_NEW and function checkDocRules.
    The error was caused by an internally generated issue. The error has been logged.
    Is there a way to suppress the HTML button? I really have no use for it. Or is this a settings error on me WCC server?
    Thank you,
    Randy

    It's not the function isn't developed. It's just that every object on the front panel has a corresponding object on the block diagram. Attached is an example of how to do it with two buttons.
    By the way, if you've run out of room on your panel, it probably means your interface is too crowded. If that is so, I suggest you add more pages to the tab to make your interface more clear.
    Try to take over the world!
    Attachments:
    stop.vi ‏19 KB

  • HTML button in the eMail notification sent by Workflow

    I have a workflow which send eMail notification to the users. I want to add 2 HTML buttons for approve and reject on this email notification.
    For this I have embedded the following HTML snippet in the advanced properties (Message Body) of the email action in the workflow -
    <!DOCTYPE html><HTML xmlns="http://www.w3.org/TR/REC-html40" xmlns:v = "urn:schemas-microsoft-com:vml" xmlns:o = "urn:schemas-microsoft-com:office:office" xmlns:w = "urn:schemas-microsoft-com:office:word" xmlns:m = "http://schemas.microsoft.com/office/2004/12/omml"><HEAD><TITLE></TITLE> <META content="text/html; charset=us-ascii" http-equiv=Content-Type> <META name=GENERATOR content="MSHTML 10.00.9200.17183"></HEAD> <BODY> <P><IMG style="TEXT-ALLIGN: left" src="../Site%20Assets/abc_icon.png"></P> <P><STRONG>******************************************<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Styled Workflow eMail<BR>******************************************</STRONG></P> <P><STRONG>Full Name: [%Current Item:FullName%]</STRONG></P><FONT color=#0000ff size=2 face=Consolas><FONT color=#0000ff size=2 face=Consolas><FONT color=#0000ff size=2 face=Consolas> <P></FONT></FONT></FONT><INPUT id=btnApprove type=button value=Approve>&nbsp;&nbsp;<INPUT id=btnReject type=button value=Reject></P></BODY></HTML>
    <!DOCTYPE html><HTML xmlns="http://www.w3.org/TR/REC-html40" xmlns:v = "urn:schemas-microsoft-com:vml" xmlns:o = "urn:schemas-microsoft-com:office:office" xmlns:w = "urn:schemas-microsoft-com:office:word"
    xmlns:m = "http://schemas.microsoft.com/office/2004/12/omml"><HEAD><TITLE></TITLE> <META content="text/html; charset=us-ascii" http-equiv=Content-Type> <META name=GENERATOR content="MSHTML 10.00.9200.17183"></HEAD>
    <BODY> <P><IMG style="TEXT-ALLIGN: left" src="../Site%20Assets/abc_icon.png"></P> <P><STRONG>******************************************<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    Styled Workflow eMail<BR>******************************************</STRONG></P> <P><STRONG>Full Name: [%Current Item:FullName%]</STRONG></P><FONT color=#0000ff size=2 face=Consolas><FONT color=#0000ff size=2
    face=Consolas><FONT color=#0000ff size=2 face=Consolas> <P></FONT></FONT></FONT><INPUT id=btnApprove type=button value=Approve>&nbsp;&nbsp;<INPUT id=btnReject type=button value=Reject></P></BODY></HTML>
    However when the user receives the mail, the buttons appear as plain text. Moreover the images are also missing.
    Am I  missing any specific configuration? Is there anything more that needs to be done to render a HTML button and images in an email generated from a workflow?
    I would appreciate, if anyone could please help me resolve this issue.

    Hi Arghadip Kar,
    Im glad you liked my name. )
    Anyhoo, you are correct. A Task is used. I checked in SWI1 and the task associated with the mail is TS90000101. (not a ws) Does this help at all?
    In the Business Process, it is the part where the system informs a Training coordinator that a training request by an employee have been approved by his/her manager.
    Do I still check the FM below or are there any other way given the info above?
    Thank you!
    Olekan

  • JSF h:commandButton which renders as an html button rather then input

    I've been struggling to find a way to create a jsf command button that will render as a <button>. The reason I want to do this is so that I can include content inside my button, as the html <button> tag allows. Is there a way to do this, or is this in plan? I am currently using jsf 1.2.

    J-M_T-D wrote:
    To further clarify, I want a <button> tag, and NOT an <input> tag.I did this by creating a "custom component" which really was the existing HtmlCommandButton as the component and a new renderer which outputs the button tag. (I am using Facelets so no need for a JSP tag.)

  • How To use window.print() into Button Attributes

    hi,
    I want to print a report using an print button.so i am using window.print() function into Button Attributes .But Print pop up screen not pop up . How To use window.print() into Button Attributes      .
    Thanks
    Manoj

    dear hari
    "Set button target as URL and put following js as URL Target
    javascript:window.print();"
    Will this be useful to my another thread raised as follows.
    In case, if i am able to generate report as txt (ascii) file instead of doc / pdf and is it possible to send the txt file using host command. I am uable to try since i do not know where to place host command on click &print.
    yours
    dr.s.raghunathan

  • Button Attributes

    Button Attributes Help says the following:
    For buttons based on templates your template will need to include the #BUTTON_ATTRIBUTES# substitution string. You can use this to control tab stops for example:
    tabindex="3"
    Where and how exactly I include the mentioned substitution string to get the tabindex
    working for a button?
    My button templete looks like this:
    &lt;table class="t10Button" cellspacing="0" cellpadding="0" border="0" summary="">
    &lt;tr>
    &lt;td class="t10L">&lt;a href="#LINK#">&lt;img src="#IMAGE_PREFIX#themes/theme_10/button_left.gif" alt="" width="4" height="24" />&lt;/a>&lt;/td>
    &lt;td class="t10C">&lt;a href="#LINK#">#LABEL#&lt;/a>&lt;/td>
    &lt;td class="t10R">&lt;a href="#LINK#">&lt;img src="#IMAGE_PREFIX#themes/theme_10/button_right.gif" width="4" height="24" alt="" />&lt;/a>&lt;/td>
    &lt;/tr>
    &lt;/table>
    Denes Kubicek

    Hi Denes,
    I' paste it here ...
    <br><br>
    <table class="t10Button" cellspacing="0" cellpadding="0" border="0" summary=""><br>
    <tr><br>
    <td class="t10L">&lt;a href="#LINK#"&gt;<img src="#IMAGE_PREFIX#themes/theme_10/button_left.gif" alt="" width="4" height="24" /&gt;&lt;/a&gt;</td><br>
    <td class="t10C">&lt;a #BUTTON_ATTRIBUTES# href="#LINK#">#LABEL#&lt;/a&gt;</td><br>
    <td class="t10R">&lt;a href="#LINK#"&gt;<img src="#IMAGE_PREFIX#themes/theme_10/button_right.gif" width="4" height="24" alt="" />&lt;/a&gt;</td><br>
    </tr><br>
    </table><br>
    does this work ...?
    -Carsten
    Message was edited by:
    carstenczarski

  • Html buttons and event handlers

    There are three html buttons, each of them takes the user to a particular page once selected. I know an onClick method as follows but what comes after this??:
    out.println("<P ALIGN=CENTER ><INPUT TYPE=submit value=ENTER onClick...............>");
    If anyone knows let me know.
    thanks in advance,
    raj

    onClick = 'functionName(argument1, argument2,...)'
    typically you define a method that conducts necessary work(if any) and then loads a new page.

  • Passing a variable from an html button into flash....

    I want to click an html button and send a variable to a swf
    file that opens next. I want this variable to go into flash
    depending on what the user clicked. I want flash to go to the
    english part or to the spanish part of my swf depending on what
    this variable is.
    How can I do this? Can anyone help me?
    Thanks!!!!
    Brenda Sanchez.

    http://www.noscope.com/journal/2003/12/query_string

  • How is it possible to insert the .html button into the header?

    Hello everybody!
    My site is [link removed - promotion is not permitted here] But I have one more site as well. I'm a newbie still in this matter and learn everything by myself, so, I need some help, guys. I would like to create the same header like in my site and insert the html button in the picture. Should I use Photoshop for this purpose or another tools? And it would be nice also to make links in the infographics as well. How should I be?
    Thanks. Appreciate your help

    Just use JavaScript!
    http://www.crowderassoc.com/javascript/backbutton.html

  • Struts html:button and java script problem

    Given code gives an error "equal symbol expected" what may be the error
    <html:button property="back1"
                   onclick="forwardToPreviousPage('<%=(String)session.getAttribute("projectId")%>')">Back</html:button>

    Try changing onclick to onClick and try...
    regards
    shanu

  • Use a html:button as a Link ???

    Hi,
    i work on a little projekt with JSP(structs) and my JSP knowledge is not good :/
    My Problem is that i have a page with Links <html:link> but i want to use buttons as Link.
    <html:button property="test" ....> Testbutton </html:button>
    i create an action (Test.do) that open a new site but where do i write this action in die Tag ???
    onclick will not work :(
    bye Taki

    hi
    u want to provide a link by using button, then use like this
    location.href ="..path.."
    -Hari.

Maybe you are looking for

  • Keep being asked to sign in apple id

    Recently downloaded a song while in the car (i wasn't driving, don't worry). i had some bad 3G service so once i bought it, it didn't download all the way and just kinda froze. i got home later that night, opened my phone, and it asked me to sign int

  • Structure of folders in 'original'

    Hello, as I import old photos in my iphoto-library some folders will be placed in the right folder in original (e.g. year 2002) but some of them will be placed in 2007 although they were taken earlier. The EXIF-Data of the photos is correct. What mig

  • Strange Error - 5005: Unknown error optimizing byte code.

    Hello flashcoders, I am facing strange problem since long time. This error code even doesn't exist in the list of error codes. This is the exact error I am getting while I compile the FLA from flash CS3. Location : , Line 1 Description : 5005: Unknow

  • SQL Server 2005 - CDC problem - real / float type

    Dear Sirs, I test the functionality of CDC in Business Objects Data Services 4.0 (14.0.1.245). I am using SQL Server 2005 Developer Edition. I made all the steps in accordance with the Designer Guide. I see a table with the changes, I can change the

  • Help needed with a method

    I have a project that tunes to a radio station depending on the user input. There is a method in one of my classes, FMTuner.java, that contains the tune() method. Already instantiated is a private ArrayList of FMStation object references named statio