Send table of C++ to QML

Hi, I want to send an object in C++ to QML so that when received by QML, it'll be like table variant.

Is this possible? How to build a QVariant to contain the array of integers?

Also, when I use QVariant as return type:

Q_INVOKABLE QVariant getArrayId();

the file o.le - v7 - g gets marked for error without any description of the cause.

use a QStringList - will be converted into a table in QML

Tags: BlackBerry Developers

Similar Questions

  • Send a request form in QML Post

    I'm trying to get the last stage of Oauth 2 can operate.  I need to send the secret, the key and code to the url of the provider, but I can't send it as url WebView and using PostMessage returns nothing to the OnMessageReceived function.

    On the QML page, I have a button that sets the initial URL for Web display.

    When the URL changes, I check the return code.

    I analyze this code to send for the token, but that's when I get the error that I can't send a 'get '.

    Any suggestions?

    Try to do this using C++, it always works for me using C++ is not in QML

  • How to send data from c ++ to qml to an another qml.

    Hello

    I'm quite confused about a simple problem, I'm sure. Let me put some of my code and then I'll ask my question

    hand. QML

    // Default empty project template
    import bb.cascades 1.0
    import bb.data 1.0
    
    // creates one page with a label
    
    TabbedPane {
        Menu.definition: MenuDefinition {
            actions: [
                ActionItem {
                    title: "Refresh"
                }
            ]
        }
        showTabsOnActionBar: true
        Tab {
            title: qsTr("Employee")
            NavigationPane {
                id: everyonePane
                Page {
                    id: everyoneFeed
                    ListView {
                        objectName: "FeedView"
                        id: FeedView
    
                        layout: StackListLayout {
                            headerMode: ListHeaderMode.Sticky
                        }
                        listItemComponents: [
                            ListItemComponent {
                                type: "item"
                                DetailFeed {
                                }
                            }
                        ]
                    }
                }
                attachedObjects: [
                    ActivityIndicator {
                        objectName: "indicator"
                        verticalAlignment: VerticalAlignment.Center
                        horizontalAlignment: HorizontalAlignment.Center
                        preferredHeight: 200
                        preferredWidth: 200
                    }
                ]
                onCreationCompleted: {
    
                }
            }
        }
        Tab {
            title: qsTr("TimeSheet")
            Page {
            }
        }
        Tab {
            title: qsTr("Calendar")
            Page {
            }
        }
    }
    

    detailView

    import bb.cascades 1.0
    
    Container {
        layout: StackLayout {
            orientation: LayoutOrientation.TopToBottom // this line stacks everything below
        }
        bottomPadding: 20
        Container { // single row
            id: row1
            // individual row container
            layout: DockLayout {
            }
            preferredWidth: maxWidth
            Container { // container for image
                preferredWidth: 150 //size of image if known
                preferredHeight: 150
                topPadding: 10
                leftPadding: 20
                horizontalAlignment: HorizontalAlignment.Left
                verticalAlignment: VerticalAlignment.Center
                ImageView {
                    preferredWidth: 150 //size of image if known
                    preferredHeight: 150
                    imageSource: "asset:///images/person.jpg" // some image
                }
            }
            // stack labels
            Container { // container for labels
                horizontalAlignment: HorizontalAlignment.Left // align this container to the left
                translationX: 200
                verticalAlignment: VerticalAlignment.Center
                layout: StackLayout {
                    orientation: LayoutOrientation.TopToBottom // this stacks the labels
                }
                Label {                objectName: "firstname"
                    text: "first label"
                }
                Label {
                    text: "second label"
                }
            }
        }
        Divider {
        }
    }
    

    Employee.cpp

    // Default empty project template
    #include "Employee.hpp"
    
    #include 
    #include 
    #include 
    #include 
    #include 
    #include 
    
    #include 
    #include 
    
    using namespace bb::cascades;
    
    QString mQueryUri;
    
    Employee::Employee(bb::cascades::Application *app) :
            QObject(app) {
        // create scene document from main.qml asset
        // set parent to created document to ensure it exists for the whole application lifetime
        mQml = QmlDocument::create("asset:///main.qml").parent(this);
    
        // create root object for the UI
        mRoot = mQml->createRootObject();
    
        // Retrieving my activity indicator
        //mActivityIndicator = mRoot->findChild("indicator");
        //mActivityIndicator->start();
    
        // Retrieving my list from QML
        mListView = mRoot->findChild("dribbbleFeedView");
        GetFeed("everyone");
    
        // set created root object as a scene
        app->setScene(mRoot);
    }
    
    void Employee::GetFeed(QString feedType) {
        // First off we initialize our NetworkManager
        QNetworkAccessManager* netManager = new QNetworkAccessManager();
        if (!netManager) {
            qDebug() << "Unable to create QNetworkAccessManager!";
            emit complete("Unable to create QNetworkAccessManager!", false);
            return;
        }
    
        // First off we initialize our NetworkManager
        netManager = new QNetworkAccessManager();
        if (!netManager) {
            qDebug() << "Unable to create QNetworkAccessManager!";
            emit complete("Unable to create QNetworkAccessManager!", false);
            return;
        }
    
        mQueryUri = "http://mycompany" + feedType;
        // We setup our url
    
        QUrl url(mQueryUri);
        QNetworkRequest req(url);
    
        // Setup the reply and connect to the reply function
        QNetworkReply* ipReply = netManager->get(req);
        connect(ipReply, SIGNAL(finished()), this, SLOT(onReply()));
    }
    
    void Employee::onReply() {
        QNetworkReply* reply = qobject_cast(sender());
    
        QString response;
    
        bool success = false;
        if (reply) {
            if (reply->error() == QNetworkReply::NoError) {
    
                int available = reply->bytesAvailable();
                if (available > 0) {
                    int bufSize = sizeof(char) * available + sizeof(char);
                    QByteArray buffer(bufSize, 0);
                    int read = reply->read(buffer.data(), available);
                    response = QString(buffer);
                    success = true;
                    Q_UNUSED(read);
                }
            } else {
                response =
                        QString("Error: ") + reply->errorString()
                                + QString(" status:")
                                + reply->attribute(
                                        QNetworkRequest::HttpStatusCodeAttribute).toString();
                qDebug() << response;
            }
            reply->deleteLater();
        }
        if (response.trimmed().isEmpty()) {
            response = "Request failed. Check internet connection";
            qDebug() << response;
        }
    
        bb::cascades::GroupDataModel* dm = new bb::cascades::GroupDataModel(
                QStringList() << "id");
    
        dm->setGrouping(bb::cascades::ItemGrouping::None);
    
        // parse the json response with JsonDataAccess
        bb::data::JsonDataAccess ja;
        QVariant jsonva = ja.loadFromBuffer(response);
    
        QVariantList feed = jsonva.toMap()["employee"].toList();
    
        QVariantMap player;
    
        foreach (QVariant v, feed)
        {
            QVariantMap feedData = v.toMap();
            dm->insert(feedData);
        }
    
        mListView->setDataModel(dm);
        mListView->setVisible(true);
    }
    

    OK so here is my question. I load a listview, in my hand, calling another qml, detailview. Given that my PPC is load my json file how can I send what I receive in my datamodel in my detailfeed can I change we tell the label with objectName: "firstname" to change the text for datamodel.name?

    Hope I am clear enough.

    Thank you

    I think that you can access ListItemData in detailView.qml. Say ListItemData.id.

    Why do you add only a mapping in groupdata. I think you need to add all the necessary fields such as firstname and so on. Right?

    bb::cascades::GroupDataModel* dm = new bb::cascades::GroupDataModel(
                QStringList() << "id");
    
  • Send table to CFC

    Hello

    I'm stuck sending an array of CFCS. I defined the Bay on mxml like;
    [Bindable] private var questionData:Array;

    And adding new items;
    questionData [questionData.length] = [{questionTxt:txtQuestion.text, answerTypeID:answerTypeID.selectedItem.data, isActive:isQuestionActive, answerData:answerData}];

    Then I loop in my table and create one with validation, formatting, etc. It works fine, I can test my shape perfectly.

    Now, I need these data to be sent to a CFC in CF and written in a table. I use the following Flex + CF code to debug everything first what I get, but it does not work.

    -FLEX-
    "" < mx:WebService id = "CSService" wsdl = " http://www.mytestsite.com/ws/cs_service.cfc?wsdl" showBusyCursor = "true" >
    < mx:operation name = "SaveFormData" result = "saveFormDataResult (event)" >
    < mx:request >
    {questionData} < argFormData > < / argFormData >
    < / mx:request >
    < / mx:operation >
    < / mx:WebService >

    -CFC-
    < cffunction = "SaveFormData" access returntype = name 'remotely' = 'none' index = "Save CS Form data to the database." >
    < name cfargument = "argFormData" type = "array" required = "Yes" hint = "form data are mandatory" >
    < intrusion via cfmail = "[email protected]" subject = "[email protected]" = "DEBUG]" type = "html" >
    < cfdump var = "#arguments #" >
    < / intrusion via cfmail >
    < / cffunction >


    I get this error at the test swf;
    [Fault faultString = "HTTP request error" RPC faultCode = "Server.Error.Request" faultDetail ="error: [IOErrorEvent type ="ioError"bubbles = false cancelable = false eventPhase = 2 text =" Error #2032: stream error. "]] ["URL: https://admin.metroclubkart.com/webservice/cs_service.cfc ']. ["URL: https://admin.metroclubkart.com/webservice/cs_service.cfc ']

    When I change the type of the string argument;
    < name cfargument = "argFormData" type = "string" required = "Yes" hint = "form data are mandatory" >
    I get the email of debugging in the form [object] [object]

    I'm probably not able to send my questionData as table. Searched the forums and other sites but could not find a usable information. Any help is appreciated.

    Thanks in advance.

    Hi Ben,

    I actually solved my problem and want to tell you what I did wrond, may help others too.

    I use this code to add items to the table, but I actually use structure. Here it is warmer then always if I missed this :)
    answerData [answerCount] = [{answerID: '0', answerTxt:txtAnswerTxt.text, answerPoint:txtPointTxt.text, answerIsActive:isAnswerActive, answerOrderBy: "0"}];

    After adding questions and answers to structure I use an Analyzer to analyze this structure as a visible and controlled form that can check length min, restrict the tanks, len max, etc. While I am the analysis I've analyzed this structure in a table to use to the webservice. Creates a new table as [Bindable] private var webServiceData:Array = new Array; and entering the data into it during the analysis to the screen in my parser function. So whenever a question is entered, a new data entered for my structure--> them my Analyzer works--> parsed data in a visible form for interaction with the user and also you enter the data into a new table for webservice.

    I could have change my code to use the table for the parser and add question, remove features of the issue, but it's easier to use structured arrays and is not a problem to write line 4-5 of the code anyway. Also when receiving data from the server I use XML and structured table conversion. Structured table are easier to work with than the table and you have to remember which part of table contains data like question [1] [5], but instead, you can use .questionID to question [1].

    Which path I chose is not serious because this part of my application runs for administrators and will not be used much so I don't have a performance problem. But according to your request you may need another solution for the performance. This solution works very well for me so far.

    Best regards.

  • Send table to PHP with HTTPService

    How can I send a picture via HTTPService to a PHP script please?
    If I do this:

    var params: Object = new Objsect();
    params.myData = myDataArray; dataArray is a var table I need to send
    myService.send (params);


    He's not on a table.
    How can I pass the array to PHP?

    You can convert the table to a string in FLEX and PHP, you can use the command "split"...

    Here's example program to see if it helps u

    http://flexarraytransfer.blogspot.com/

  • Problem sending table 2D via TCP/IP

    Hello to all 2!

    Attached the vi using, I'm trying to send and receive a picture 2d over tcp/ip, but I get an "out of memory" error of LabView.

    Where is the problem?... I adapted the examples provided by neither, but somewhere, there seems to be a problem.

    4 thank you for your time!

    P.S. I use LabView 8.5.1 on Windows XP SP2

    I made a few changes to your TCP - transmit .vi, see attachment. He should be executed normally.

  • How to send the picture of u with labview

    Hello

    How to send table unsigned 32-bit via UDP.

    How to convert the 32-bit unsigned byte array table.


  • QML property after onCreationComplete is called?

    Hey all,.

    I try to send an ID of one QML page into another using properties. On the second page, I want to put a list with data corresepoding to the ID that was passed along.

    This is the top of the page that is being created and the

    {Page}
    property alias workoutname: root.workoutName
    property alias workoutid: root.workoutID

    It is the container that contains the list view

    {Of container
    ID: root
    property int workoutID:-1
    "" workoutName variant property:

    It's the onCreationComplete of the Page that has the ID passed in

    onCreationCompleted: {}
    segmentList.dataModel = _Dal.GetListOfWorkoutSegments (root.workoutID);
    }

    The problem is when onCreationComplete is called the root.workoutID is always-1 instead of the value as defined when I created the page?

    Creation of the page below.

    page var = workoutPage.createObject ();
    page.workoutid = id
    page.workoutname = name
    homeNavigationPane.push (page);

    I add these pages through a ComponentDefinition.

    Thank you in advance.

    -J

    It's expected behaviour

    You can do this way:

    page var = workoutPage.createObject ();
    page.workoutid = id
    page.workoutname = name

    page.init)
    homeNavigationPane.push (page);

    .. .and inside yopur page you have a

    function init() {}

    where you can use your properties

  • Pass data between applications value reference

    The issue is that data application reference value is local to the application instance, or can be transferred between different applications.

    I have a main application that acquires the table of 100 MB and I need to use these data in a dll. Obviously, I don't want to send table, reference would be better. Both applications are generated in labview 2011.

    The second question is whether reference data value can be converted to a string (type cast or flatten to a string) and back. For example with DAQmx tasks flatten to a string does not work.

    Alexander_Sobolev wrote:

    It's value application data reference is local to the application instance.

    Yes.

    or may be transferred between applications.

    Laughing out loud

    The second question is whether reference data value can be converted to a string (type cast or flatten to a string) and back.

    Yes, but only means something in the app instance appeared to reference.

    You will want to perhaps give more details on what are your real needs, but keep in mind that play with memory directly in LV is not so simple, as he does all he can to hide these details you.

    If you pass a pointer to an array to a DLL, you can configure the DLL for this call. If you want to get an accurate picture of LV in memory address and passing around, this isn't something LV supports and you shouldn't do that because the memory should not be controlled by more than one master at any time in time.

    LV has functions of memory allocation and to get the pointer back, but requiring explicit calls.

    Anyway, I have no real experience with this. If you want to read materials, there are at least two users here with much more knowledge on the subject and you can go through their messages or search and filter for their post - rolfk and nathand.

  • Interfacing of the host target

    Hi all

    I just started the LabView. I want to send table 1 d of the host to the fpga VI. I want that all the values in the table in the table 1 d from FPGA VI. Could u please help me to do the same.

    Hello

    There are two methods of transfer of data from your host to the target FPGA.

    1 flatten/Unflatten

    2 whole Handshaking

    You can find details on how to implement these solutions in the following NI Developer Zone article:

    http://zone.NI.com/DevZone/CDA/tut/p/ID/4520

    Hope this helps

    Rohit

    NEITHER the India

  • Missing data recordset of the emails.

    (David gave me help with this page a few days ago, and I thought that I've sorted, but still a problem. I reduced the offending code)

    I've set up a page that presents data from a MYSQL dbase and then sends the information, as an email when there is an e-mail address of the recipient. He also sends an e-mail notification.
    As you can see below the Recordset (restSelect) is selected by the receipt of a numeric variable posted since a previous page.
    The page works insofar as the correct data are drawn from the dbase and presented on the Web page, but when emails are sent as messages arrive without the news of dbase.
    I don't understand why e-mail messages are not collecting the data recordset. Can you see where I'm wrong, please?
    (php written largely by DW2004)

    Here is the code:

    <? PHP require('.. /.. / Connections/tormented3.php');? >
    <? PHP
    $colname_restSelect = "1";
    If (isset($_POST['org_pk'])) {}
    $colname_restSelect = (get_magic_quotes_gpc())? $_POST ['org_pk']: addslashes($_POST['org_pk']);
    }
    @mysql_select_db ($database_tormented3, $tormented3);
    $query_restSelect = sprintf ("SELECT * FROM cel_contents WHERE cel_pk = %s", $colname_restSelect);
    $restSelect = mysql_query ($query_restSelect, $tormented3) or die (mysql_error ());
    $row_restSelect = mysql_fetch_assoc ($restSelect);
    $totalRows_restSelect = mysql_num_rows ($restSelect);

    If (isset($_POST['send'])) {/ / 'submit' is the name of the submit button}
    $error = ";

    process and validate a field:
    $email1 = trim($_POST['email1']);
    if($email1 == '') {/ / if the name is blank, displays an error message (us and for required fields)}
    $error. = ' < style p = "color: red;" > you missed your email address! < /p > '; error message
    }

    if($Error == '') {/ / If no error, the form process}

    Mail script
    $org = $row_restSelect ["cel_org"];
    $tel = $row_restSelect ["cel_tel"];

    $message = "Thank you for requesting information on the $org.\n\n." Configure the e-mail message to the customer.
    $message. = "contact information: \n";
    $message. = "Such no $tel \n";

    $inform_me = "details of the $org have been sent to $email1; Set up the email informing me of the request for information.
    E-mail:
    If (mail ("$email1", $org, $message, "from: www.somewhere.org.uk") & & mail ("[email protected]", $org, ))
    (($inform_me, "from: www.somewhere.org.uk"))
    {
    header ('location: http://www.somewhere.org.uk/feedback/email_redirect.php "") ;// Redirect to the page if the email has been sent successfully
    "exit";
    } else {}
    $error == ' < style p = "color: red;" > an error has occurred, your email could not be sent. Please try
    new / < p > ';
    }
    }
    }
    ? >
    < ! DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional / / IN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" > ""
    " < html xmlns =" http://www.w3.org/1999/xhtml ">
    < head >
    < title > < /title > feedback form
    < meta http-equiv = "Content-Type" content = text/html"; charset = iso-8859-1 "/ >"
    < script type = "text/javascript" src = "fb.js" > < / script >
    "" < link href = "... / css/mentalhealth_bx.css" rel = "stylesheet" type = "text/css" / >
    < / head >
    < body class = "grey_bground" >

    < form action = "<?" PHP echo $PHP_SELF;? ">" method = "post" name = "email1" id = "email1" >
    <? PHP echo $error;? >
    <!--appeal the processing routine-->
    < div id = 'wrapper' > <! - this div code appears sometimes red in DW because there are closing 2/div (see below) - >
    < table class = "whitecell" cellpadding = "1" >
    < b >
    < td colspan = "4" class = "cellcolour" > < p align = "center" class = "redhaed" > NB Ce e-mail form does not yet properly < /p >
    < p align = "center" class = "strongbody" > use this form to send the information below on < span class = "redhaed" > <? PHP echo $row_restSelect ["cel_org"];? > < / span > for yourself or for someone else < br / >
    by entering the relevant address in the space below. < br / >
    < /p >
    < table >
    < /tr >
    < b >
    < td align = "right" > < p > < / p >
    < p > < /p > < table >
    < td colspan = "3" valign = "top" > <? PHP echo $org_pk; temporary control? > < table >
    < /tr >
    < b >
    < td align = "right" > < span class = "right_cell" > information about < / span > < table >
    < td colspan = "3" valign = "top" > <? PHP echo $row_restSelect ["cel_org"];? > of < table > www.somewhere.org.uk
    < /tr >
    < b >
    < td colspan = "4" align = "right" > < table >
    < /tr >
    < b >
    < td align = 'right' class = "right_cell" > Tel.no. < table >
    < td > <? PHP echo $row_restSelect ["cel_tel"];? > < table >
    < /tr >
    < b >
    < td valign = "top" class = "right_cell" > < table >
    < td valign = "top" > < table >
    < /tr >
    < b >
    < td colspan = "4" valign = "top" > < table >
    < /tr >
    < b >
    < td align = 'right' class = "cellcolour" >
    E-mail address of the recipient: < b > < br / >
    < /b > < table >
    < td > < input name = "email1" type = "text" size = "40" value = "" / > "
    "< input name ="send"type ="submit"value =" send "/ >"
    < table >
    < /tr >
    < b >
    < td colspan = "2" > < div align = "right" > < / div > < table >
    < /tr >
    < /table >
    < / div >
    < / make >
    < / body >
    < / html >
    <? PHP
    mysql_free_result ($restSelect);
    ? >

    Thank you very much for looking.
    Steve

    The problem is that $_POST ['org_pk'] comes from the previous page. $_POST and $_GET variables are sent only to the next page. They are not kept indefinitely. For example, when the form is submitted, $_POST ['org_pk'] no longer exists.

    To work around this problem, add the following line somewhere inside your form:

    
    

    It stores the value of $_POST ['org_pk'] in a hidden field and include in the array $_POST when sending the form.

  • PHP Mail with session variables

    Here is the code for an email to collect page, which sends two session variables (email and postal code) to an email_sub.php page (data are inserted in MySQL). After submitting the form, I get the email_sub.php? page where this code works normally

    <? PHP echo $_SESSION ['email'];? >

    <? PHP echo $_SESSION ['postal code'];? >

    However, when the email is sent, the "subject" and the "To" is successfully sent, but not the variables $email and $zipcode.

    From:
    Zip code:

    If I hard code for values of and Zip, they appear in the email. It seems therefore that session variables are not available at the email_sub.php page.

    If anyone can point me in the right direction for a fix, I'd be very happy to suggestions.

    email_collect.php

    <? php require_once('Connections/connMan.php');? >
    <? PHP
    session_start();
    function GetSQLValueString ($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
    {
    $theValue = (! get_magic_quotes_gpc())? addslashes ($TheValue): $theValue;

    Switch ($theType) {}
    case 'text ':
    $theValue = ($theValue! = "")? « " ». $theValue. "" "": "NULL";
    break;
    case "long":
    case "int":
    $theValue = ($theValue! = "")? intval ($TheValue): 'NULL ';
    break;
    case "double":
    $theValue = ($theValue! = "")? « " ». doubleVal ($TheValue). "" "": "NULL";
    break;
    case "date":
    $theValue = ($theValue! = "")? « " ». $theValue. "" "": "NULL";
    break;
    case "set":
    $theValue = ($theValue! = "")? $theDefinedValue: $theNotDefinedValue;
    break;
    }
    Return $theValue;
    }

    $editFormAction = $_SERVER ['PHP_SELF'];
    If (isset {}
    $editFormAction. = « ? ». htmlentities($_SERVER['QUERY_STRING']);
    }

    If ((isset($_POST["MM_insert"])) & & ($_POST ["MM_insert"] == "form1")) {}
    $email = $HTTP_POST_VARS ['email'];
    session_register ("email");
    $zipcode = $HTTP_POST_VARS ["zipcode"];
    session_register ("zipcode");
    $insertSQL = sprintf ("INSERT INTO email_list (e-mail, postal code) VALUES (%s, %s)," ")
    GetSQLValueString ($_POST ['email'], "text").
    GetSQLValueString ($_POST ['PostalCode'], "int"));

    @mysql_select_db ($database_connMan, $connMan);
    $Result1 = mysql_query ($insertSQL, $connMan) or die (mysql_error ());

    $insertGoTo = "email_sub.php";
    If (isset {}
    $insertGoTo. = (strpos ($insertGoTo, '?'))? « & » : « ? » ;
    $insertGoTo. = $_SERVER ['QUERY_STRING'];
    }
    header (sprintf ("location: %s", $insertGoTo));
    }

    @mysql_select_db ($database_connMan, $connMan);
    $query_rsEmailer = "SELECT * from email_list";
    $rsEmailer = mysql_query ($query_rsEmailer, $connMan) or die (mysql_error ());
    $row_rsEmailer = mysql_fetch_assoc ($rsEmailer);
    $totalRows_rsEmailer = mysql_num_rows ($rsEmailer);
    ? >
    < ! DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional / / IN" "http://www.w3.org/TR/html4/loose.dtd" > ""
    < html >
    < head >
    < title > em touch all the Camps of Baseball < /title >
    < meta http-equiv = "Content-Type" content = text/html"; charset = iso-8859-1 ">"
    < link href = "assets/taylor.css" rel = "stylesheet" type = "text/css" > "
    < script type = "text/JavaScript" >
    <!--
    function MM_findObj (n, d) {//v4.01
    var p, i, x;  if(!d) d = document; If ((p = n.IndexOf ("?")) > 0 & & parent.frames.length) {}
    d = parent.frames [n.Substring(p+1)] .document; n = n.Substring (0, p) ;}
    If (!) () x = d [n]) & & copyrights) x = d.all [n]; for (i = 0;! x & & i < d.forms.length; i ++) x = d.forms [i] [n];
    for (i = 0;! x & & d.layers & & I < d.layers.length; i ++) x = MM_findObj (n, d.layers [i] .document);
    If (! x & & d.getElementById) x = d.getElementById (n); Return x;
    }

    function MM_validateForm() {//v4.0
    var i, p, q, n, test, num, min, max, errors = ", args = MM_validateForm.arguments;
    for (i = 0; I <(args.length-2); I += 3) {test = args [i + 2]; val = MM_findObj(args[i]);
    If (val) {n = val.name; if ((val=val.value)! = "") {}}
    If (test.indexOf ('isEmail')! =-1) {p = val.indexOf (' @');}
    If (p < 1 | p ==(val.length-1)) errors +='-' + nm + "must contain an e-mail address. \n » ;
    } Else if (test! = 'R') {num = parseFloat (val);
    If (isNaN (val)) errors +='-' + nm + 'must contain a number. \n » ;
    If (test.indexOf ('inRange')! = - 1) {p = test.indexOf (': ');}
    min = test. Substring(8,p); Max = test. Substring (p + 1);
    If (num < min | max < num) errors +='-' + nm + must contain a number between "+ min +" and "+ max +".. " \n " ;
    }} ElseIf (test.charAt (0) == 'R') errors += '-' + nm + ' is required. \n " ; }
    } If (errors) alert ("the following error occurred: \n'+errors");
    document. MM_returnValue = (error == ");
    }
    ->
    < /script >
    < / head >

    < body >
    < are method = "post" name = "form1" action = "<?" PHP echo $editFormAction;? > ">"
    < table width = "325" align = "center" >
    < tr valign = 'of basic">
    < td colspan = "2" align = "left" >
    < h1 class = "subtitle" > join our Email list < / h1 >
    < p > please fill in boxes and click on & quot; Send. & quot; This information is kept secret and is intended for the exclusive touch of < strong > Hank Manning em all Camps of Baseball < facilities > in order to send you the latest happenings on our calendar.
    < /p >

    < p > < / p >
    < table >
    < /tr >
    < tr valign = 'of basic">
    < td align = "right" valign = "middle" nowrap > < p > E-mail: < /p > < table >
    < td align = "left" valign = "middle" > < input name = "email" type = "text" onBlur = "MM_validateForm ('email',", 'RisEmail'); " return document. MM_returnValue"size ="32"value ="Email address"> < table >
    < /tr >
    < tr valign = 'of basic">
    < td align = "right" valign = "middle" nowrap > < p > code postal: < /p > < table >
    < td align = "left" valign = "middle" > < input name = "PostalCode" type = "text" onBlur = "MM_validateForm ('postcode',", 'RisNum'); " return document. MM_returnValue' size = '32' value = 'postal Code' > < table >
    < /tr >
    < tr valign = 'of basic">
    < td align = "right" > < input type = "reset" name = "Reset2" value = "Reset" > < br >
    < input type = "submit" value = "send" > < table > ' "
    < td > < table >
    < /tr >
    < /table >
    < input type = "hidden" name = "MM_insert" value = "form1" >
    < / make >
    < p > < / p >
    < / body >
    < / html >
    <? PHP
    mysql_free_result() will free all memory associated with the result identifier result.

    mysql_free_result() only needs to be called if you are concerned about how much memory is used for queries that return large result sets. All associated result memory is automatically freed when the script is completed.
    mysql_free_result ($rsEmailer);
    ? >

    email_sub.php

    <? PHP session_start(); It connects to the existing session

    email sent

    / / [email protected] , [email protected]
    mail (' [email protected], [email protected]', "Join Email List", "from: $email\r\n Zip: $zipcode");
    ? >
    < ! DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional / / IN" "http://www.w3.org/TR/html4/loose.dtd" > ""
    < html >
    < head >
    < title > em touch all the Camps of Baseball < /title >
    < meta http-equiv = "Content-Type" content = text/html"; charset = iso-8859-1 ">"
    < link href = "assets/taylor.css" rel = "stylesheet" type = "text/css" > "
    < / head >

    < body >


    < table width = "280" border = "0" cellspacing = "0" cellpadding = "0" >
    < b >
    < td colspan = "2" > < img src = "images/manning_logo.jpg" width = "426" height = "64" > < table > "
    < /tr >
    < tr valign = "top" >
    < td colspan = "2" > < p > < / p >
    < p align = "left" > thank you very much for sending your email and zip code. < /p >
    < table width = "350" border = "0" cellspacing = "0" cellpadding = "0" >
    < b >
    < td width = "69" > < p align = "right" > email: < /p > < table >
    < td width = "281" > < p align = "left" > <? PHP echo $_SESSION ['email'];? > < / p > < table >
    < /tr >
    < b >
    < td > < p align = 'right' > postal code: < /p > < table >
    < td > < p align = "left" > <? PHP echo $_SESSION ['postal code'];? > < / p > < table >
    < /tr >
    < / table > < p align = "left" > This information will be stored in our database exclusive use < facilities > < strong > Hank Manning em all the Baseball Camps Touch, which respects and protects your privacy. < /p >
    < table >
    < /tr >
    < b >
    < td width = "407" align = "left" > < a href = "javascript:window.close();" "> close this window < /a > < table >
    < td width = "19" > < p > < / p > < table >
    < /tr >
    < /table >
    < p > < / p >
    < p > < / p >
    <? PHP
    end the session so that I could see new variables because they are passed in the development
    session_destroy();? >
    < / body >
    < / html >

    sbudlong wrote:

    I made the change you suggested but the showsFrom:Zip still E-mail: without values for the variables. Is there a problem with the session?

    It seems that you do not use session variables when you send the mail:

    mail('[email protected], [email protected]',
    'Join Email List',
    "From: $email\r\n Zip: $zipcode");
    

    Change to this:

    mail('[email protected], [email protected]',
    'Join Email List',
    'From: ' . $_SESSION['email'] . "\r\n Zip: " .
    $_SESSION['zipcode']);
    
  • User Message interface help - table to send to the user through ActiveX interface

    Hello

    I asked a similar question before, but now I'm having problems trying to get a table in the user interface via the mail user interface. I am my code TestStand, I have an expression to send a picture that is as a container of table of FileGlobal to the UI as such:

    RunState.Thread.PostUIMessageEx (UIMsg_UserMessageBase + 2, 0, "", FileGlobals.DataRead, False)

    and in the UImessage callback I what I thought, I have to do to send the data to an array of text on the user interface. It does not work.

    Can someone tell me what I am doing wrong?

    Is attached, the UIcallback, a picture of the table on my user interface and control


  • Send to table to the table receiving TCP and imaging

    Hello

    I work with the tomography of process;

    I want to send a picture 2D-double over TCP, to receive the same table (table 2D-double) and create an image of this table.

    Unflatten to channel, I got 2-D array of string. How can I create the original of this picture of string array?

    Please take a look at my vi s.

    Thanks in advance

    You write a 2D DBL table, but read in the form of a 2D channels table. Replace the constant matrix 2D string by a constant matrix 2D DBL. (I haven't studied the rest of the code, because I do not have IMAQ)

  • Table sending via FIFO for xy charts

    HI, I have data of sendig of evil from the FPGA to the UI of the host.

    I want to draw 6 signals. on two XY Gratz, so for each XY graphs, I have 3 plots.

    I have samples every 100µs on the FPGA and combine them into an array of 6 elements representing the values of y.

    I send this table via DMA FIFO to the host.

    On the host VI I devices the x values grouped into a cluster and build an array of 3 plots.

    When I run the VI. I have a parcel of signals, but how the plots change all the time in another plot. Its like every time another element of the array is read. Until the current chart, I had only two plots and then it worked fine.

    I hope someone can help me more.

    As an attachment, you can find the FPGA VI, VI and VI of the host realtime

    A few comments:

    Looks like your axis x are evenly spaced (by 0.001) so you do not have an xy graph, but simply a waveform graph, which should simplify things.

    I'm confused why you do your x-axis for Graphics1 to 100000 items long but just try to graph 30000 items in the feed. Similarly, for your graphics currents and Hall signals, it seems that the x-axis are long 4000 elements (although I have not your time - axis.vi to check) and want to 20000 graph items. Curve of waveform switching simplifies this.

    When generating your table of 100000 elements you can simply use (i + 1) * 0.001 as output auto-indexée instead of using shift registers.

Maybe you are looking for