Jump to content

SDDENR

Members
  • Content Count

    17
  • Joined

  • Last visited

  • Days Won

    1

SDDENR last won the day on February 13

SDDENR had the most liked content!

About SDDENR

  • Rank
    Member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. I just got back to this and started looking everything over - particularly where this "function displ()" was coming from. In my footer on the datapage I had long ago commented out some old javascript code which was either used for testing or something. After needing to re-embed the datapage due to the old embed code no longer functioning, this commented out javascript is what started to cause the issue. I removed this javascript and everything works fine now. Thank you for pointing me in the right direction by asking me to check the code for errors in the Chrome debugger - that is what found the culprit:) Ron
  2. I am stumped. In my javascript code which is shown in the original post. I make no reference to "Section1" concerning ".style.display =" The only reference to Section1 I can find is in the caspio datapage itself where you have Header, Section1, your fields, HTML Blocks, Footer. If that is where the reference to Section1 is coming from, then I don't know how to work around it because you cannot delete Section1 from the Datapage. To really put my javascript ignorance on display, I didn't create a function called "function displ()" but it is throwing that function in the error statement in the Chrome console. My work around is to just display all the fields when the webpage loads rather than just the pertinent fields based on the users selection in a dropdown box. However, it will add clutter by showing a bunch of unnecessary fields. Ideas?
  3. I did as you suggested and here is the error statement: Uncaught TypeError: Cannot read property 'style' of null at HTMLSelectElement.displ (<anonymous>:10:36) and the error displayed in the debugger is as follows: function displ() { if (document.getElementById('InsertRecordpntype').value == 'aq') { document.getElementById('Section1').style.display='inline'; } else { document.getElementById('Section1').style.display='none'; } } document.getElementById('InsertRecordpntype').onchange= displ; The text I highlighted in blue above is highlighted in the debugger console. The CMS software I use is Dreamweaver. It sounds like I need to "unNull" a property but knowing how is another matter:) There is also the following alert (I guess you would call it that) about cookies but it sounds like that may an issue at some point in the future: A cookie associated with a cross-site resource at http://www.caspio.com/ was set without the `SameSite` attribute. A future release of Chrome will only deliver cookies with cross-site requests if they are set with `SameSite=None` and `Secure`
  4. I have a submission form which uses javascript to show certain fields (hidden in tables with display set to "none") and prepopulating those fields with content depending on the value of a selection made in a drop down list. This code has been working fine and still works in "Preview" mode within the Caspio dashboard. However, when I had to update the deploy code in our website to get the submission form to display, the javascript is no longer functioning on the live webpage. In the submission form I am using HTML blocks and code in the Footer.Here is an example of the HTML block code:<table id="Sec_aq" style="display:none;"><td><p><font face="arial"><b>Air Quality:</b></font></p>The next HTML block contains the closing tag for the above table and repeats the above for several more tables that are hidden when the page loads.Here is the footer javascript:<script>function link(){if (document.getElementById('InsertRecordpntype').value == 'aq'){document.getElementById('InsertRecordpnotice').value = 'https://denr.sd.gov/des/aq/publicnotices/';document.getElementById('InsertRecordaq_dp').value = 'https://denr.sd.gov/des/aq/publicnotices/';document.getElementById('InsertRecordaq_ar').value = 'https://denr.sd.gov/des/aq/publicnotices/';document.getElementById('Sec_aq').style.display='inline';}else if (document.getElementById('InsertRecordpntype').value == 'gp'){document.getElementById('InsertRecordpnotice').value = 'https://denr.sd.gov/des/';document.getElementById('InsertRecorddgp').value = 'https://denr.sd.gov/des/';document.getElementById('InsertRecorddgp_sob').value = 'https://denr.sd.gov/des/';document.getElementById('Sec_dgp').style.display='inline';}else if (document.getElementById('InsertRecordpntype').value == 'fp_cafo_npdes'){document.getElementById('InsertRecordpnotice').value = 'https://denr.sd.gov/des/fp/publicnotices/';document.getElementById('InsertRecordfp_rec').value = 'https://denr.sd.gov/des/fp/publicnotices/';document.getElementById('Sec_fp_rec').style.display='inline';}else if (document.getElementById('InsertRecordpntype').value == 'fp_cafo_individual'){document.getElementById('InsertRecordpnotice').value = 'https://denr.sd.gov/des/fp/publicnotices/';document.getElementById('InsertRecordfp_dp').value = 'https://denr.sd.gov/des/fp/publicnotices/';document.getElementById('InsertRecordfp_sob').value = 'https://denr.sd.gov/des/fp/publicnotices/';document.getElementById('Sec_fp_ind').style.display='inline';}else if (document.getElementById('InsertRecordpntype').value == 'gw_brn'){document.getElementById('InsertRecordpnotice').value = 'https://denr.sd.gov/des/gw/Brownfields/';document.getElementById('InsertRecordgw_brnplan').value = 'https://denr.sd.gov/des/gw/Brownfields/';document.getElementById('Sec_gw_brnplan').style.display='inline';}else if (document.getElementById('InsertRecordpntype').value == 'gw_dplan'){document.getElementById('InsertRecordpnotice').value = 'https://denr.sd.gov/des/gw/Public_Notices/';document.getElementById('InsertRecordgw_dapp').value = 'https://denr.sd.gov/des/gw/Public_Notices/';document.getElementById('InsertRecordgw_drep').value = 'https://denr.sd.gov/des/gw/Public_Notices/';document.getElementById('InsertRecordgw_dcon').value = 'https://denr.sd.gov/des/gw/Public_Notices/';document.getElementById('Sec_gw_dplan').style.display='inline';}else if (document.getElementById('InsertRecordpntype').value == 'sw_ir'){document.getElementById('InsertRecordpnotice').value = 'https://denr.sd.gov/des/sw/publicnotices/';document.getElementById('InsertRecordsw_dir').value = 'https://denr.sd.gov/des/sw/publicnotices/';document.getElementById('InsertRecordsw_dvir').value = 'https://denr.sd.gov/dfta/wp/tmdl/';document.getElementById('Sec_sw_dir').style.display='inline';}else if (document.getElementById('InsertRecordpntype').value == 'mm_app'){document.getElementById('InsertRecordpnotice').value = 'https://denr.sd.gov/des/mm/documents/';document.getElementById('InsertRecordmm_app').value = 'https://denr.sd.gov/des/mm/';document.getElementById('Sec_mm_app').style.display='inline';}else if (document.getElementById('InsertRecordpntype').value == 'sw_npdes'){document.getElementById('InsertRecordpnotice').value = 'https://denr.sd.gov/des/sw/PublicNotices/';document.getElementById('InsertRecordsw_dp').value = 'https://denr.sd.gov/des/sw/PublicNotices/';document.getElementById('InsertRecordsw_sob').value = 'https://denr.sd.gov/des/sw/PublicNotices/';document.getElementById('Sec_sw').style.display='inline';}else if (document.getElementById('InsertRecordpntype').value == 'og'){document.getElementById('InsertRecordpnotice').value = 'https://denr.sd.gov/des/og/documents/';document.getElementById('InsertRecordog_app').value = 'https://denr.sd.gov/des/og/documents/';document.getElementById('Sec_og_app').style.display='inline';}else if (document.getElementById('InsertRecordpntype').value == 'wra'){document.getElementById('InsertRecordpnotice').value = 'http://denr.sd.gov/dfta/wwf/publicnotices/';document.getElementById('InsertRecordwra_plan').value = 'https://denr.sd.gov/dfta/wwf/dwsrf/';document.getElementById('Sec_wra_plan').style.display='inline';}else if (document.getElementById('InsertRecordpntype').value == 'wm'){document.getElementById('InsertRecordpnotice').value = 'https://denr.sd.gov/des/wm/publicnotice/';document.getElementById('InsertRecordwm_dp').value = 'https://denr.sd.gov/des/wm/draftpermit/';document.getElementById('Sec_wm_dp').style.display='inline';}else if (document.getElementById('InsertRecordpntype').value == 'wp'){document.getElementById('InsertRecordpnotice').value = 'https://denr.sd.gov/dfta/wp/tmdl/pn/';document.getElementById('InsertRecordwp_as').value = 'https://denr.sd.gov/dfta/wp/tmdl/pn/';document.getElementById('Sec_wp_as').style.display='inline';}else if (document.getElementById('InsertRecordpntype').value == 'rules'){document.getElementById('Sec_rules').style.display='inline';}else if (document.getElementById('InsertRecordpntype').value == 'aq_nplan'){document.getElementById('InsertRecordpnotice').value = 'https://denr.sd.gov/des/aq/aqnews/';}else if (document.getElementById('InsertRecordpntype').value == 'aq_iplan'){document.getElementById('InsertRecordpnotice').value = 'https://denr.sd.gov/des/aq/aqnews/';}else if (document.getElementById('InsertRecordpntype').value == 'aq_excp'){document.getElementById('InsertRecordpnotice').value = 'https://denr.sd.gov/des/aq/publicnotices/';}else if (document.getElementById('InsertRecordpntype').value == 'fp_cafo'){document.getElementById('InsertRecordpnotice').value = 'https://denr.sd.gov/des/fp/publicnotices/';}else if (document.getElementById('InsertRecordpntype').value == 'sw_er'){document.getElementById('InsertRecordpnotice').value = 'https://denr.sd.gov/des/sw/publicnotices/';}else if (document.getElementById('InsertRecordpntype').value == 'dw'){document.getElementById('InsertRecordpnotice').value = 'https://denr.sd.gov/des/dw/pdf/';}else if (document.getElementById('InsertRecordpntype').value == 'mm'){document.getElementById('InsertRecordpnotice').value = 'https://denr.sd.gov/des/mm/documents/';}else if (document.getElementById('InsertRecordpntype').value == 'mm_ex'){document.getElementById('InsertRecordpnotice').value = 'https://denr.sd.gov/des/mm/documents/';}else if (document.getElementById('InsertRecordpntype').value == 'wmb'){document.getElementById('InsertRecordpnotice').value = 'https://denr.sd.gov/des/';}else{document.getElementById('InsertRecordpnotice').value = '';document.getElementById('InsertRecordaq_dp').value = '';document.getElementById('InsertRecordaq_ar').value = '';document.getElementById('InsertRecordgw_brnplan').value = '';document.getElementById('InsertRecordgw_dapp').value = '';document.getElementById('InsertRecordgw_drep').value = '';document.getElementById('InsertRecordgw_dcon').value = '';document.getElementById('InsertRecordsw_dir').value = '';document.getElementById('InsertRecordsw_dvir').value = '';document.getElementById('InsertRecordmm_app').value = '';document.getElementById('InsertRecordsw_dp').value = '';document.getElementById('InsertRecordsw_sob').value = '';document.getElementById('InsertRecordog_app').value = '';document.getElementById('InsertRecordwra_plan').value = '';document.getElementById('InsertRecordwm_dp').value = '';document.getElementById('InsertRecordwp_as').value = '';document.getElementById('Sec_aq').style.display='none';document.getElementById('Sec_dgp').style.display='none';document.getElementById('Sec_gw_brnplan').style.display='none';document.getElementById('Sec_gw_dplan').style.display='none';document.getElementById('Sec_sw_dir').style.display='none';document.getElementById('Sec_mm_app').style.display='none';document.getElementById('Sec_sw').style.display='none';document.getElementById('Sec_og_app').style.display='none';document.getElementById('Sec_wra_plan').style.display='none';document.getElementById('Sec_wm_dp').style.display='none';document.getElementById('Sec_wp_as').style.display='none';document.getElementById('Sec_rules').style.display='none';}}document.getElementById('InsertRecordpntype').onchange= link;</script> I am assuming since I updated the embed code, that action is connected as to why the above code no longer functions. However, I am clueless enough when it comes to javascript, that there may be something else going on. All I know for certain in preview mode within Caspio, it works fine. Thank you for any ideas as to how to rememdy this issue. Ron
  5. I think your understanding is correct. My next step will be to try and contact someone at Caspio and ask whether it is possible to change my current account plan from 2 deployed datapages to match the current offer of 3 deployed datapages on a free plan.
  6. I have created 3 datapages. In the "Deployed" column two are labeled "Enabled" and one is labeled, "Disabled." Any attempt at deploying the third page by clicking the "Enable" button results in the message about the deployed page limit being reached. I think I am being shorted one deployment at least, maybe three if Caspio honors the original 5 datapages as my dashboard shows. Thank you for your responses!
  7. Thank you for the response and link. I have 3 datapages and two are deployed. Even the link says I should be able to deploy 3 pages but when I try to deploy number 3 I get this message, "Deployed DataPage limit is reached. Upgrade account for more resources." As the dashboard screenshot indicates, I should have 5 datapages available so something seems to be broken.
  8. I have a paid as well as a free account used for a nonprofit. Under my "usage and billing" dashboard (see attachment) the free account inidicates "5 datapages included" and yet I am blocked from deploying a third page. If the number of datapages allowed has been reduced, shouldn't the dashboard reflect that or am I missing something? Anyone else having this issue? Thank you.
  9. Thank you Caspio Guru! I tried it and It works perfectly fine -- should have realized some sort of triggering event would be needed.
  10. I have a submission form with a couple of checkboxes. Ideally, it would be mandatory for one of the two checkboxes to be selected. However, my primary concern is that both checkboxes cannot be selected so I want to toggle off one when the other is checked. I have been playing around with other javascript code I have found on the Caspio forum but have not had any success getting it modified and working. Following is my attempted code on two checkboxes, one named "pure" and the other "mix". Any help for a javascript newcomer would be appreciated... <script type="text/javascript"> /* Get value of the Yes/No fields */ var cb_pure = '[@field:pure]'; var cb_mix = '[@field:mix]'; if (cb_pure == 'Yes') { /* make sure cb_mix is deselected */ document.getElementById("InsertRecordmix").checked=false; } if (cb_mix == 'Yes') { /* make sure cb_pure is deselected */ document.getElementById("InsertRecordpure").checked=false; } </script>
  11. I realize this is an old post but I stumbled across this same problem again and there is a solution. If you are using ver 4 of the map mashup, then replace this line of code: <script type="text/javascript" src="http://lib.caspio.com/pub/mashup/caspio_mashupsv4_jq.js"></script> with this line of code: <script type="text/javascript" src="http://lib.caspio.com/pub/mashup/caspio_mashupsv4_jq_g.js"></script> Doing so solved my problem of lat/longs plotting to the nearest street address rather than at the exact lat/long point. This information can be found at: http://howto.caspio.com/faq/map-mashup/how-to-use-geocodes-instead-of-address-in-map-mash-up.html
  12. I ran into the same problem and I am only dealing with 150 or so records. Prior to placing the data on Caspio I was using Yahoo and then Google to geocode addresses to lat/long values. Geocoding from within Caspio is painfully slow as noted. My problem occurred when Google apparently quit allowing use of automated queries to complete the geocoding. I tried MapQuest (since Yahoo has gone away) and that did not work well. Finally, I found a solution for the moment using Bing maps. This page has an example: http://msdn.microsoft.com/en-us/library/ff701714.aspx I can't be of much help as to how you will batch generate your lat/longs. I am using FoxPro to do so and that works for me at the moment (until Bing decides no automated querying for geocoding).
  13. ShWolf, Thank you for answering the question. It now makes perfect sense as to why it can't be done. The value for the @Field is already delivered by the server at the point when I am trying to tell it what to deliver through use of a variable. It is obvious now that the "big picture" has been explained. Thanks again!! Ron
  14. Bahar, Your assessment is correct and it sounds like a useful feature that Caspio has coming. There have been numerous times I have used javascript to display fields conditioned upon whether the field contains a value. Otherwise, using the caspio report interface, you end up with field labels for empty fields needlessly taking up space. I'm still curious though as to whether it is possible to use a javascript variable as part of an "@Field" field name when doing a loop. Thank you, Ron
  15. Thanks for being willing to take a look. Here is the initial search page from which you can work your way to a details page: http://denr.sd.gov/des/gw/Spills/dbspillsearch.aspx At this point I just went with the 50+ "IF statements" to get the page up and running. The links show up fine but are not active yet (I have to have our tech folks do a bit of mapping to make them available online). The IF statement got so long I had to break it across 2 HTML Blocks due to a 10,000 character limit. Ron
×
×
  • Create New...