Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6710525
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T08:01:59+00:00 2026-05-26T08:01:59+00:00

My javascript button is not firing. <!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd>

  • 0

My javascript button is not firing.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "

http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    </head>
<body>
    <form id="form1" runat="server">
    <script   type="text/javascript" src="http://connect.facebook.net/en_US/all.js"></script>

    <div>

<script language="javascript" type="text/javascript">
    FB.init({
        appId: '185176734893804',
        status: true,
        cookie: true,
        xfbml: true
    });


   function fb_publish() {
     FB.ui(
       {
         method: 'stream.publish',
         message: document.getElementById('<%=TextBox1.ClientID%>').value,
         attachment: {
           name: 'Friends Gathering',
           caption: 'Healthy living',
           description: (
             'Your welcome to join us on the event'
           ),
           href: 'thomasblog.somee.com'
         },
         action_links: [
           { text: 'document.getElementById('<%=TextBox1.ClientID%>').value', href: 'thomasblog.somee.com' }
         ],
         user_prompt_message: 'Personal message here'
       },
       function(response) {
         if (response && response.post_id) {
           alert('Post was published.');
         } else {
           alert('Post was not published.');
         }
       }
     );  
  }
  </script>
 </div>
    <div>


        Event Date:<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
        <br />
        Event Title:
        <asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
&nbsp;
        <asp:Button ID="Button1" runat="server" onclick="Button1_Click" 
            Text="Add Event" />
        <br />
        <br />
        <asp:Calendar ID="Calendar1" runat="server" BackColor="White" 

            <TitleStyle BackColor="White" BorderColor="Black" BorderWidth="2px" 
                Font-Bold="True" Font-Size="12pt" ForeColor="#333399" />
        </asp:Calendar>
        <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>

         <input type="button" onclick="fb_publish()" 
            value ="Post To facebook Wall" />
    </div>

    </form>
</body>
</html>

Here’s what i am trying. On click of the html button type. fb_publish should fire. This is just my trial.. Not sure if its supposed to work.
In the fb_publish() I have a FB.ui to post the textbox1.text and other event details to FB

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T08:01:59+00:00Added an answer on May 26, 2026 at 8:01 am

    try this, add and id to the input tag and use an event trigger once the document has loaded. and put an alert at the beginning of the function to make sure it’s being called.

     <script> document.ready( function (){
        $('#fb_button').onClick( function(){
    alert('button fired');
        fb_publish();
        }
        }
        </script>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: Google +1 Button not W3C compliant My javascript for google plus fails
In the code below the Save button click is not firing. Any ideas why?
The following simple form with javascript with onclick button does not work in Firefox
I need to callback Javascript function in my code, but not firing. I am
Most of my development life, I have done a JavaScript generated button like so:
I have a javascript backed 'print' button on my webpage where the user can
On the click of a button this Javascript is called: var xmlhttp; function register()
I have some code that dynamically creates a new button through JavaScript that when
I want to get a reference to the Gmail Inbox button in Javascript? I
What is the JavaScript to scroll to the top when a button/link/etc. is clicked?

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.