How do I post messages on a Web site

Hey everybody,

I was wondering if there is a way to display messages on the Web site using an application I created. I know it has to do with the API - but I was wondering how would the structure of code for such a task. I have a text input and a button that should display the message in text on a Web site. Is there anyway I can make the app automatically post to a page if I provide a URL?

Thanks in advance!

Hey Jimmy,

This code should you get. He gets a user to input a single textfield and submit its as a POST to a Web page that you provide as a URLRequest and then set up the charger with data and submit it and once it receives a confirmation email that the data has been submitted it will warn you. his code:

package {
    import flash.display.Sprite;
    import flash.events.Event;
    import flash.events.MouseEvent;
    import flash.net.URLLoader;
    import flash.net.URLRequest;
    import flash.net.URLRequestMethod;
    import flash.net.URLVariables;
    import flash.net.navigateToURL;
    import flash.text.TextFieldAutoSize;

    import qnx.ui.buttons.LabelButton;
    import qnx.ui.text.Label;
    import qnx.ui.text.TextInput;

    [SWF(width="1024",height="600",backgroundColor="#CCCCCC",frameRate="30")]
    public class RandomTests extends Sprite
    {
        private var enterText:TextInput;
        private var enterBtn:LabelButton;
        private var statusText:Label;
        private var loader:URLLoader;

        public function RandomTests()
        {
            enterText = new TextInput();
            enterText.setSize(400, 50);

            addChild(enterText);

            enterBtn = new LabelButton();
            enterBtn.label = "Click me to post";
            enterBtn.setPosition(410,0);
            enterBtn.setSize(150,50);
            enterBtn.addEventListener(MouseEvent.CLICK, postData);

            addChild(enterBtn);

            statusText = new Label();
            statusText.autoSize = TextFieldAutoSize.LEFT;
            statusText.setPosition(0,100);
            statusText.format.color = 0xFF0000;

            addChild(statusText);
        }
        public function postData(e:MouseEvent):void
        {
            /*
             * url:String will store the address to your page online
            */
            var url:String = "http://www.rabcore.com/workshop/receivePost.php";
            /*
             * request:URLRequest is what you send with all your variables
             * and data to using the loader class
            */
            var request:URLRequest = new URLRequest(url);
            /*
             * variables:URLVariables will store all the variables you
             * want to submit to the webserver
            */
            var variables:URLVariables = new URLVariables();
            /*
             * for every variable you want to send use the
             * variables.[variable_name] = "string" format
            */
            variables.showMeData = enterText.text;
            /*
             * add the variables to the request
            */
            request.data = variables;
            /*
             * set the method to POST if you are submitting a form
             * type that does not have a URL query string
             * set the GET if you want the variables to show up
             * up as a url query string (e.g. page.php?showMeData=something)
            */
            request.method = URLRequestMethod.POST;

            /*
             * set up the URLLoader object that will send the request to
             * the server
            */
            loader = new URLLoader();
            /*
             * set up a listener to check when the request has been sent and
             * received by the webserver using the Event.COMPLETE event
            */
            loader.addEventListener(Event.COMPLETE, updateStatus);
            /*
             * finally send the request to the webserver
            */
            loader.load(request);
        }
        public function updateStatus(e:Event):void
        {
            statusText.text = "Data has been submitted successfully.";
            /*
             * remove listeners when done
            */
            loader.removeEventListener(Event.COMPLETE, updateStatus);
        }
    }
}

Let me know if you need any explanation. Good luck!

Edit: Comments added to the source code

Tags: BlackBerry Developers

Similar Questions

  • I have 30 messages of my Web site users. How can I (1) Replay at ALL using an email. I can't reply to all allows me to respond to each person INDIVIDUALLY.

    I have 30 messages of my Web site users. How can I (1) Replay at ALL using an email. I can't answer all allows me to respond to each person INDIVIDUALLY, and (2) how can I get all the addresses of electronic mail from senders AFTER I FILTER my mails for a list of emails which can only from my site.

    I get tons of mail from my site, and I need an easier way to manage the workflow. each email open and copy the email address for 50 emails would be a lot of work. I just want 'select' all emails, do a right-click and enter all e-mail addresses from senders.

    And, as stated above... Send an email to all by a RESPONSE/option button.

    I found a solution. Updated my Thunderbird, and the app worked. I used v.11.

  • How will I know how many times I visited a specific Web site?

    I need to know how many times I visited a specific Web site. How can I do in Safari? Thanks much for any help.

    You could try your history unless you delete history after each session.

    Command + Y should open Safari history or in the Safari menu bar, click on: history > view history

    Otherwise, find how many times you have visited a site specific Web is impossible.

  • How to uninstall an application or a Web site?

    original title: uninstall

    Hello... How to uninstall an application or a Web site?... Thank you, Bob

    A Web site?  It's wish, you have a * installed *.

    An application...

    Uninstall or change a program

  • How can I download it from the Web site that was sent to me?

    How can I download it from the web site that was sent to me by Adobe?

    Thank you for mentioning the name of the Adobe application, you are trying to download.

    If its creative Cloud applications, you can check the link below:

    https://helpx.Adobe.com/creative-cloud/help/download-install-app.html

    All other Apps that had bought you using the serial number such as Photoshop Elements or Lightroom 6... etc? You can check the link below:

    Other downloads

  • created a menu in excel and converted to PDF.  How do you charge it to a Web site like godaddy?  Completely new to this!

    created a menu in excel and converted to PDF.  How do you charge it to a Web site like godaddy?  Completely new to this!

    A PDF file is like any other file that you can use on a web site. You can set up a link to the pdf file once you download the PDF file on a site. I heard on the GoDaddy, but really don't know anything about. Your question relates to the use of this site, not PDF as such. More details to help us on how to use on a web site.

  • How can I get the model of web site of the "Safari Lodges can" that is on the Site of the day web page?

    How can I get the model of web site of the "Safari Lodges can" that is on the Site of the day web page?

    Hi George,.

    The site to which you refer does seem to be a template that you can get your hands on, however, I suggest that you contact the owner through their contact us page and see what can be done.

    - Abhishek Maurya

  • How to publish data (messages) on a web page

    I'm looking for a simple POSt the data automatically after it was presented. It is an internal web site for a group of users that is located on a shared network drive. Have looked for tutorials and not much chance for a simple method. Any help will be greatly appreciated.

    Thank you

    Todd

    A simple way, using a server side include.  The include file could be a very simple list like this:

    • announcement 1
    • Ad 2
    • Ad 3

    Then add a server include the statement in the parent page where you want your ad to appear.

    More on SSI:

    http://forums.Adobe.com/message/2112460#2112460

    Nancy O.
    ALT-Web Design & Publishing
    Web | Graphics | Print | Media specialists
    http://ALT-Web.com/
    http://Twitter.com/ALTWEB
    http://ALT-Web.blogspot.com

  • Error message on important Web site

    I get this error message on my login on a website improtatnt. No one can tell me what to do, I reset my Add ons and all this a few times. I need to be on this site, I'm trying to access like yesterday so set some fast permanent would be amazing thank you
    Tyler-

    In the Application Server error ' / '.
    --------------------------------------------------------------------------------

    Runtime error
    Description: An application error occurred on the server. The current settings of error customized for this application prevent the details of the error in the application being viewed remotely (for security reasons). It could, however, be read by browsers running on the local server computer.

    Details: To enable the details of this error message specific either visible on remote machines, please create a tag in a "web.config" configuration file located in the root directory of the current web application. This tag should have its attribute of 'mode' on 'Off '.





    Note: The current error page, you see may be replaced by a custom error page by modifying the "defaultRedirect" of an application attribute tag configuration to point to a custom error page URL.





    Hey,.

    Sorry, but your ad says absolutely nothing

    Nobody knows what laptop you have, operating system, router, internet connection, browser, etc and the most important point: this site is.

    In addition if only a Web site does not, you will need to contact the webmaster of this page. Only that person can help you if something doesn t work on the page and know how to solve this problem.

    Then please contact the webmaster and your problem can be solved.

  • Error message cannot open Web sites, "this webpage is not available".

    Original title: Help, please

    If I go to my home page "Binoculars" I can type something in which displays all available pages.  But as soon as I try to click on one of them it's the box 'analyze the problem' or ' this web page is not available.  And the same thing happens if I try to load a page directly from the address bar, very frustrating. If I look to the top of facebook, google search, I can sometimes access it and even with You Tube, but nothing else.

    Hello Tash,

    To provide the proper resolution, I would need more information on your side.

    1. what web browser do you use?

    2. did you of recent changes on the computer before this problem?

    If you encounter the same problem in Internet Explorer, I would suggest trying the following steps and check if it helps.

    This problem can occur because Internet Explorer settings damaged or some browser modules.

    Method 1:
    I suggest you try the procedure described in the article and see if it helps.

    Can't access some Web sites in Internet Explorer
    http://support.Microsoft.com/kb/967897

    Warning: Reset the Internet Explorer settings can reset security settings or privacy settings that you have added to the list of Trusted Sites. Reset the Internet Explorer settings can also reset parental control settings. We recommend that you note these sites before you use the reset Internet Explorer settings.

    Method 2:
    If the problem persists, I suggest you try the procedure described in the article and see if it helps.

    How to optimize Internet Explorer
    http://support.Microsoft.com/kb/936213/no

    WARNING:
    (1)
    the feature reset the Internet Explorer settings can reset security settings or privacy settings that you have added to the list of Trusted Sites. Reset the Internet Explorer settings can also reset parental control settings. We recommend that you note these sites before you use the reset Internet Explorer settings

    2) please do not disable Flash player and silver light when running without Add-ons section.

    Hope this information helps. Answer the post with an up-to-date issue report to help you further.

  • How to make a PDF password protected Web site

    Difficulties, does anyone know how to post a PDF on a Web site that is password protected?

    Hi jasonw71228730,

    Put implement the protection of password on PDF file, download the PDF file on the web server & just add the tag hyperlink Html to your website in the desired location, for example: text of the hyperlink

    Kind regards

    Nicos

  • How to open a PDF from another Web site?

    I'm trying to use Adobe to fill out a job application. They said that safari could not and I need to get the latest version that I did, but now when I go on the web site it just continues to show me this message. How to open a PDF from another site?

    Right-click on the link to the pdf file, save it on your computer, open it from the inside Reader using file > open.

  • How to put in place apple pays Web site

    Is there documentation on requirements and Setup to support pay Apple on Web sites? I want to know that if she allows donations since I don't sell anything else I like to receive donations as support.

    Concerning

    Hello

    Information on how to pay Apple can be accepted in applications or Web sites are available here:

    https://developer.Apple.com/Apple-pay

  • How can I go directly to a web site with output sorted by bing or google or any search engine. I want to go directly to this address

    When I type in a web address it gets filtered by bing and the web site I want is not displayed.

    How can we the a web address with it being sorted to be a search engine

    Not sure what you mean.  If I type in a web address and press 'Go', it takes me straight to this site.  The drop-down list that appears is the most popular hits that match what you type.

  • Crash in firefox that I open it: How can I retrieve the addresses of Web sites in my bookmark? If all is lost?

    Firefox crashes when I open it (Mac OS). How can I retrieve the addresses of all the Web sites in my bookmarks before attempting to reinstall firefox?

    ID of the Crash

    c427216d-8a2f-8b48-Beca-50074acfbc6b

    User Agent

    Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_4; TI - TI) AppleWebKit/533.16 (KHTML, like Gecko) Safari/533.16 Version/5.0

    Yes, all your personal information is stored in your profile folder.

    Again, see back up and restore the information contained in the profiles of Firefox to manually back up your profile folder. This article also contains information about what information is stored where (for example, Places.sqlite for bookmarks and history).

    Then save that manually uninstall Firefox and delete the profile folder. Then you should be able to do a completely clean install and then restore your settings accordingly.

Maybe you are looking for