Jump to content

luizcruz

Members
  • Content Count

    14
  • Joined

  • Last visited

About luizcruz

  • Rank
    Member

Recent Profile Visitors

396 profile views
  1. Hello! Studying the "Caspio Bridge Microsoft .Net Framework Sample", that is a general example of WS API usage in C# .Net Windows applications and demonstrates the object de-serialization and usage of SelectDataXML and ListObjects WS API methods, we could connect to our Caspio Bridge tables via WS API and Select our field values. The sample code below is working perfectly! using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using System.Timers; using dataPhase.com.caspio.c0bkr041; using System.Web.Services.Protocols; using System.Xml; namespace dataPhase { public partial class Form1 : Form { private static CaspioBridgeAPI soapClient; public Form1() { InitializeComponent(); soapClient = new com.caspio.c0bkr041.CaspioBridgeAPI(); } private void button1_Click(object sender, EventArgs e) { string sXML; IDictionary<string, string> sRecord = new Dictionary<string, string>(); XmlDocument mXMLDoc = new XmlDocument(); XmlNodeList mList; XmlNode mNode; sXML = soapClient.SelectDataXML("AccountID", "Profile", "Password", "My_Users", false, "", "User_ID=" + textBox3.Text, "", false, false, true, false); mXMLDoc.LoadXml(sXML); mXMLDoc.Save("My_Users.xml"); mNode = mXMLDoc.SelectSingleNode("// My_Users"); mList = mNode.SelectNodes("./*"); foreach (XmlNode mFieldNode in mList) { sRecord[mFieldNode.Name] = mFieldNode.InnerText; } textBox1.Text = sRecord["First_Name"]; textBox2.Text = sRecord["Last_Name"]; textBox5.Text = sRecord["Phone"]; textBox4.Text = sRecord["Address"]; } private void Form1_Load(object sender, EventArgs e) { textBox3.Text = "Enter User ID"; } } } Now we would like to learn how to insert and update data in our Caspio Bridge database! Please, Could someone show us how to add a new user information using the same approach? and how we could update a specific user information? Best Regards! Luiz
  2. Hi! I would like to say the jQuery solution to hide/show div I mentioned in this post, was provided by "Ashley Ford" and you can find the detailed tutorial in the following url! Simple jQuery Show/Hide Div http://papermashup.com/simple-jquery-showhide-div/ Best Regards! Luiz
  3. Hi! Fortunately I managed to solve the issue! The mistake I was making was trying to use "class" instead of "id". Now I understood that in this case, the reference to the HTML field is taken through the id property. 1) wrong way ==>> $('.InsertRecordField_name').click(function(){ 2) Correct way ==>> $("#InsertRecordField_name").click(function(){ Ps: InsertRecord to submission forms and EditRecords to Update forms! Regards! Luiz
  4. Hi! I'm testing a JQuery script to hide/show divs and it's working successfuly, and I consider this approch very nice to hide/show fields, because it does not cause any problem with alignment of the fields! This solution as is requires we click in the respective weblink to show and hide the fields! But I need to make a little change, I would like to trigger this function when the corresponding checkbox is checked, e.g. when the checkbox "x" is checked show div "x", and when it is unchecked hide div "x"! The triggers to call this function would be the following: 1) "Ir para o Trabalho" checkbox instead "Show/hide_1" weblink! 2) "Ir para o Colégio/ Faculdade/ Pós Graduação" checkbox instead "Show/hide_2" weblink! Please, could someone help me set these triggers? My url page is: http://sa1.caspio.com/dp.asp?AppKey=58733000aac8a3fdae8b45deb24a The script I'm using is the following: <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.js" type="text/javascript"></script> <script type="text/javascript"> $(document).ready(function(){ $(".slidingDiv1").hide(); $(".show_hide1").show(); $('.show_hide1').click(function(){ $(".slidingDiv1").slideToggle(); }); }); </script> <script type="text/javascript"> $(document).ready(function(){ $(".slidingDiv2").hide(); $(".show_hide2").show(); $('.show_hide2').click(function(){ $(".slidingDiv2").slideToggle(); }); }); </script> Best! Luiz
  5. Hi Jan! Thank you very much! I had noticed this error, but even correcting this mistake the script still does not work! Regards! Luiz
  6. Hi Charlene! Please, What type are your fields? Dropdown, Checkbox? Luiz
  7. Hello Heisenberg! Before run the below script go to "Web Form Wizard - Destinations and Triggers to set the destination options: Destination after record submit: Go to a new page Page URL: [@Virtual1] =>> In your last script you forgot the last command "document.getElementById("caspioform").onsubmit=myFunction;" Try this script! <script> function myFunction() { var y = document.getElementsByName("InsertRecordWorkOrderDetail")[0].value; if(y == "M1 TDM"){ document.getElementById("cbParamVirtual1").value = "http://b6.caspio.com/dp.asp?AppKey=b9443000bc1de4154c364d53a0b5";} else if(y == "M1 Fiber"){ document.getElementById("cbParamVirtual1").value = "http://b6.caspio.com/dp.asp?AppKey=b94430008aaa7fbc77eb48df83f8";} } document.getElementById("caspioform").onsubmit=myFunction; </script> I hope it works! Regards! Luiz
  8. Hi Jan! Yes, you're right! "test" and "Test" will not work, it is wrong! But, unfortunately the problem is not the "test or Test", because the script above is just an hipotetical script! I tested with the true data, without the "t or T" issue, and it´s still does not work! Regards! Luiz
  9. Hi Heisenberg! I'm a Newbie too, but I would like to help you, Are you receiving the field [@field:WorkOrderDetail] as parameter from another DataPage or it´s part of the same DataPage? Your dataPage is a submission form? Regards! Luiz
  10. Hi, I'm trying to adapt the script provided by "Fangjie" to suit our needs but unfortunately it is not working yet! In our case we have dropdowns instead virtual fields! I'm trying the following: <script type="text/javascript"> function Display() { var sec = document.getElementsByName("InsertRecordRenova_Origem"); var dropdown = sec.options[sec.selectedIndex].value; if (dropdown == 'Select') { document.getElementById('Section3').style.display = 'none'; document.getElementById('Section4').style.display = 'none'; } if (dropdown == 'Yes') { document.getElementById('Section3').style.display = 'inline'; document.getElementById('Section4').style.display = 'none'; } else if(dropdown == 'No') { document.getElementById('Section3').style.display = 'inline'; document.getElementById('Section4').style.display = 'none'; } } document.getElementsByName("InsertRecordRenova_Origem").onchange = Display; </script> Please, anyone have any idea what is missing? Thanks! Luiz
  11. Hello Jan! Thank you very much! I tried the solution you provided, but unfortunately it not works yet! You understood correctly, in the first dropdown we have 9 options, 2 of them should toggle the visibility of two different sections! Regards! Luiz
  12. Hello Guys! I'm trying to "subscribe" to the dropdown's onchange event and change the section's visibility depending on the value selected. I would like to do the following: When I choose "Yes" in the dropdown Test_1 the "Section1" is visible When I choose "No" in the dropdown Test_1 the "Section2" is visible <script type="text/javascript"> var x = document.getElementsByName("InsertRecordTest_1")[0]; x.onchange = function() { var x = document.getElementsByName("InsertRecordtest_1")[0]; var Section1 = document.getElementById('Section1'); var Section2 = document.getElementById('Section2'); if(x == "Yes");{ Section1.style.display = 'inline' : 'none'; } else if(x == "No");{ Section2.style.display = 'inline' : 'none'; } } </script> Please, does anyone have any idea what's wrong? Thanks! Luiz
  13. Hi MayMusic! Thank you very much! Regards! Luiz
  14. Hi, I would like to redirect the user to a specific page after the form is submitted according to the option selected in a dropdown! I tried the following script but unfortunately it´s not working yet: 1) I created a Virtual field to redirect to the value of this Virtual field. 2) I Used the following code in the Footer of my DataPage. The value of Virtual1 should be defined by the dropdown selection! <script language="JavaScript"> function myFunction() { var x = document.getElementByName("InsertRecordMyOption")[0]; if (x == 'Yes'){ document.getElementById("cbParamVirtual1").value = "http://www.google.com/";} else if (x == 'No'){ document.getElementById("cbParamVirtual1").value = "http://www.yahoo.com/";} else if (x == 'Maybe'){ document.getElementById("cbParamVirtual1").value = "https://www.bings.com/";} } document.getElementById("caspioform").onsubmit=myFunction; </script> I set the [@Virtual1] field as form element "Hidden" could someone give me a hand? Regards! Luiz
×
×
  • Create New...