Jump to content

Firefox/Chrome display issue


Recommended Posts

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?

Link to comment
Share on other sites

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>

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...