Jump to content


  • Posts

  • Joined

  • Last visited

Recent Profile Visitors

406 profile views

juancoffee's Achievements

  1. Whoa! That shows that the best options are often the simplest. Works a treat - thanks MayMusic
  2. Does anyone know if the width of a Google map (with the mash up) can be set to dynamically resize, depending on what device it is viewed on? I don't want a set size, I want it to be the width of what ever device is used.
  3. Ooh - that's a good idea! I'll give it a try and see if it works...
  4. Hello Javascript Gurus out there I have been trying (for quite a while) to generate a user's latitude and longitude on a report automatically - to use them with a distance search. There are various topics on this forum (such as http://forums.caspio.com/index.php/topic/4205-html-block-to-detect-geo-location/?hl=geolocation), but none do quite what I want. If I try and adapt any of them, passing them from a submission form as parameters for example, I get an error code 'number too long' when I try and use the latitude and longitude to search with. Caspio's excellent Store Locator app does it with the mobile search, but it requires a button to be pressed ('Use my current location'). When I've tried to alter this to suit my needs, I've just ended up breaking it! Ideally, I would like to put the javascript in the beginning of a report and automatically populate the latitude and longitude search fields. In other words, a user would just open the report and it would automatically show venues closest to their current location (mobile or laptop), without them having to click anything. Any help [very] greatly appreciated. Duncan
  5. Hello All Does anyone know how to change the submission form with a time limit (http://howto.caspio.com/tech-tips-and-articles/advanced-customizations/how-to-add-a-time-limit-to-submission-forms/) so as it diverts to another webpage (unsubmitted) if someone doesn't complete it in time? Currently, it submits itself automatically. Many thanks Duncan
  6. Hi Jan That's great - thanks very much for your help with this. I should be able to work out how to put it all together now. Thanks again - it is very much appreciated. Regards Duncan
  7. Hi Jan Thanks for this. Yes, I'd seen that article. The bit I can't do however is take that data and compare it against set data in my tables. With a little fiddling about, I can get the 'lat' and 'long' to compare against those that I have specified. I started to get really confused though when i tried to build some tolerance in. If the acceptable area is a reasonable size (a sports hall, or supermarket for example) then the specific latitude and longitude only will be too restrictive. That was when my brain (which is admittedly very small) started to melt down... Duncan
  8. Hello All I want to restrict what geographic location users can submit my forms from. Basically, I want the form to look up the latitude and longitude and match it against ones on my table. Then (within a couple of hundred feet or so) I want it to either- Accept the location the user is at as being the one I've agreed and submit the data Don't accept the user's location (they are more than a couple of hundred feet away from the latitude and longitude on my table) and put up an error message 'Sorry - you are not in the right location to complete this form'. I know this can be done, but it is way above my technical ability I'm afraid. Any help from you wonderful useful people out there? Your hopefully Duncan
  9. Hello All I'm trying to integrate a QR code generator in my Caspio data page. It works easily enough when using a simple URL, but I don't know how to include Query strings. As an example, if I use https://chart.googleapis.com/chart?chs=150x150&cht=qr&chl=http://website.com then it works fine. If I try and include query strings at the end though, for example- https://chart.googleapis.com/chart?chs=150x150&cht=qr&chl=http://website.com&name=fred&email=fred@aol.com it doesn't work. I've tried encoding the URL, but that doesn't work either. Any help would be very gratefully received. Thanks Duncan
  10. That's fantastic - thanks for your help guys!! I REALLY appreciate it. I'd been fiddling around for weeks trying to solve that on my own... Duncan
  11. I could be wrong (and I'd like to do this too) but I think it is something that only Caspio Professional Services can do. You'd need to contact them for a quote.
  12. Hello I have two fields in my submission form - date and day. The customer selects date (via calendar pop up text field). I need the day field to automatically be populated by the day of the week from the date input (so someone inputs 25/12/2013 and the day field automatically says 'Wednesday' or whatever). Currently, I'm tackling this in a very roundabout way, by passing a long date to a report data page and then using rules (if date contains 'Monday' then hide section 1 etc). This is laborious and requires the user to click again on a url link. There must be an easier way. Does anyone know how? Ideally some javascript to just take the day of the week from the date field would be good. If that's not possible, then javascript that basically says "if [@field:date] contains 'Monday' then go to data page XXXXXXX" All help appreciated. Thanks Duncan
  13. Hello It is ok if I view it on another computer. I guess it must cache the IP or something... (clearly I've no idea really). Anyway, it works - so that's great. Thanks very much; I really appreciate your help.
  14. That's great - thanks for the help. Your code is great - thanks MayMusic. One thing though; how do I stop the pop up saying 'The page at b6.caspio.com says' at the top. I just want it to say 'Choose a date after today' Thanks
  15. Hello I'm a bit of a Caspio newbie and pretty unskilled (ok - very unskilled!) at Javascript. I have a couple of, hopefully small, issues that I assume I need some basic javascript to solve. I've tried adapting code that I've found elsewhere, but I don't really know what I'm doing:- 1.I have a field called 'maximum_people' and one called 'no_of_people'. I need to restrict the number of bookings received on a given date, so if I create a report datapage (filtering by date) I need to add up all the 'no_of_people' submissions, and then have the form stop if it >='maximum people'. I suppose I need something like- <script> if(SUM[@field:no_of_people] <[@field:maximum_people]) { document.write("<a href='http://b6.caspio.com/dp.asp?AppKey=504f20004a6cefd06ad94881b12c&Course_ID=[@field:Course_ID]'>Signup</a>"); } else { document.write("<p>Signup Closed</p>") } </script> 2.)The second thing is a simple block to ensure that no bookings are made before today (as the Caspio calendar allows any date to be selected, even in the past)- I guess it is sort of like- <script> if([@field:date] >="today") { document.write("<a href='http://b6.caspio.com/dp.asp?AppKey=504f20004a6cefd06ad94881b12c&Course_ID=[@field:Course_ID]'>Signup</a>"); } else { document.write("<p>Sorry, we can only take bookings from tomorrow onwards</p>") } </script> I'm flying blind though, and there are probably 101 better ways to achieve what I need. Hopefully someone can help... Duncan
  • Create New...