-
duhiminskAsked on May 16, 2015 at 8:02 AM
Hello, i have items url like this:
http://duhi-minsk.by/items#Versense_by_Versace_smell_24veto25n29e_myskysn29e_vol_100ml_price_329_000
I receive from Get Referrer only:
http://duhi-minsk.by/items
I'm using Jquery and "#" for item displaying.
Can you help me?
Page URL:
http://duhi-minsk.by/ -
JanReplied on May 16, 2015 at 10:30 AM
May I know what do you mean it is not working? Are you not getting the URL?
Please share the form where the widget is embedded. I checked your webpage and I found 3 JotForm forms embedded. Are they all embedded using iFrame?
-
JanReplied on May 16, 2015 at 10:38 AM
It is possible that there are conflicts between the scripts.
1. Use iFrame to avoid script conflicts.
<iframe id="JotFormIFrame" onDISABLEDload="window.parent.scrollTo(0,0)" allowtransparency="true" src="//form.jotformeu.com/form/FORMID" frameborder="0" style="width:100%; height:465px; border:none;" scrolling="no"></iframe>
<script type="text/javascript">window.handleIFrameMessage = function(e) {var args = e.data.split(":");var iframe = document.getElementById("JotFormIFrame");if (!iframe)return;switch (args[0]) {case "scrollIntoView":iframe.scrollIntoView();break;case "setHeight":iframe.style.height = args[1] + "px";break;}};if (window.addEventListener) {window.addEventListener("message", handleIFrameMessage, false);} else if (window.attachEvent) {window.attachEvent("onmessage", handleIFrameMessage);}</script>
2. If it is still the same, remove the script code below the iFrame code.
<iframe id="JotFormIFrame" onDISABLEDload="window.parent.scrollTo(0,0)" allowtransparency="true" src="//form.jotformeu.com/form/FORMID" frameborder="0" style="width:100%; height:465px; border:none;" scrolling="no"></iframe>
-
duhiminskReplied on May 16, 2015 at 10:52 AM
I can't using iframe because i need to import item name in form by jquery, so i export form for dreamweaver.
I can't insert item name in iframe, maybe it's possible, but i don't know how.
I tryed:
$('iframe').find('#input_1').val('Versace Birght Crystal(for example)')
not working
-
SammyReplied on May 16, 2015 at 12:33 PM
Actually to access an iframe content it need to originate from the dame domain, otherwise it is blocked for security reasons that's why you are not getting any value.
Without iframe embedding you will need to use the full jquery name to avoid conflicts
//$('iframe').find('#input_1').val('Versace Birght Crystal(for example)')
jQuery('#formID').contents().find('#input_1').val()
Try this and tell me how it goes
-
duhiminskReplied on May 18, 2015 at 5:03 AM
Thanks, it doesn't works, beacause of same-origin policy
So i will return to first question about Get Referrer
How to receive from Get Referrer all page adress, including # and all that goes over it?
-
SammyReplied on May 18, 2015 at 7:32 AM
To get the full URL of the referrer page use the following JavaScript
<script>
//get the current url and assign to avariable
var loc = window.location.toString();
</script>
This gets the url of the current page opened in your browser, i you have any further questions feel free to ask.
-
duhiminskReplied on May 19, 2015 at 8:19 AM
I know this. It works, but after form confirmation it redirects on captcha page, its not cool
-
Welvin Support Team LeadReplied on May 19, 2015 at 12:21 PM
Try to implement the jQuery noconflict in your website. It should help.
https://api.jquery.com/jquery.noconflict/
Let us know if you need further assistance.
Thanks
-
duhiminskReplied on May 23, 2015 at 7:35 AM
Thanks. Doesn't work. The iframe must be located on the same domain.
-
JanReplied on May 23, 2015 at 8:56 AM
Did you already apply the noConflict()? You need to add it before the JotForm script or code.