![]() |
RDD problem |
Post Reply
|
| Author | |
rich-erich
Senior Member
Joined: 18 December 2008 Location: United Kingdom Status: Offline Points: 735 |
Post Options
Thanks(0)
Quote Reply
Topic: RDD problemPosted: 14 January 2013 at 10:01am |
|
Hi
We are using Jquery mobile to build our mobile site. Problems are caused if scripts are placed in the page body In our case stops the page loading) and so these need to be placed in the header. We use RDD to call up prices and stock, the code of which for our standard site is placed in the body next to where we want the amount to appear eg Priced at £<SCRIPT LANGUAGE="JavaScript">document.write(roc_rdd_price_WBSMF);</SCRIPT> Does anyone know how we would put the script in the header then call it in the body? Thanks Rich |
|
![]() |
|
rich-erich
Senior Member
Joined: 18 December 2008 Location: United Kingdom Status: Offline Points: 735 |
Post Options
Thanks(0)
Quote Reply
Posted: 14 January 2013 at 11:57am |
|
Support
I am now thinking it is document.write that is incompatible with html 5. Is there a solution? |
|
![]() |
|
Support Oliver
RomanCart Team
Joined: 06 April 2010 Status: Offline Points: 333 |
Post Options
Thanks(0)
Quote Reply
Posted: 14 January 2013 at 2:23pm |
|
Hi,
Our team is looking into this and running extensive tests. We will get back to you as soon as possible. If you have any sites where this appears to be happening live or screen shots of fails or other examples of this please feel free to send them to support@romancart.com. Any further details on this issue would really help our team. Kind Regards Oliver |
|
![]() |
|
rich-erich
Senior Member
Joined: 18 December 2008 Location: United Kingdom Status: Offline Points: 735 |
Post Options
Thanks(0)
Quote Reply
Posted: 14 January 2013 at 2:55pm |
|
I have emailed a live example.
|
|
![]() |
|
Support Oliver
RomanCart Team
Joined: 06 April 2010 Status: Offline Points: 333 |
Post Options
Thanks(0)
Quote Reply
Posted: 14 January 2013 at 3:56pm |
|
Hi,
This is a problem with jQuery Mobile, not HTML5. It uses Ajax to load pages, which causes follow-on page Javascript coding to fail. You need to clear the Ajax out of the next page’s “DOM cache” before running the document.write command. Here’s the code to fix the problem. Change the link in rdd1.html to include the following tag: data-ajax=”false”. So… <p><a href="rdd2.html" data-ajax="false">RDD Test A</a></p> If you want to use jQuery Mobile in the next page, you can use the following code to replace the document.write command with a jQuery statement… <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>RDD Test A</title> <SCRIPT LANGUAGE="JavaScript" SRC="http://remote.romancart.com/datacache.asp?storeid=41640&categoryid=2&categorybid=6&categorycid=12"></script> <script src="http://code.jquery.com/jquery-1.7.1.min.js"></script> <script type="text/javascript"> $(document).ready(function() { $("#ShowRRD").append(roc_rdd_price_WBSMF); }); </script> </head> <body> <div id="ShowRRD"></div> </body> </html> I hope this is helpful. Kind Regards Oliver |
|
![]() |
|
Post Reply
|
|
|
Tweet
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |