geoffdude Posted January 9, 2018 Report Share Posted January 9, 2018 Hello, Prior to the latest updates to CASPIO, the code I have below worked to pass the date of an event into the form I have iFramed into the page. <script type="text/javascript"> var eventday = "Wednesday"; var eventdate = "January 17, 2017"; var rsvpby = "Tuesday, January 16, 201"; document.getElementById('eventDayDate').innerHTML = eventday + ", " + eventdate; document.getElementById('rsvpby_date').innerHTML = rsvpby; document.getElementById('InsertRecordworkshop_date').value = eventdate; </script> Once the form was submitted the form field "workshop_date" captured the var 'eventdate' info, and sent it to me in the subject line and body of every RSVP. Doesn't work now.. so how do I get the event variable date to pass into the iframed form on page load now? Thanks, Geoff Quote Link to comment Share on other sites More sharing options...
Vitalikssssss Posted January 9, 2018 Report Share Posted January 9, 2018 Hi geoffdude, I know that onload event in no longer supported in Caspio after 10.0 release because of restriction applied by new deployment method. https://howto.caspio.com/release-notes/caspio-bridge-10-0/ A workaround solution described at the bottom of this article: https://howto.caspio.com/deployment/ Regards, vitalikssssss Quote Link to comment Share on other sites More sharing options...
geoffdude Posted January 9, 2018 Author Report Share Posted January 9, 2018 Thanks, but my javascript code is not part of the CASPIO form, it's placed externally at the footer of my page. When the page loaded, the script ran and placed the variable value of DATE into the iFramed Form Hidden Field. This no longer happens.. something broke. So.. in summary I'm trying to figure out -> How To Pass an External Parameter (Var Value) into an iFramed Form Field. Regards, Geoff Quote Link to comment Share on other sites More sharing options...
Vitalikssssss Posted January 12, 2018 Report Share Posted January 12, 2018 Hi geoffdude, You may try to use a method described in this topic in order to pass an external parameter to the iframe. Please note that your iframe source should have the same domain address as your web-page. Hope this helps. regards, vitalikssssss Quote Link to comment Share on other sites More sharing options...
geoffdude Posted January 13, 2018 Author Report Share Posted January 13, 2018 Actually, my iFrame for the CASPIO form is NOT the same domain as my web-page. My web page lives on another server, with another domain id. My web page is for providing info and details for a Home Morg. event. The CASPIO form is to RSVP to that event -and is iFramed into that page... the web page (on another domain) is running the javascript to send the var parameter of DATE into the CASPIO form on page load. Except, now it's not since the CASPIO update 10.0. Thanks for the link to the stackoverflow topic, but it didn't have any solutions for my specific issue. *Still looking for a solution. Best, Geoff Quote Link to comment Share on other sites More sharing options...
Kurumi Posted April 29, 2022 Report Share Posted April 29, 2022 Hi - To pass URL query string parameter to an iFrame, you may do the following: 1. Add an id attribute on your iFrame, like add id="myiframe". The deployment code should be like this: <iframe name="Some iFrame" title="Some iFrame" src="https://c1234567.caspio.com/dp/xxxxxxxxxxxxxxxxxxx" id="myiframe" >Sorry, but your browser does not support frames. Please, contact us.</iframe> 2. Once the id is added, copy and paste the code below in your webpage: <script language="javascript"> var iframe = document.getElementById('myiframe'); iframe.src = iframe.src + window.location.search; </script> You can change the name of the iframe id depending on your preference. What that code/script does is get the parameter query string of the current page and add the same query string to the iframe src. Hope it helps! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.