How to use html form actions and methods
Hi, I want to make a quick contact page using Edge. I used the following code in my creationComplete but had no luck. Any help?
var na = sym.$( "email" );
email.html( '<form action="send_mail.php" method="post"><input type="text" id="email" value="" />' );
var button = sym.$( "btn" );
button.html( '<input type="submit" value="Send" />' );
My understanding from your question is that you would like to programmatically (using LabVIEW) send input to and click a button on an existing HTML website, is that right?
If yes, then you can use ActiveX calls to embed a web browser into the front panel of your VI and then use its invoke node to input a text to a form or click a button. Another way is to use the lower-level TCP VIs in LabVIEW, but you need to understand HTTP protocols to successfully use this. See below examples to get started.
ActiveX
https://decibel.ni.com/content/docs/DOC-25396
https://decibel.ni.com/content/docs/DOC-12454
TCP VIs (HTTP)
https://decibel.ni.com/content/docs/DOC-2230
http://zone.ni.com/devzone/cda/epd/p/id/3153
FYI, LabVIEW Internet Toolkit has been deprecated starting LabVIEW 2012, so it is not recommended to build a new application using that.
Hope this helps.
Regards,
A. Yodha
Applications Engineer | National Instruments
Singapore (65) 6226 5886 | Malaysia (60) 3 7948 2000 | Thailand (66) 2 298 4800
Philippines (63) 2 659 1722 | Vietnam (84) 8 3911 3150 | Indonesia (62) 21 2924 1911
Similar Messages
-
Hi, I am trying to trying to fill up information into a website using labview. It has 3 text inputs and a image submit button. I was wondering if it is possible to fill the HTML with labview. Another question is that if anyone knows an example VI for HTML form VI from the internet toolkit. I don't know the connections and there is no examples out in the net.
My understanding from your question is that you would like to programmatically (using LabVIEW) send input to and click a button on an existing HTML website, is that right?
If yes, then you can use ActiveX calls to embed a web browser into the front panel of your VI and then use its invoke node to input a text to a form or click a button. Another way is to use the lower-level TCP VIs in LabVIEW, but you need to understand HTTP protocols to successfully use this. See below examples to get started.
ActiveX
https://decibel.ni.com/content/docs/DOC-25396
https://decibel.ni.com/content/docs/DOC-12454
TCP VIs (HTTP)
https://decibel.ni.com/content/docs/DOC-2230
http://zone.ni.com/devzone/cda/epd/p/id/3153
FYI, LabVIEW Internet Toolkit has been deprecated starting LabVIEW 2012, so it is not recommended to build a new application using that.
Hope this helps.
Regards,
A. Yodha
Applications Engineer | National Instruments
Singapore (65) 6226 5886 | Malaysia (60) 3 7948 2000 | Thailand (66) 2 298 4800
Philippines (63) 2 659 1722 | Vietnam (84) 8 3911 3150 | Indonesia (62) 21 2924 1911 -
Question about running a servelt using HTML form.
Hi, Im new to Servlets , I have created a servelt with this code :
package oracle.servlets;
import java.io.IOException;
import java.io.PrintWriter;
import java.sql.*;
import javax.servlet.*;
import javax.servlet.http.*;
public class LoginServlet extends HttpServlet {
private static final String CONTENT_TYPE = "text/html; charset=windows-1252";
private static final String DB_URL = "jdbc:oracle:thin:@localhost:1521:ahmaddb";
private static final String DB_USERNAME = "fundinfo";
private static final String DB_PASSWORD = "tadapps";
private static Connection con;
private String pass;
private String name;
/*init() : invoked by the servlet engine before the servicing of client requests
- Can be used to retrieve initialization parameters
Takes a ServletConfig object as a parameter
Is invoked when the servlet instance is created
Is useful for obtaining database connections from a connection pool*/
public void init(ServletConfig config) throws ServletException {
super.init(config);
//config.getInitParameter(arg0);
public void doGet(HttpServletRequest request,
HttpServletResponse response) throws ServletException,
IOException {
response.setContentType(CONTENT_TYPE);
//PrintWriter : Print formatted representations of objects to a text-output stream.
//getWriter() : Returns a PrintWriter object that can send character text to the client.
PrintWriter out = response.getWriter();
out.println("<html>");
out.println("<head><title>My First Servlet</title></head>");
out.println("<body>");
out.println("<p>The servlet has received a GET. This is the reply.</p>");
out.println("</body></html>");
out.close();
public void doPost(HttpServletRequest request,
HttpServletResponse response) throws ServletException,
IOException {
response.setContentType(CONTENT_TYPE);
PrintWriter out = response.getWriter();
name = request.getParameter("user_name");
pass = request.getParameter("user_password");
boolean result = verifyPassword(name, pass);
out.println("<html>");
out.println("<head><title>LoginServlet</title></head>");
out.println("<body>");
if (result == true){
out.println ("Hello " + name + ": Your login module is working great!");
else{
out.println ("Invalid user name or password");
out.println ("</body></html>");
out.close();
// out.println("<p>The servlet has received a POST. This is the reply.</p>");
//out.println("</body></html>");
//out.close();
public void configureConnection() throws SQLException {
try{
Class.forName("oracle.jdbc.OracleDriver");
con = DriverManager.getConnection(DB_URL, DB_USERNAME,DB_PASSWORD);
con.setAutoCommit(true);
catch (Exception e){
System.out.println("Connection failed: " +e.toString());
public Connection getConnection() throws SQLException
configureConnection();
return con;
protected boolean verifyPassword(String theuser, String password) {
String originalPassword = null;
try {
con = getConnection();
Statement stmt = con.createStatement();
stmt.executeQuery("select password from login where uname='"+theuser+"'");
ResultSet rs = stmt.getResultSet();
if(rs.next())
//>>
originalPassword = rs.getString(1);
stmt.close();
if(originalPassword.equals(password)) {
return true;
else {
return false;
catch (Exception e){
System.out.println("Exception in verifyPassword()="+e.toString());
return false;
}and created an HTML form to target this servlet
<form action="/loginservlet" method="post">,
when I enter the the credintials I get this output in the webpage :
Error 404--Not Found
From RFC 2068 Hypertext Transfer Protocol -- HTTP/1.1:
10.4.5 404 Not Found
The server has not found anything matching the Request-URI. No indication is given of whether the condition is temporary or permanent.
If the server does not wish to make this information available to the client, the status code 403 (Forbidden) can be used instead. The 410 (Gone) status code SHOULD be used if the server knows, through some internally configurable mechanism, that an old resource is permanently unavailable and has no forwarding address.Thanks , yes it is added to the web.xml
<?xml version = '1.0' encoding = 'windows-1252'?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" version="2.5" xmlns="http://java.sun.com/xml/ns/javaee">
<description>Empty web.xml file for Web Application</description>
<servlet>
<servlet-name>LoginServlet</servlet-name>
<servlet-class>oracle.servlets.LoginServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>LoginServlet</servlet-name>
<url-pattern>/loginservlet</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>35</session-timeout>
</session-config>
<mime-mapping>
<extension>html</extension>
<mime-type>text/html</mime-type>
</mime-mapping>
<mime-mapping>
<extension>txt</extension>
<mime-type>text/plain</mime-type>
</mime-mapping>
</web-app>Anymore suggestions? -
How to use html:link in Ajax
Hi frnds,
<%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean" %>
<%@page import="java.sql.*" %>
<html>
<head>
<script type="text/javascript">
var xmlhttp;
function loadXMLDoc()
xmlhttp=null;
alert(document.getElementById('country').value);
alert(document.getElementById('url').value);
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
url=document.getElementById('url').value+"action=search&q="+document.getElementById('country').value+"&scope=tracker";
xmlhttp.onreadystatechange=onResponse;
xmlhttp.open("POST",url,true,"platts","platts1234");
xmlhttp.send("");
function onResponse()
if(xmlhttp.readyState!=4) return;
if(xmlhttp.status!=200)
alert("Problem retrieving XML data: "+xmlhttp.statusText);
return;
y=xmlhttp.responseXML.documentElement.getElementsByTagName("response");
alert(y.value);
//alert(xmlhttp.statusText);
txt="<div style='overflow:auto;height:400px;width=1200px' align='top'>";
txt=txt+"<table border='1' style='border-collapse: collapse' bordercolor='#111111' width='100%'>";
txt=txt+"<tr bgcolor='#D3D3D3'>";
txt=txt+"<th width='5%'> </th>";
txt=txt+"<th width='10%'>UID</th>";
txt=txt+"<th width='7%'>PUBLICATION</th>";
txt=txt+"<th width='10%'>INFRASTRUCTURE</th>";
txt=txt+"<th width='10%'>PROJECT</th>";
txt=txt+"<th width='10%'>STATUS</th>";
txt=txt+"<th width='10%'>CAPACITY</th>";
txt=txt+"<th width='10%'>STARTUP</th>";
txt=txt+"<th width='28%'>NOTES</th>";
txt=txt+"</tr>";
x=xmlhttp.responseXML.documentElement.getElementsByTagName("tracked-item");
for (i=0;i<x.length;i++)
txt=txt + "<tr bgcolor='white'>";
txt=txt+ '<td width="5%"><html:link action="Unpub" name="lng" property="uri"><img src="./images/Unpub.png" height="16" width="16" border="0" title="UnPublished Icon">';
xx=x.getElementsByTagName("uri");
document.getElementById('uri').value=xx[0].firstChild.nodeValue;
try
txt=txt + "<td width='10%'><input type='text' name='uri' value="+ xx[0].firstChild.nodeValue +">" + xx[0].firstChild.nodeValue + "</td>";
catch (er)
txt=txt + "<td width='10%'> </td>";
txt=txt+'</html:link>';
xx=x[i].getElementsByTagName("Publication");
try
txt=txt + "<td width='7%'>" + xx[0].firstChild.nodeValue + "</td>";
catch (er)
txt=txt + "<td width='7%'> </td>";
xx=x[i].getElementsByTagName("infraStructure");
try
txt=txt + "<td width='10%'>" + xx[0].firstChild.nodeValue + "</td>";
catch (er)
txt=txt + "<td width='10%'> </td>";
xx=x[i].getElementsByTagName("project");
try
txt=txt + "<td width='10%'>" + xx[0].firstChild.nodeValue + "</td>";
catch (er)
txt=txt + "<td width='10%'> </td>";
xx=x[i].getElementsByTagName("status");
try
txt=txt + "<td width='10%'>" + xx[0].firstChild.nodeValue + "</td>";
catch (er)
txt=txt + "<td width='10%'> </td>";
xx=x[i].getElementsByTagName("capacity");
try
txt=txt + "<td width='10%'>" + xx[0].firstChild.nodeValue + "</td>";
catch (er)
txt=txt + "<td width='10%'> </td>";
xx=x[i].getElementsByTagName("startup");
try
txt=txt + "<td width='10%'>" + xx[0].firstChild.nodeValue + "</td>";
catch (er)
txt=txt + "<td width='10%'> </td>";
xx=x[i].getElementsByTagName("notes");
try
txt=txt + "<td width='28%'>" + xx[0].firstChild.nodeValue + "</td>";
catch (er)
txt=txt + "<td width='28%'> </td>";
txt=txt + "</tr>";
txt=txt+ "</table>";
txt=txt+ "</div>";
document.getElementById('tab').innerHTML=txt;
</script>
</head>
<body onload="loadXMLDoc()" bgcolor="#D8D8BF" >
<html:form action="Unpub" styleId="searchForm">
<%@ include file="header.jsp" %>
<img src="./images/Unpub.png" height="16" width="16"/> --> Unpublished Data
<br><br><br><br>
<html:hidden property="country" name="lng"/>
<html:hidden property="uri" name="lng"/>
<html:text property="uri" name="lng"/>
<input type="hidden" id="url" value='<%=application.getInitParameter("url")%>'>
<div style="overflow:auto;height:400px" align="top">
<div id="tab"></div>
</div>
</html:form>
</body>
</html>
Here is my code.... my intension is ... when i click the <html:link> which is there in the script i want to get the corresponding rows 'uri'. and that uri i need to pass to the bean.
Here in this case my problem is which ever icon i press i'm able to get the last uri
for ex:- if there are 10 records displayed in tabular format. if i press any icon i'm getting only the 10th uri....
So, kindly please help me to sort out this problem.Hi Gobinath,
Please check the below similar links
How to display a HTML Page in Webdynpro (without IFrame)?
can i embed an html page in the webdynpro
HTML Editor in WebDynpro
How to connect to a html using webdynpro
Hope that helps
regards
Anil
Message was edited by:
Armin Reichert -
I am trying to convert a PDF into a document that can be edited - it's a client feedback form. I am using Adobe forms Central and it's saying that it can't use my document.
Hi Michelle ,
We are extremely sorry that you have had a bad experience with Adobe .
As far as your issue is concerned ,Acrobat generally prompts for internet connection as it is required to activate the product before you could use it comfortably .Once the product is activated or licensed you would be able to use the software offline .
This could be the possible reason you are experiencing this .Please check if you have done so and still facing this .And if you have not ,you need to license/activate your product by typing in your credentials ,i.e Adobe ID and password .
You could also refer the following link to get updated about the activation of your product .
https://helpx.adobe.com/x-productkb/policy-pricing/activation-deactivation-products.html#a ctivate-how-to
Regards
Sukrit Dhingra -
How to use HTML Tags in webdynpro java
Hi,
Can any body tell me how to use HTML Tags in webdynpro java.
If u provide me with sample code it will become more usefull.
Thanks & Regards,
SNHI,
Please find the steps:
Create a html file and store in your webdynpro project
Add the html contents in your file
& Create a IFRAME UI element and refer you html file
Now you able to see the html in webdynpro
Thanks & Regards,
Ram -
How to use an object's paint method
I have created a class imagePanel which extends a jPanel to display an image. When I create a new imagePanel object I pass it an image argument which is used to paint my image on the jPanel, so far so good. I don't wish to have to continuously create new ImamePanels to display new images so I thought I could make a set_Image method that would set a new image in an exising imagePanel object. This is where I run into problems how to use the existing object paint method to replace the image. I tried this without success:
public Image setMyImage (Image myImage)
imageX = myImage; // imageX is the image that is painted by the imagePanel object's paint method
paint(g);
Something must be wrong on how I access the paint method. Thanks for any help.
JackYahoooo, got it. This was the code I needed and thanks for your help:
public void setImage (Image myImage)
imageX = myImage;
repaint(300);
} -
Understanding how BB manage HTML in emails and attacchments.
Hi all,
I'm trying to understand how BB manage HTML in emails and in attachments.
I created a simple HTML table with some color and no particular complications.
If I send this table as a HTML email on my BB it will be showed correctly, with all color and attribute shown.
If I package this html code into a file named try.html and than I send it as an email attachments on my BB I lost many attribute, including colors.
Can you explain me why and eventually how to solve this problem?
Thanks.I too am somewhat annoyed by the manner in which messages are displayed using the standard e-mail inboxes. I recently started using the Gmail application for my personal e-mail and am very happy with how cleanly messages are displayed. I hope I can find a similar application to handle my other addresses, because it is very difficult to scroll through a large volume of mail that contains HTML and URLs every day.
If anyone knows of an application that more cleanly displays messages, please do tell. Otherwise, I'm going to be doing a bit of research this evening to see what I can find. I'll post back with my findings. -
How to hide specific form actions
We have a requirement from our authors to remove unwanted form actions. I assumed that this would be permission specific and went into the content-author group and removed read ability for those actions from under /libs/foundation/form/components/form/actions/
And yet they still appear.
Is there another location that I shouldbe setting the permissions or do these just show up regardless?Hi,
It should works like you wrote by set proper permissions for a group of users, but I just chekced in my local repository and it is working like in your case.
If you want check from where are taken form actions values in the dropdown first of all you need to check configuration for this field which is stored under:
- /libs/foundation/components/form/start/dialog/items/tabs/items/second/items/actiontype
As this is a widget with xtype='formactionselection' then please take a look into js file which is implementation for this widget:
- /libs/cq/ui/widgets/source/widgets/wcm/FormActionSelection.js
There you find that the values in the dropdown for this filed are populated by calling :
- /bin/wcm/foundation/forms/actions.json
and of course setting permissions should solve this problem.
In my opinion this a bug or I missed something, so only thing which I can suggest at this moment is to customize a little bit this widget.
For example you can create a sort of actions which are used only by users in the /apps/project_name/form/actions (copy only those which are used from /libs/foundation/form/components/form/actions/) and then customize the widget by changing a path from
/bin/wcm/foundation/forms/actions.json to /apps/project_name/form/actions.json
I hope this helps you somehow to understand this issue more deeply.
Regards,
kasq -
I know nothing about how to use my new ipod and when reading the little information that came with it, all I can do is turn it on. Then in a few seconds it goes black, never having brought up a screen to do anything! Help! What do I do to get this thing going?
You might consider connecting it to the charger and charging up the battery overnight.
Please Get the iPod Touch User Manual for iOS 5 -
How to use HTML Tags in Smartforms
Hi,
Can you please help me out in knowing how to use HTML tags in Smartforms,
suppose i want to display some text in BOLD i should use the tag </b> as shown
</b> Header Information <b>
regards
RanveerHi Ranveer ,
check this following links,
hope this wil helps you
<a href="http://sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/abap%20code%20samples/smartforms/smartform%20in%20abap.pdf">check this link,to know abt HTML in smartforms</a>
rgds,
shan -
How to use the selection profile and status profile for production order?
Hi expert,
I want to know how to use the selection profile and status profile for production order. what's the usage for these two selection profile and status profile ?
Please help me.
thanks in advance.
george.shiHi George,
There are are two types of statuses.One is system status and second one is user status.These statuses will tell us current situation of an order.
We can't change system statuses.But we can create our own statuses through status profile.With this profile we can control user statuses.
In this status profile,
1.We define the sequence in which user statuses can be activated,
2.We define initial statuses
3. Allow or prohibit certain business transactions.
Selection profiles are used to select the objects (say production orders) with different status combinations.We assign status profiles to selection profiles in BS42 T-Code.
Regards,
Raja.
Edited by: Rajarao on Oct 30, 2008 6:21 AM
Edited by: Rajarao on Oct 30, 2008 6:22 AM -
How to use external hard drive and iTunes together?
how to use external hard drive and iTunes together?
Yes I did get to that part.... I went trough external to retrive itunes folder... When I selected the folder, it said that it was locked, choose another folder... I then went to my external again to my itunes folder and and used command I to see if folder was locked and it wasn't.... it was suggested on another forum to reboot.. which I did and still same problem... All I want to do is link my external hard drive that has my itunes playlist from another Mac to my new one.. and to also use the external as the main source for adding new songs to my playlist...
-
How to use real-time tracking and filing in EchoSign
Click the link to learn how to use the notification, tracking, and filing features available in the Adobe electronic signatures service, EchoSign.
Hi,
You can observe the data for executables with the RTSM. Just be sure to
first go to the Tolls>>RT Taget [x.x.x.x] Options and configure
the VI Server to use TCP. Then add your desktop machine to the Access
List on the TCP/IP Access tab. Now VI server should be able to export
the info. about the executable.
Richard
Applications Engineer
http://www.ni.com
Richard
Field Sales Engineer, New Jersey
National Instruments -
How to use a thirdparty look and feel
how to use a thirdparty look and feel
i download some from
http://javootoo.l2fprod.com/
but how to use?Include the downloaded jar file in your classpath.
Then during startup of your application, call UIManager.setLookAndFeel(className) where className is the class name of your Look & Feel
Maybe you are looking for
-
I'm trying to use the PDF and am having problems.
I'm trying to use the PDF but I'm ever problems.
-
Compression failed - Inventory Cube - 2LIS_03_BX
HI Experts, the compression of the initial request from datasource 2LIS_03_BX failed. The compression will be done with "no marker update". On the development system it works fine, but on the test system the compression failed. The time dimension is
-
What kind/size/format/color space photo for making books?
Let me make that simpler. I have Tiffs on a drive I want to drag into iPhoto to turn into a book. Should I use tiffs? Jpgs? 16 or 8 bit? RGB or sRGB? Maybe iPhoto makes them what they need to be when I order a book? I haven't tried this at all yet so
-
HT4623 can i update my IPOD that has ios 4.2.1 to a least 6.0
can i update my IPOD that has IOS 4.2.1 to a operation system that is at least 6.0 or higher
-
Change Limit in Inspection lot.
Dear All, I have question, In the result recording screen (Transaction is QE51N,QE11,etc) there are some option that are not available, I mean they are found disable that I can't click & check the functionality of it. E.g. In RR screen Goto>Change un