Jump to content

Search the Community

Showing results for tags 'javascript'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Caspio Bridge
    • General Questions
    • Caspio JavaScript Solutions
    • Tables, Views and Relationships
    • Import/Export and DataHub
    • DataPages
    • Deployment
    • Security, Authentications, Roles, SAML
    • Styles and Localizations
    • Parameters
    • API and Integration
    • Calculations and aggregations
    • User JavaScript and CSS Discussions

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


MSN


Website URL


ICQ


Yahoo


Skype


Location


Interests

  1. I have the following code in the footer and it produces a button on the bottom of my results page that works to redirect the user to another url. <script type="text/javascript"> if(!document.getElementById("norecord")) { document.write('<button onclick=document.location.href="https://www.myirlog.com/logbook/new-record-entry">No, Really, I want to add a new record</button>'); } </script> However, when I put that same code inside of an HTML block, it does not work: <script type="text/javascript"> if('[@field:participant_1_name]' != '[@authfield:Name]' && '[@field:participant_2_name]' != '[@authfield:Name]' && '[@field:participant_3_name]' != '[@authfield:Name]' ) { if('[@field:participant_2_name]' == '' || '[@field:participant_3_name]' == '' ) { document.write('<button onclick=document.location.href="https://www.google.com">take me away</button>'); } } </script> The buttons appear in both locations, but only the footer button works, when the in-line button (the one coded in the HTML block) is clicked, the whole page just refreshes instead of going to google.
  2. Javascript help please I have a web page on which I wish to display a hyperlink depending on the status of a specific field from my authentication table. The authorisation field “[@authfield:Staff_List_Branch_Type]” has two options which are “FS” or “SIS”. Depending on the authorisation of the user I would like to display a link that will take the user to a specific web page depending on their Branch_Type status. So if your autfield branch type is “FS” a link will display that will take you to web page A, however if your branch is “SIS” a link will display that will take you to web page B. There must only be one link displayed Any help or ideas greatly appreciated Steve
  3. Hi @abelphathost, Thanks for the message, but let's not ask questions privately.... the point of a forum is for people to find that somebody else has already asked the same question. A couple things to note 1 - I've had trouble using JS and Caspio's checkboxes. Dropdowns are easier to work with. 2 - I never use 'onsubmit'. Rather i create a fake submit button that runs that code I need before the submit happens then wrap the function with: document.getElementById("Submit").click() ** If you must have something easier than a dropdown... This takes some work, but will allow you to do it. HTML block <style> #YOUR_FIELD_ID {display: none} .fake-radio { width: 120px; height: 50px; padding: 16px; margin: 16px 0 0 32px; font-size: 18px; float: left; } </style> <div class="fake-radio" onclick="document.getElementsByName('YOUR_FIELD_ID')[0].value = 'Yes';>Yes</div> <div class="fake-radio" onclick="document.getElementsByName('InsertRecordFieldName')[0].value = 'No';>No</div> YOUR_FIELD_ID 1. right click the field you want to populate > inspect 2. Look for <xx class="sample" id="XYZ_98sd7d" name="InsertRecordYOURFIELDNAME">Hi World</xx> 3. your answer is InsertRecordYOURFIELDNAME Try these suggestions and I'm sure you'll find your solution
  4. Hi everybody, i need to update a field i the database when a checkbox is checked here is my code but it's not working: <SCRIPT LANGUAGE="JavaScript"> function Updatestatus() { if (document.getElementById("approved").checked==true) { document.getElementById("status")="approved"; } else if (document.getElementById("approved").checked==false) { document.getElementById("status")="pend"; } document.getElementById("update as").onsubmit= UpdateQty; </SCRIPT>
  5. The login data page is being blocked from being used as soon as the page renders. I checked the console and the embed code seems to be causing a problem. This is the message in the console. A Parser-blocking, cross-origin script, https://c4fot477.caspio.com/dp.asp?cbqe=QXBwS2V5PWM1NDQ1MDAwZGU1ZjUxY2RiMDJ…nI9YzU0NDUwMDBkZTVmNTFjZGIwMmU0MzNlODJiOQ==&cbEmbedTimeStamp=1487653960962, is invoked via document.write. This may be blocked by the browser if the device has poor network connectivity. See https://www.chromestatus.com/feature/5718547946799104 for more details. f_cbload @ embed.js:1 (anonymous) @ ?cbr=c544500…:56 The chrome status link talks about 2g connections. I'm on a desktop. Does anyone have a clue on what could cause this issue?
  6. When one of my end users fills out a form then need to use the barcode scanner. An example of the text would be "%247463$1$0$4$20%". My script below is suppose to extract everything after the first two characters up to the last character. It works but it is also showing the original along with it. <script> function modify() { //Store the value in the field to trim. var trim = document.getElementsByName("InsertRecordBarcode")[0].value; //Take a substring of trim and store it back into new trim value. trim = trim.match("%2(.*)%"); //Set the value of the weight field in the form to the new substring document.getElementsByName("InsertRecordBarcode")[0].value = trim; //the new value in the field is what is submitted. } //When the form is submitted called method modify. document.getElementById("caspioform").onsubmit=modify; </script> My result showing is "%247463$1$0$4$20%,47463$1$0$4$20". What am I doing wrong as I want it to only show the 47463$1$0$4$20. thank you.
  7. I want to create a JS if statement that updates a fields value based on another fields value. If the field Virtual2 does not equal "Don't Share" I want the field CON_1 to equal Virtual2 Here is what I used unsuccessfully in the footer of a details page in a tabular report data page... <SCRIPT LANGUAGE="JavaScript"> function con1() { var v2 = parseFloat(document.getElementById("InsertRecordVirtual2").value); if(v2="Don't Share") {} else {document.getElementById("InsertRecordCON_1").value = (v2);} } document.getElementById("caspioform").onsubmit=con1; </SCRIPT> CON_1 is a text data type and Virtual2 is a virtual field drop down that on default = "Don't Share" Thanks Guys! Any help would be greatly appreciated!
  8. In a Single Record Update form I'm trying to update different fields based on the value of a Virtual field. The Virtual field is loading with and External Parameter (number value). Depending on what value that Parameter is I need a specific field to update/change on when the 'Update' button is clicked. I don't want all fields to update, just a single specific field based on the value of the Virtual field. For example: If Virtual1= 3 then update myField1="mytext" If Virtual1=4 then update myField2="mytext" If Virtual1=5 then update myField3="mytext" Here's some code I'm working with but can't seem to get it right. It's in the footer of the Single Record Update form. <script> function changeVal() { var v_product = document.getElementByID("EditRecordcbParamVirtual1").value; if(v_product=="3") { document.getElementById('EditRecordmyField1').value = "Not Activated" } else if (v_product=="4"){ document.getElementById('EditRecordmyField2').value = "Not Activated" } else if (v_product=="5"){ document.getElementById('EditRecordmyField3').value = "Not Activated" } document.getElementById('caspioform').onsubmit = changeVal; </script> I tried this without the 'else if' part (for just the first If=3) but still couldn't get it to work. It's probably just some syntax- any help would be greatly appreciated.
  9. Does anyone know any code for collapsing or expanding sections in a Pivot Table and a Tabular table? For example lets say that column 1 is 'Regions' and Column 2 is 'Countries'. The pivot table table is set up to show all regions and all countries expanded. I'd like to set up a button outside the results table to be able to collapse all countries, all in one go, to just show region totals, without having to go through each region individually. Many thanks in advance.
  10. Hi! I have multiple scripts for a submission page. When I execute the page I am only able to get one to work at a time. Not all three. I am not sure what I am doing wrong. Any help or advice would be appreciated. I have pasted the scripts below. I have all the scripts in the footer of the page. The first simply checks that the MOQ field is greater than the Inner Pack field. The second checks that cost is less than retail. They third, if the virtual check box is checked, it will copy the data from the Vendor VPN field to the Vendor Style field. <SCRIPT LANGUAGE="JavaScript"> function check() { var v_moq = parseFloat(document.getElementById("InsertRecordMOQ").value); var v_innerpack = parseFloat(document.getElementById("InsertRecordINNERPACK").value); if(v_moq<v_innerpack) { window.alert("MOQ Must Be Less Than The Inner Pack"); return false; } } document.getElementById("caspioform").onsubmit=check; </SCRIPT> <SCRIPT LANGUAGE="JavaScript"> function check() { var v_cost = parseFloat(document.getElementById("InsertRecordCOST").value); var v_retail = parseFloat(document.getElementById("InsertRecordRETAIL").value); if(v_cost>v_retail) { window.alert("Vendor Cost must be less than Retail"); return false; } } document.getElementById("caspioform").onsubmit=check; </SCRIPT> <script> function f_vendorstyle() { if(document.getElementById('cbParamVirtual1').checked) { document.getElementById('InsertRecordVENDORSTYLE').value=document.getElementById('InsertRecordVENDORVPN').value; } else { document.getElementById('InsertRecordVENDORSTYLE').value=""; } } document.getElementById('cbParamVirtual1').onclick= f_vendorstyle; </script>
  11. Hi, My current code is: <SCRIPT LANGUAGE="JavaScript"> function update() { var p2 = document.getElementById("cpParamVirtual10").value; document.getElementByName("cpParamVirtual4")[0].value=p2; } document.getElementByID('caspioform').onload=update; <SCRIPT> and I have it deployed in the footer of a submission form however it is not working. Virtual10 is a hidden field that loads with a passed parameter . Virtual4 is a cascading dropdown ( and on exit passed the parameter that virtual10 loads). I want to set the cascading dropdown to the value it was when the form was submitted the last time instead of resetting itself every time. Thanks for the help.
  12. I have a simple pivot table with 'Years' field across the top and a 'Regions' field and a 'Countries' field down the side. The regions field is collapsible, so the User has the choice whether or not to show the countries inside each region. So far so good. Problem is that In the regions column I want to be able to show selected regions with the collapsible option, but I also want to show (in the same column) other selected regions which do NOT have the collapsible option and therefore just show the aggregate total of their countries. I know this is not a regular option, so I'd be willing to use javascript. Can anyone give guidance on the code to use to access selected fields and records in a pivot table, and also how to apply/remove the 'collapsible' feature at runtime. Many thanks
  13. Hi I notice whenever I use javascript within caspio datapage and do a preview, it seems to work. However when I save my datapage and have it deployed to my web environment, the script does not work at all. Anyone know why and how I can fix this? Thanks in advance.
  14. I'm trying to use an if statement in js that references a data field to see if there's a null value. I can't get the syntax to work though. Here's the code in the footer of a Details datapage: <script> var v_lk = parseFloat(document.getElementById("EditRecordmstrSuppliers_LinkedIn").value); if(!(v_lk) === "") { document.getElementById('section3').style.display = "inline"; document.getElementById('section4').style.display = "none"; } else { document.getElementById('section3').style.display = "none"; document.getElementById('section4').style.display = "inline"; } </script> What's odd is I got this code to work using a test field that was a number format, using <script> var v_lk = parseFloat(document.getElementById("EditRecordmstrSuppliers_TestNumberfield").value); if(!isNaN(v_lk)) So it seems like I'm just not referencing the 'live' field correctly because it's a text field instead of a number field. Does anyone know the correct way to reference a text field to check for null/blank values?
  15. In an html block on a Details datapage, I'm trying to show buttons with hyperlinks to social media pages using font awesome icons. The issue, though, is I need to show/hide these font awesome icons based on whether the datafield used for the url is null/blank or not. Basically, if the user has not entered a url link in the 'Facebook' field then I need to hide the Facebook font-awesome/hyperlink (because there is no url for Facebook for that record). I just want to show the social media links that have actual urls and hide those that don't. Here's the code to a couple of those hyperlinks (Facebook and LinkedIn- there are actually 6 in total but I didn't want to clutter this question). <div style="font-size:20px"><a href="[@field:myFacebookfieldname]" target="_blank"><i aria-hidden="true" class="fa fa-facebook-official"></i></a>&nbsp;&nbsp;<a href="[@field:myLinkedInfieldname]" target="_blank"><i aria-hidden="true" class="fa fa-linkedin-square"></i></a></div> For example, if [@field:myFacebookfieldname]=null then I need to hide (display:none) that hyperlink so it- the font awesome icon- doesn't show. I'm not a js expert so I hope someone here could help get this to work. Many thanks in advance. I was trying something like the below, to put the 'section1' attribute into the hyperlink above but that's not correct... <script> var v_fbook = parseFloat(document.getElementById("EditRecordmyFacebookfieldname").value); if(!isNaN(v_fbook)) { document.getElementById('section1').style.display = "block"; } else { document.getElementById('section1').style.display = "none"; } </script>
  16. Hi Hope someone can help me out here with my javascript problem. I have a submission form (which is multi-step form, 2nd page of a form which is now a update form) which is collecting information like project type, project name, description. It is cascading from project type -> project name -> description Because I can't do a cascading text area for "description". I have created a virtual text field for this value hoping to copy this into the "description" text area. I am having no luck with javscript which I have modify from what i found on this forum. Can someone please help me? This is what I have came up with. <script type="text/javascript"> // Caspio form elements var description = document.getElementById('EditRecordDescription'); var temp_description = getElementsByName("cbParamVirtual1")[0].value; var caspioForm = document.getElementById('caspioform'); // Event handler var Copy = function () { // TODO: assign value to description field description.innerHTML = temp_description; } document.getElementById("caspioform").onload= Copy; </script>
  17. Hi I am stuck with javascript doing multiple calculations in same datapage. 1st javascript is calculation of unit cost, no of units and total (in local currency) 2nd javascript is convert local unit cost to USD based on cascading dropdown field 3rd javascript is using unit cost (in USD), no of units to derive total cost (in USD) the 1st javascript seems to be working. But when I add on 2nd javascript, only one value shows and in the wrong field. There is also no error appearing in the web console. Eg javascript 1 calculation = virtual field 1 = virtual field 1 value javascript 2 calculation = virtual field 2 = virtual field 2 value Instead what i see is this javascript 1 = virtual field 1 = virtual field 2 value javascript 2 = virtual field 2 = blank I followed basically this script and did my own modification http://forums.caspio.com/index.php?/topic/6053-perform-calculations-in-submission-form/ I think the problem is I did not define 2 variable that points to virtual field 1 and virtual field 2 respectively. var totalField = document.getElementsByClassName('cbFormData')[0]; I need 2 of it, and I do not how to define for the 2nd virtual field. Also, how do I pass the the virtual field to a table field? I used the Pass field value as parameter, it does not seem to write into the table. Can anyone please help? <script type="text/javascript"> // Caspio form elements to calculate local total cost var unitcostField = document.getElementById('InsertRecordLocalUnitCost'); var unitsField = document.getElementById('InsertRecordUnit'); // var totalField = document.getElementById("cbParamVirtual1"); ** I tried using this to point to virtual field but it did not work ** var totalField = document.getElementsByClassName('cbFormData')[0]; // Caspio form elements to convert local to USD cost var exchangerateField = document.getElementsByName("InsertRecordExchangeRate")[0]; //var convertField = document.getElementById("cbParamVirtual2"); ** I tried using this to point to virtual field but it did not work ** var convertField = document.getElementsByClassName('cbFormData')[0]; var caspioForm = document.getElementById('caspioform'); // Event handler var calculateTotal = function (event) { // TODO: Do something on value change --> totalField.innerHTML = unitcostField.value * unitsField.value; } var calculateExchangeRate = function (event) { // TODO: Do something on value change --> convertField.innerHTML = (1/exchangerateField.value) * unitcostField.value; } // Run total calculation on input to any of these two fields unitcostField.addEventListener('input', calculateTotal); unitsField.addEventListener('input', calculateTotal); unitsField.addEventListener('input', calculateExchangeRate); unitcostField.addEventListener('input', calculateExchangeRate); </script> Thanks in Advance
  18. Hello, I have a search and report datapage where I have added an HTML block in the results section which has an iFrame element inside of it. I am trying to accomplish this: User processes a search, results are shown where some results will equal saved results from another table. So table (A) produces results that I want to cross-check to table (B). If there is a match based on an ID field in both tables (A+B), I want the iFrame element to show basic data (timestamp & user name). I was successful in doing this part... Here is where I am having problems.... If table (B) does NOT match (right now shows "No record found."), I want the iFrame to show another datapage which is a form submit (this is the form that copies the data from table (A) to table (B). I am actually able to get both of these parts working, but I cant get them to work together. So I can either get the results page to show a button that says "save" and then it saves that data from table (A) to table (B). But then it won't show the timestamp and user name after a page refresh. Or I can get the results page to show timestamps and user names even after a page refresh, but then I can't get the "Save" button/option to show. I need some sort of Javascript if/then option. Thank you for ANY help with this!!!
  19. Hi All, I'm new to the forum and Caspio. So I'm still on a journey of discovery and therein I have encountered a challenge. I'm looking for help in developing a javascript that returns an html symbol in the results page depending on the time that has lapsed from Date1. The idea is that the html symbol keeps changing color based on how much time has lapsed. The field only resets when there's status update. Below I have html symbol I was hoping would fullfil this objective... <h1><span style="color: #99cc00;">✪</span></h1> <h1><span style="color: #ff9900;">✪</span></h1> <h1><span style="color: #ff0000;">✪</span></h1> I'm not java savvy hence my approaching the forum....perhaps there's someone who can d this with their eyes closed. I have a clear objective in my mind of what I'd like to see happening but don't have all the requisite skills. Please see attachment for better idea of objective I look forward to hearing from you. Maynard (RSA)
  20. I use the below code in my caspio datapage under emails & destination as suggested by in the forum. It was working like a charm but suddenly now it does not work anymore. anyone can help with new code or why it is not working? <script> window.close(); window.onunload = function(){ window.opener.location.reload();} </script>
  21. <script type="text/javascript"> document.onkeydown = function () { sysend.broadcast(); }; var audio1 = document.getElementById("player"); window.addEventListener("keydown", playPauseKb, false); alert(audio1.id); //document.getElementById("audio1").onkeypress = function () { document.getElementById("audio1.id").onkeydown = function playPauseKb(event) { var x = event.keyCode; console.log(x); if (x == 113) { audio.currentTime -= 5;//F9 Rewined } else if (x == 114) { //event.data.$.preventDefault(); audio.currentTime += 5;//F11 forword } else if (x == 115) { if (audio.paused) { audio.play();//F10 paly/pause } else { audio.pause() } } sysend.broadcast(); }; </script> here I am getting id as alert but instead of displaying the id as alert I need to pass the id to multiple tabs and these multiple tabs are opened by the user dynamically to this dynamically opened mutiple tabs I need to pass the id in such a way that my extension works with keydown And when I am in that tab where I have audio this is my code <asp:TemplateField HeaderText="Play Audio File" ItemStyle-Width="200px" ItemStyle-HorizontalAlign="Center" > <ItemTemplate> <audio controls="controls" id="player"> <source src='<%# Eval("audio") %>' /> your browser does not support the audio element.</audio> </ItemTemplate> </asp:TemplateField> <script type = "text/javascript"> var audio = document.getElementById("player"); window.addEventListener("keydown", playPauseKb, false); function playPauseKb(event) { var x = event.keyCode; console.log(x); if (x == 120) { audio.currentTime -= 5;//F9 Rewined } else if (x == 122) { //event.data.$.preventDefault(); audio.currentTime += 5;//F11 forword } else if (x == 121) { if (audio.paused) { audio.play();//F10 paly/pause } else { audio.pause() } } } </script> which works with keydown but if user opens a new tab dynamically keydown is not working how can I control the audio with keydown from multiple tabs
  22. I am using Laravel as backend and bootstrap as frontend I am using transaction ID from orders in table. Now if user clicks on that transaction ID, then I want to display the order on Bootstrap Modal... Here is code of Frontend : <table id="example" class="table table-striped table-bordered " cellspacing="0" width="100%"> <thead> <tr class="bg-info"> <th><center>Transaction ID </center></th> <th><center>Shop Name </center></th> <th><center>Sales Man </center></th> <th><center>Processed ? </center></th> </tr> </thead> <tbody align="center"> @foreach ($ordersList as $order) <tr id = "tr_{{$order->id}}"> <a> <td id="{{ $order->transaction_Id }}" data-toggle="modal" data-target="#modal{{$order->transaction_Id}}" style="cursor:pointer;color:blue" onclick="getCollapseData(id)"><u> {{ $order->transaction_Id }} </u></td> <td>{{ $order->Shop }}</td> <td>{{ $order->Sales }}</td> <td> <input id="chk_{{ $order->id }}" type="checkbox" name="is_Processed" onclick="orderProceesed(id)"><br> </td> </a> </tr> <!-- Modal --> <div class="modal fade" id="modal{{$order->transaction_Id}}" role="dialog"> <div class="modal-dialog"> <!-- Modal content--> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal">&times;</button> <h4 class="modal-title">Modal Header</h4> </div> </div> </div> </div> @endforeach </tbody> </table> here is code of JavaScript Function : function getCollapseData(data) { //alert(data); $.ajax({ method : "GET", url: "orders.getCollapseData", data: {id: data}, success : function(response) { //alert(response); //$("#collapse"+data).empty(); //debugger; document.getElementById("modal"+data).innerHTML = ""; var receivedData = response; var html = ''; //alert("modal"+data); html += '<div class="modal fade" id="modal'+ data +'" role="dialog">'; html += '<div class="modal-dialog">'; //<!-- Modal content--> html += '<div class="modal-content">'; html += '<div class="modal-header">'; html += '<button type="button" class="close" data-dismiss="modal">&times;</button>'; html += '<h4 class="modal-title">'+ data +'</h4></div>'; html += '<div class="modal-body">'; html += '<table class="table table-striped table-bordered " cellspacing="0" width="100%">'; html += '<thead>'; html += '<tr class="bg-info">'; html += '<th><center> Product Name </center></th>'; html += '<th><center> Quantity </center></th>'; html += '</tr></thead>'; html += '<tbody align="center"><tr>'; for(i=0;i<response.length;i++) { html += '<td>' + receivedData.Product + '</td>'; html += '<td>' + receivedData.qty + '</td>'; } html += '</tr></tbody></table></div>'; html += '</div></div></div>'; document.getElementById("modal"+data).innerHTML = html; } }); } I am missing something and modal is not getting displayed
  23. I am trying to format multiple fields on a page. The first is the phone number, which I found the JavaScript for on the JavaScript forum. My issue is that I need to format phone number, social, and a tax-ID on one page and I am unsure how to accomplish this task. For phone number I am using the script below, plus I found another for formatting a social on StackExchange, but my JavaScript reading/writing skills are sub-par and I did not combine these correctly. Then I want to add in the option to format the tax ID as well, which is ##-####### (2 digits, dash, 7 digits). <SCRIPT LANGUAGE="JavaScript">function f_a(v_id){return document.getElementById(v_id);}f_a('EditRecordPhone_Number').maxLength = 14;f_a('EditRecordPhone_Number').onkeyup = function(v_e){v_e = v_e || window.event;if (v_e.keyCode >= 65 && v_e.keyCode <= 90){this.value = this.value.substr(0, this.value.length - 1);return false;}else if (v_e.keyCode >= 37 && v_e.keyCode <= 40){return true;}var v_value =(this.value.replace(/[^\d]/g, ''));if (v_value.length==7) {this.value = (v_value.substring(0,3) + "-" + v_value.substring(3,7));}else if(v_value.length==10){this.value = ("(" + v_value.substring(0,3) + ") " + v_value.substring(3,6) + "-" + v_value.substring(6,10));};}function(){document.getElementById("SSN").onkeyup = function() {var val = this.value.replace(/\D/g, '');var newVal = '';if(val.length > 4) {this.value = val;}if((val.length > 3) && (val.length < 6)) {newVal += val.substr(0, 3) + '-';val = val.substr(3);}if (val.length > 5) {newVal += val.substr(0, 3) + '-';newVal += val.substr(3, 2) + '-';val = val.substr(5);}newVal += val;this.value = newVal;};</SCRIPT>
  24. Can someone help with this javascript please...I'm using a submission form and one of the fields in the calculation is a cascading dropdown with a parent of Merchandise_ID and the other is a text input field. Not sure why its not working, but nothing is showing up in the destination field. <strong><span style="color:#000000;"></span></strong> <strong><span style="color:#000000;"> <div id="mypage1"> </div> <SCRIPT LANGUAGE="JavaScript"> function calculate() { var Gross_Qty_Sold = isNaN((parseFloat(document.getElementById("InsertRecordGross_Qty_Sold").value)))?0:(parseFloat(document.getElementById("InsertRecordGross_Qty_Sold").value)); var Merchandise_Cost = isNaN((parseFloat(document.getElementsByName("InsertRecordMerchandise_ID_Merchandise_Cost")[0].value)))?0:(parseFloat(document.getElementsByName("InsertRecordMerchandise_ID_Merchandise_Cost")[0].value)); var total= (Gross_Qty_Sold * Merchandise_Cost); document.getElementById("mypage1").innerHTML=' $'+total ; document.getElementById("InsertRecordGross_COGS").value=total.toFixed(2) ; } document.getElementById("InsertRecordGross_Qty_Sold").onchange=calculate; document.getElementsByName("InsertRecordMerchandise_ID_Merchandise_Cost")[0].onchange=calculate; calculate(); </SCRIPT> </span></strong>
  25. Hi, With the responsive gallery code ( on mobile), the results are confined to being separated by <tr>'s (or in some cases colspan="2") meaning that a field label can't be followed by it's value on the same line. I'm wondering if I hide the field label can I append the field label to the value using javascript? For instance: (as it exists) Booth # 34 For instance: (as I'm trying to do) Booth # 34 <---- ("Booth #" label hidden in datapage but appended to beginning of value through code) Never mind! I figured it out No JS needed!
×
×
  • Create New...