sanjeev Posted June 3, 2009 Report Share Posted June 3, 2009 I am working on a site where we have been able to integrate calendar spuds perfectly inside ASP pages, but only in IE. For some reason the spuds won't show at all in Firefox and Chrome. The only non-standard thing we are doing (from a Trumba implementation standpoint) is I am passing the webname to the spud script from a hidden form field (using DOM). I had to do this because the webname is stored in a database. The pages work like a charm in IE, but not in FF or Chrome. So I am thinking maybe something in my code below is causing the spud to not show up in FFox or Chrome? Please see code below: <script type="text/javascript" src="//www.trumba.com/scripts/spuds.js"></script> <script type="text/javascript"> $Trumba.addSpud({ webName: document.getElementById('trumbaname').value, spudType: "upcomingvcrawler", teaserBase: "http://www.dotcomcierge.com/calendar.asp?id="'>http://www.dotcomcierge.com/calendar.asp?id=" + document.getElementById('hotelid').value, detailBase: "http://www.dotcomcierge.com/calendar.asp?id=" + document.getElementById('hotelid').value }); </script> Any ideas why this might be failing? Quote Link to comment Share on other sites More sharing options...
Steve A Posted June 6, 2009 Report Share Posted June 6, 2009 This issue appears to be the “document.getElementById” in the addSpud code. You are trying to reference the earlier <input> elements at the beginning by ID but the input elements only have a name property and not ID. If you can change the highlight “name” to “id” then it should work. <input type="hidden" name="trumbaname" value='cape_ann' /> <input type="hidden" name="hotelid" value=2646 /> <script type="text/javascript" src="//www.trumba.com/scripts/spuds.js"></script>'>//www.trumba.com/scripts/spuds.js"></script> <script type="text/javascript"> $Trumba.addSpud({ webName: document.getElementById('trumbaname').value, spudType: "upcomingvcrawler", teaserBase: "http://www.dotcomcierge.com/calendar.asp?id="'>http://www.dotcomcierge.com/calendar.asp?id="'>http://www.dotcomcierge.com/calendar.asp?id="'>http://www.dotcomcierge.com/calendar.asp?id=" + document.getElementById('hotelid').value, detailBase: "http://www.dotcomcierge.com/calendar.asp?id=" + document.getElementById('hotelid').value }); </script> Change to: <input type="hidden" id="trumbaname" value='cape_ann' /> <input type="hidden" id="hotelid" value=2646 /> <script type="text/javascript" src="//www.trumba.com/scripts/spuds.js"></script> <script type="text/javascript"> $Trumba.addSpud({ webName: document.getElementById('trumbaname').value, spudType: "upcomingvcrawler", teaserBase: "http://www.dotcomcierge.com/calendar.asp?id=" + document.getElementById('hotelid').value, detailBase: "http://www.dotcomcierge.com/calendar.asp?id=" + document.getElementById('hotelid').value }); </script> 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.