RomanCart.com Forum Homepage
Forum Home Forum Home > RomanCart > Integration
  New Posts New Posts
  FAQ FAQ  Forum Search   Register Register  Login Login

RDD problem

 Post Reply Post Reply
Author
Message
rich-erich View Drop Down
Senior Member
Senior Member


Joined: 18 December 2008
Location: United Kingdom
Status: Offline
Points: 735
Post Options Post Options   Thanks (0) Thanks(0)   Quote rich-erich Quote  Post ReplyReply Direct Link To This Post Topic: RDD problem
    Posted: 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
Back to Top
rich-erich View Drop Down
Senior Member
Senior Member


Joined: 18 December 2008
Location: United Kingdom
Status: Offline
Points: 735
Post Options Post Options   Thanks (0) Thanks(0)   Quote rich-erich Quote  Post ReplyReply Direct Link To This Post 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?
Back to Top
Support Oliver View Drop Down
RomanCart Team
RomanCart Team


Joined: 06 April 2010
Status: Offline
Points: 333
Post Options Post Options   Thanks (0) Thanks(0)   Quote Support Oliver Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
rich-erich View Drop Down
Senior Member
Senior Member


Joined: 18 December 2008
Location: United Kingdom
Status: Offline
Points: 735
Post Options Post Options   Thanks (0) Thanks(0)   Quote rich-erich Quote  Post ReplyReply Direct Link To This Post Posted: 14 January 2013 at 2:55pm
I have emailed a live example.
Back to Top
Support Oliver View Drop Down
RomanCart Team
RomanCart Team


Joined: 06 April 2010
Status: Offline
Points: 333
Post Options Post Options   Thanks (0) Thanks(0)   Quote Support Oliver Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down



This page was generated in 0.067 seconds.