Working with PHP in Widgets

Hi, I have just a few questions about PHP with Widgets:

1. I've read in a few places that you can use PHP in Widgets, but when I tried to include an index.php in my Widget, it notified me that he has not been supported. So I guess I must have my PHP stored on a remote server and bind it using an anchor for example. (Also white list my field).

If it works, I'm still able to access those Widget API? I have a Javascript with a few Blackberry Menu API file and would like to know if these still work when they are on my remote server.

2. If I have a remote PHP file and a remote JS file does not work, how I would approach to access a local copy of the JS file that I compiled with the widget?

I ask these questions because I have a lot of dynamic pages, I'd like to see on my Widget, but would also have the API Widget at hand, as well for menus and other.

Thank you!

1. I've read in a few places that you can use PHP in Widgets, but when I tried to include an index.php in my Widget, it notified me that he has not been supported. So I guess I must have my PHP stored on a remote server and bind it using an anchor for example. (Also white list my field).

Correct... you can not add a PHP page directly in the Archives of your widget.  You can either make it in your widget by white first listing of the URLS in the file config.xml elements and then going to your page via an anchor tag or the definition of the location.href via JavaScript.

You can also call your PHP via AJAX scripts if you use them to turn the pieces of HTML or data.

If it works, I'm still able to access those Widget API? I have a Javascript with a few Blackberry Menu API file and would like to know if these still work when they are on my remote server

Yes, you are still able to access your Widget API from your pages side server.  Each API you wish to access must have its id function declared for the field in the white list.  For example, if your page is located at 'http://www.foo.com' and you want to have access to the API of blackberry.ui.menu... your config.xml element will look like the following:

http://www.foo.com" subdomains="true">
  

This will allow any page that is loaded from the www.foo.com field to access the API JavaScript menu.  This allows you to place the functional parts of your widget where they make sense for your application.

There is another parameter config.xml that you will be probably interested as well.  You can define your own custom for a BlackBerry Widget header value.  It is thus on your side server PHP code, you can check to make sure that your real widget hitting your PHP script.  The attribute is called "rim: header ' and is located in the root element.  You can consult the Guide to the developer for further details if you are interested.

2. If I have a remote PHP file and a remote JS file does not work, how I would approach to access a local copy of the JS file that I compiled with the widget?

Number 1) will work, but you can also do what you ask for (2).  Your PHP page of code on server side, you have white listed and displayed in the widget, has access to your local resources of the widget.  It is quite convenient for common resources that you do not want to draw on the network such as images, css, and JavaScript.

You can link to these resources by setting their path in your HTML to 'local:///myimage.png '.  The "local: / / /" is a local path that begins at the root of archive widget.  For example if you want to load an image from the local widget it would look like the following:


I hope this helps

Tags: BlackBerry Developers

Similar Questions

  • Can someone guide me to implement my XP and Windows 7 based IIS to work with PHP?

    I tried to implement my workstation local based working with PHP, IIS servers but the instructions I can find are vague and so far, I did not get the servers to answer even a simple PHP script.  I was hoping since Expression Web products claim to be able to build PHP applications that by extension could someone give me advice to set up PHP to work with my local IIS installations.  I have Windows XP Pro and Windows 7 Pro work positions.  This is a forum for Windows 7 and I thought someone here might have the experience and knows how to get the operational product.  Just for reference, I'm trying to use php - 5.4.10 - Win32-VC9 - x 86, which is, in my view, their latest stable version.  VC9 is what they say to use with IIS.

    Documentation is an ISAPI filter that is available, but I can't find this dll in the decompression code.  The other alternative is "fastcgi", but I don't know how configured

    Hello

    The question you have posted is better suited for the TechNet forums. Please post the question in the following link for assistance:

    http://social.technet.Microsoft.com/forums/en-us/Iises/threads

    I hope that helps!

  • Muse work with PHP and MySQL

    I have an investigation designed to go to a page of a site.  The designer will be using PHP and MySQL.  Compatible?

    Thanks for any help.

    SS

    Not really relevant. Whatever your designer will do will have to be inserted manually in HTML customized or by editing the HTML files published one way or another. It has nothing to do any with the Muse herself and the design of the process beyond 'make room', i.e. respective free addition where the code can be inserted.

    Mylenium

  • .click on line works with php table - does not work with javascript array.

    Howdy,

    I met a very interesting problem today, and I hope that you will be able to help me.

    I have a page in which the upper part is php to read a table from the server and display the table, that the html page is under construction.

    Find data in a table, and each row is clickable, which click on move the user to another page, that is based on the selected line.

    Here are the relevant parts of the php code:

    -------------------------------------------------------------------------------------

    <? PHP

    echo "< id of the table = 'patienttable" cellpadding = 5px border = 0-size of police = 16px > ';

    echo "< tr > < th ="30"width >". "ID #". ". "" < /th > < th = "100" width >. "Family name". " "" < /th > < th = "100" width >. "" Name"". "< /th > < th ="100"width" > "."

    "Middle name". "" < /th > < th = "80" width >. "" DOB ". "" < /th > < th = '50' width >. """" Zip"." < /th > < th = '50' width >". "' Gender '. "" < /th > < th = "100" width >.

    'Phone '. "< /th > < /tr >";

    While ($row = mysqli_fetch_array ($result))

    {

    blah blah blah

    echo "< tr > < td = 'localid' id >". " $localid. "< table > < td >. $lastname. "< table > < td >. $firstname. "< table > < td >. $middlename. "< table > < td >". " $dob. "< table > < td >". " $physzip. "< table > < td >. $gender. "< table > < td >". " $phone1.       "< table > < /tr >";

    }

    echo "< / table >";

    ? >

    ------------------------------------------------------------------------------------------ ------------

    And here is the code to a click on a line:

    ------------------------------------------------------------------------------------

    $("#patienttable_tr").click (function () {}

    var passthis = $(this).find("#localid").html ();

    .post $("php/setsessionvariable.php",)

    {sessionval: passthis},.

    function {window.location.href = "root.php"}

    );

    });

    ------------------------------------------------------------------------------------------ -----------------

    EVERYTHING works fine - no problem - works now for about 2 months.

    Today, I started to build something similar, BUT! I can't read the data base at the top of the page, I have to do an ajax request, call the db and display the data in a table;

    This is annoying, fairly simple javascript code:

    ------------------------------------------------------------------------------------------ --------------

    $.ajax({)

    type: 'POST',

    URL: "findpatientbackend.php",

    data: {letterslastname: lastname},.

    data type: 'json ',.

    success: {function (result)}

    $("#div1").html("");

    If (result.length > = 1).

    {var output = "";}

    $("div1").html ("< id of the table =" findtable">" ");

    $(résultat, fonction (index, value) {} .each)

    output += '< tr > < td width = "100px" > < table > < id td 'localid' width = '100px' = > '.

    + value.localid + '< table > < td width = "100px" > ".

    + value.lastname + '< table > < td width = "100px" > ".

    + value.firstname + '< table > < td width = "100px" > ".

    + value.middlename + '< table > < td width = "100px" > ".

    + value.dob + '< table > < /tr > ";

    });

    $("#div1").html (output);

    $("div1").html ("< /table >");

    }

    },

    error: function() {alert ("error on the return") ;}}

    });

    ------------------------------------------------------------------------------------------ -----------

    And here's the code click on lines, almost IDENTICAL to the above:

    ------------------------------------------------------------------------------------------ -----------

    $("#findtable_tr").click (function () {}

    var passthis = $(this).find("#localid").html ();

    .post $("php/setsessionvariable.php",)

    {sessionval: passthis},.

    function {window.location.href = '... / root.php'}

    );

    });

    ------------------------------------------------------------------------------------------ -------------

    All of the "stuff" loading on the page very well, BUT it absolutely nothing happens when I click on a line.

    Playing around this afternoon, I did a "View Source" on the two pages and saw something VERY interesting;

    1. the table written in PHP is present, can be seen and thus is "clickable".click on jquery function.

    2 - the table is written in javascript is INVISIBLE! I do not see in the source view (but I can see it on the screen) and as a result .click function on he can't see either.

    Issues related to the:

    1. How can I make the table written in javascript 'clickable' - how can I do the 'visible javascript array '?

    2 would it be the use of '.html' show table to the div? Is there another way?

    And again, I thank you in advance for any help.

    Sounds like a question of 'timing', i.e. you bind the click event tothe elements that don't exist - they do not exist because the AJAX call is not yet complete.

    You can use jQuery . on() (previously . live()) method to bind events to the elements 'the future '.

    Another option is to bind the click after the AJAX event is done and the

    is drawn.

    I guess even one other option is to ask the JSON in PHP so that the

    is called before the page is delivered.

    Moreover, we see items created by JavaScript using 'View Source '. Use Firebug or Chrome/Safari "inspect element".

    --

    Kenneth Kawamoto

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

  • Third party contact form widget no longer works with the update - PHP errors

    PHP seems to be even more screwed up with the last update/upgrade to Muse.  The previous update has started producing the following error message when I transferred my site via FTP:

    'Impossible 1 WARNING - connection to a PHP file. Failed to check if the web server supports PHP required by forms of the Muse. Remember the domain name entered in the dialog FTP download is correct. »

    However, everything worked, and by participating in some queries here, it seemed like a curiosity about something serious (stuff still worked but an error message popped up for no discernable reason)

    Since the last update, however, widgets that I have two different companies for the purpose of emailing me through the Web site, send messages, etc., are no longer works and the following message appears to hit 'submit '.

    "PHP script form is missing from web server or PHP is not properly configured on your web hosting provider. Check if the form PHP script has been downloaded correctly, contact your host about the configuration of PHP. »


    By checking with my web host, I was told

    « le page seems to use the script form - u31652.php that exists on the

    Server.

    Unfortunately, this error is not accurate enough to guide us in the right

    direction. PHP works on the server. However, looking at the

    Apache error logs web server I see the contact form appears to be

    looking for a file that does not exist.


    Just shoot this question, you want to work with Muse to determine

    Why coding sites is looking for the file

    / usr/home/NAME/public_html / WEBSITE.com/null ."


    Any ideas what this means and how to fix it would be great. I tried to re - download the whole site, thinking that maybe something was not being downloaded via "Only changed" but it is always the case


    Thank you!


    Please install the last update and check the configuration of PHP on your host for verification and then to test the workflow.

    Thank you

    Sanjit

  • I've updated my Muse app to the latest version of July and since then my Muse forms do not work with several of my web hosting providers. Is this a case of the site not having host is not the latest version of PHP?

    I've updated my Muse app to the latest version of July and since then my Muse forms do not work with several of my web hosting providers. Is this a case of the site not having host is not the latest version of PHP?

    Please consult this document:

    Troubleshooting Muse form used on the servers of third party Widgets

    Thank you

    Sanjit

  • Muse of adobe can work with databases like mysql or php language?

    I would like to know that muse adobe can work with databases or php. I have not used in the past this adobe program.

    I thank very you much for your reply later.

    Found a few postst Forum who can guide you

    Muse has the possibility to use php and mysql?

    MySQL DB & Adobe Muse

  • I need a culture customized for my site, I work with a minority language, and I need to have calendar dates in this language. Is this possible with a widget in Muse?

    I wonder if there is no way to do a culture customized for my site hosted with BC's domain? I work with a minority language, and I need to have calendar dates in this language.

    Is this possible with a widget in Muse? -to change my language in this particular calendar, t.i.: may is in my language, and Monday is my language

    This stuff is usually coded in the underlying JavaScript widget, derived from locale hard your computer or browser / language setting or gleaned from the respective server configuration information, so most likely, it can not be done, if not already covered by one of these methods. Hacking jQuery would of course always possible, but the other options are beyond your control, anyway.

    Mylenium

  • Disable the update of the widget menu when you are working with files from Muse?

    First of all thank you Adobe for the creation of Muse - I really like it a lot!

    My question:

    When I work on my site with over 250 pages, he strains the performance to make even the smallest changes in the structure of the page. I work with two masters of every much the same horizontal menu widget.

    Add, remove, and reorganization of pages makes the PC (Windows 7 laptop to some but not impressive power) to stop and take a deep breathe for a few seconds. It really interrupts the workflow.

    A raw work around this is to remove the menu widget in the two masters and put it in a new master page that contains the copied menu only two other masters and keep the rest of the header in place on the masters originals to be used for the alignment on the pages. In this way, what a page is updated when you work with adding, deleting, and the reorganization of pages.

    I tried to find a preference disable the update of the widget Menu when working on the structure of the page and just allow the update again when the work is done? is - it? otherwise I would recommend it highly :-) Since my work is about a little difficult/risky to use after the publication of ;-)

    Again, thank you very much for this beautiful program. Being a user of CS (now CCC) selftought I like the ease of control of the Web design you can get with Muse (to the distribution unit other features of course - if you ever wanted to add some sort of database search feature it would be MUCH appreciated.) A workaround is to use the iframe and an external search/lookup page, which returns results with links to parent pages. Un_peu funny good construction :-) ).

    BR

    Mr. harder

    Glad to know you like Muse.

    It can be very intensive CPU if you have several Master pages with their own menu widget Pages. Take a look at the following threads and refer to the response of Zak.

    http://forums.Adobe.com/thread/1423767

    http://forums.Adobe.com/message/6166722

    See if you are able to use one menu widget for all Pages in your site while enjoying the function hierarchical master page.

    http://TV.Adobe.com/watch/Muse-feature-tour/Adobe-Muse-hierarchical-master-pages/

    We know the performance problems caused by the widget Menu (all types of pages) and is something being considered by engineering in one of the upcoming releases.

    Thank you

    Vinayak

  • I'm a form on a website that requires authentication and it won't work with Muse

    The supplier, I called and they sent me a bunch of code to insert in to make the form work, but is anyway I can make it work within the Muse? https://solutions.HostMySite.com/index.php?/Knowledgebase/article/view/8460/0/using-PEAR-m ail-to-create-a-php-mail-form-that-uses-authenticationauthentication-is-required-by-hostmy site

    I have no idea how to deploy all that or how to make a captcha without use of Muse.

    The site is http://www.kiddintl.com/work-with-us.html it is

    I should have the domain point to a site of adobe business catalyst to do all this work of Muse correctly?

    [email protected]

    Hi Peter,.

    In the latest version of Muse, the recaptcha option has been added in both Bc and Bc not hosted on site. Please click the link below to learn more about this.

    http://helpx.Adobe.com/Muse/using/form-widgets.html#preventing spam using reCAPTCHA Google

    I'm afraid that this is not possible in Muse, to generate a captcha for a site that is not hosted through British Colombia, at this point, I would recommend that you post it on our ideas here, https://forums.adobe.com/community/muse/ideassection, and let our team of devs know this requirement.

    Meanwhile, you will need to insert the code captcha manually on the Muse to form once after you export the HTML of the site and it's something you'll need whenever code is generated because Muse will overwrite the changes you made.

    - Abhishek Maurya

  • GoDaddy email login now systematically fails with firefox, but works with other browsers

    Logging to GODADDY EMAIL WITH https://login.secureserver.net/index.php?app=wbe & domain = email.allancarstens.com
    URL GENERATES javascript:$('login_form').submit(); URL
    AND DISPLAYS [object Object]

    HE WORKED WITH FIREFOX AND STILL WORKS WITH OTHER BROWSERS.

    You can attach a screenshot?

    • Use a type of compressed as PNG or JPG image to save the screenshot
    • Make sure you do not exceed the maximum size of 1 MB

    You can try the following steps in case of problems with web pages:

    You can reload webpages and ignore the cache to refresh potentially stale or corrupt.

    • Hold down the SHIFT key and click the Reload button
    • Press 'Ctrl + F5' or 'Ctrl + Shift + R' (Windows, Linux)
    • Press 'Command + shift + R' (Mac)

    Clear the cache and delete cookies only from Web sites that cause problems.

    "Clear the Cache":

    • Firefox/tools > Options > advanced > network > content caching Web: 'clear now '.

    'Delete Cookies' sites causing problems:

    • Firefox/tools > Options > privacy > "Use the custom settings for history" > Cookies: "show the Cookies".

    Start Firefox in Safe Mode to check if one of the extensions (Firefox/tools > Modules > Extensions) or if hardware acceleration is the cause of the problem.

    • Put yourself in the DEFAULT theme: Firefox/tools > Modules > appearance
    • Do NOT click on the reset button on the startup window Mode safe
  • How can I get FF to work with organizing Mod (for the mods used with ARE: Skyrim)? I get an error message that it cannot understand the given address.

    I am a big fan of the Elder Scrolls and uses the new 2.2.9 STEP Setup. They went to the organizer of the Mod (MO) and I can't seem to get my FF working with the mod download things part. I click on the icon "Earth", that takes me immediately to the page file Nexus Mod, but when I choose a file to download after clicking on "Download Manager" I get this error message:
    The address was not included
    Firefox doesn't know how to open this address, because one of the following protocols (nxm) is not associated with any program or is not allowed in this context.
    You may need to install additional software to open this address.

    The address when clicking "Download Manager" begins with nxm://Skyrim/mods/ the address is such because trying to download with the Manager.

    Any help will be greatly appreciated! I pulled out my hair for the last few hours trying to find a solution. I disabled Adblock, other popups blockers and activated the main address in my exception rules. It simply doesn't get it. Ugh!

    Thank you in advance!

    In order to use nxm: / / links, Nexus Mod Manager must be installed and associated with the Protocol nxm .

    Problems with this program to third parties, please see the support forum:

  • I'm a software tester for an internal application to my company. version 10.0.2 is not cmopatible with a few controls within our software. I need the download v9.0.1 whatever works with the controls. Where can I get?

    I'm a software tester for an internal application to my company. version 10.0.2 is not cmopatible with a few controls within our software. I need the download v9.0.1 whatever works with the controls. Where can I get?

    Well, if you need older versions of firefox you can find them on this site:
    - http://www.oldapps.com/firefox.php

    Best regards, G-Cloud.

  • R7000-can not get to work with iptv

    Hi, I have problems to make my r7000 working with plusnets iptv... Recently signed to it and they sent me their shitty router that feeds their iptv perfectly but I can't figure out how to get the nighthawk for this...

    Current firmware 1.0.4.30. in advanced settings, there is an option allowing to the VLAN / bridge I had some success using: iptv works for a bit, but not internet traffic outside of iptv is passed to the youview box - so can't watch netflix etc. It stops also work after I have change the channel so it does not seem in any case the right fix

    PlusNet cannot provide me details for tag vlan, so don't know not where to go from there... every time I have activate the Internet is not just connect - tried VLAN 10, 101, 301 and the thing that I could think of...

    I read that there is an option to enable the VLAN / IPTV on some firmwares, but I don't see "enable VLAN / Bridge" on mine.
    This feature is still supported on the R7000? or would be running DD - WRT work?
    I hope someone can help
    Thank you

    bill1228 wrote:
    Cannot talk about DD - WRT and IPTV, but later XVortex firmware supports IPTV and is made to work. Of course, there is the matter of that will work with your provider?
    Link to this info:
    http://www.linksysinfo.org/index.php?threads/asuswrt-Merlin-on-NETGEAR-r7000.71108/page-11#post-2636...

    Link to the news of the firmware:
    http://www.linksysinfo.org/index.php?threads/asuswrt-Merlin-on-NETGEAR-r7000.71108/

    Works fine on my r7000.
    -Bill

    And we have a solution! Flashed the CFW, a quick reboot of the router, and a bit of higgery pokery - work with enabled IPTV YouView.

    Here's a note in case others run into this forum and fall into the same obstacle. These are the settings you need once you have flashed the CFW:

    You must configure 'Enable VPN + connection DHCP' to 'No' to the terms of the WAN option.

    Parameters used were:

    -Have the router to the latest firmware: 3.0.0.4.374.130

    -Use the following settings in the LAN > IPTV:

    -"Select the ISP profile" = None

    'Choose the Port STB IPTV' = None

    -"Use DHCP routes" = Microsoft

    -"Enable routing multicast (IGMP Proxy) = enable".

    'Enable the effective transfer of multicast (IGMP Snooping) = enable ".

    -' UDB Proxy (Udpxy) = 0

    I hope this proves use for others in the future and thank you for all your help.

  • Newbie question: can a LabView script or exe run on a Web server and interact with PHP?

    Hi all

    I am a complete newbie. I had to have an existing LabView project and have been asking if it can work with a PHP Web site. I would like to be able to create a form (for entry) on a Web page, and then go this LabView project entry existing. The existing LabView project then treats the input and generates a text file that the user wants to download from the site.

    So my question is, is it possible? If so, how to configure it and what products/costs might be involved?

    Thanks in advance

    A

    Hi Andy -.

    There are a few limitations "Remote panels" who probably will not do what you are trying to do as possible.  First, the remote panels have only runs on a Server Web of LabVIEW, and this server does not support PHP.  Integrate a web site that uses a web server with more features of LabVIEW is to put the server on a different port and then use an iFrame or something to integrate LabVIEW remote panel page into your own web site.  Communication back will probably have to use another protocol tansportation or to read and write files that they read and write.

    I highly recommend that you look in another function to LabVIEW, called "Web Services".  These are quite a bit different approach of the remote control and are available only on version 8.6 and later (and probably only editions of developers).  Services Web of LabVIEW allows you to perform a LabVIEW program (or modify an existing one) to connect back using XML.  It is a common place to consume and send commands to a Web Service of LabVIEW by using something like PHP or Flash.  However, you are responsible to provide interfacing features in the language that you use that consume the Web Service of LabVIEW.  For example, instead of a graphic on the front, you would need graphical data output and a PHP program that can do something with it.

    Web Services are quite handy if you need a 'light' client, as well as material interaction features of LabVIEW.

Maybe you are looking for