Jump to content
bbern

Only Calendar Spud is working

Recommended Posts

For some reason, only the Calendar Spud responds to clicking on an event. Meaning, I click on an event in my calendar and it takes me to the associated event properties within the context of my site (Yeah, this works!!!). When I replace the Calendar Spud javascript scriptlet (in content_test.jsp) with a Date Finder or Upcoming Events Spud, clicking on the same event does not take me to the associated event properties. It simply reloads the spud and shows the same content (i.e. the Date Finder Spud) and not the event properties. I've tried everything I can think of. I want my Upcoming Events / Date Finder working like NY Times.

 

I used the iframe implementation described in the following help file:

 

http://www.trumba.com/help/publish/embediframe.html

 

Here's my implementation

-------------------------------------------------------------------------------------------------------

calendar.jsp:

-------------------------------------------------------------------------------------------------------

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">'>http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"'>http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<meta http-equiv="Content-Language" content="en-us" />

<title>Trumba Testing</title>

</head>

<div id="content">

<script language="javascript" type="text/javascript" src="http://www.trumba.com/scripts/embed.js"></script>

 

<iframe id="TrumbaIframe" src="content_test.jsp?calendar=constantcontactEventsAz" frameborder="no" width="100%" scrolling="no" marginheight="0" marginwidth="0" allowtransparency="true" onload="SizeTrumbaFrame()"></iframe>

 

 

</div>

 

</body>

</html>

-------------------------------------------------------------------------------------------------------

-------------------------------------------------------------------------------------------------------

 

AND

 

-------------------------------------------------------------------------------------------------------

content_test.jsp

-------------------------------------------------------------------------------------------------------

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<meta http-equiv="Content-Language" content="en-us" />

<title>Trumba Testing</title>

<noscript><a href="http://www.yoursite.com/calendar.html">Date finder for our site calendar</a></noscript>

</head>

<body>

<div style="width:200px">

 

<script type="text/javascript" src="http://www.trumba.com/k.aspx?calendar=constantcontactEventsAz&widget=datefinder"></script>

 

</div>

</body>

</html>

-------------------------------------------------------------------------------------------------------

-------------------------------------------------------------------------------------------------------

 

 

 

I am testing by navigating to calendar.jsp.

Share this post


Link to post
Share on other sites

I just noticed that these spuds do work when I add the calendar spud to the same web page. When I try to insert the teaserBase, it doesn't work correctly.

Share this post


Link to post
Share on other sites

bbern,

 

Your content_test.jsp is missing a javascript variable that defines what page to jump to when displaying the event details. This is the trumba_teaserBase variable and it's detailed in my post on using Trumba teasers at http://forums.trumba.com/index.php?showtopic=878

 

Here is the corrected content_test.jsp file below that has a trumba_teaserBase variable. I am assuming that your calendar.jsp file is in the same folder as content_test.jsp. If not please adjust the url.

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Language" content="en-us" />
<title>Trumba Testing</title>
<noscript><a href="http://www.yoursite.com/calendar.html">Date finder for our site calendar</a></noscript>
</head>
<body>
<div style="width:200px">

<script type="text/javascript">
// This is the URL of your calendar page, in our case calendar.jsp.
var trumba_teaserBase = "calendar.html";
</script>

<script type="text/javascript" src="http://www.trumba.com/k.aspx?calendar=constantcontactEventsAz&widget=datefinder"></script>

</div>
</body>
</html>

 

-Troy

Edited by Troy

Share this post


Link to post
Share on other sites

This was the first thing I tried. Still, after adding a teaserBase (even while using the iframe implementation), clicking on a day in the datefinder does not do anything. I've even tried making a duplicate page with just the calendar spud on it and setting the teaserBase to this page from the previous page, and this did not work. The spuds are reloading within my page, just not reloading with the desired content.

 

I have tested every configuration given on the Help and Forum. I believe it is either an issue with my web server configuration or the Trumba application. I am hosting on Websphere 5.1, I'm going to try running on Websphere 6.x later.

Share this post


Link to post
Share on other sites
This was the first thing I tried. Still, after adding a teaserBase (even while using the iframe implementation), clicking on a day in the datefinder does not do anything. I've even tried making a duplicate page with just the calendar spud on it and setting the teaserBase to this page from the previous page, and this did not work. The spuds are reloading within my page, just not reloading with the desired content.

 

I have tested every configuration given on the Help and Forum. I believe it is either an issue with my web server configuration or the Trumba application. I am hosting on Websphere 5.1, I'm going to try running on Websphere 6.x later.

 

bbern,

 

I just took a closer look at your code and there's something I missed in your IFRAME example. My recommendation of using calendar.jsp for trumba_teaserBase is incorrect, it should have said to use a different page, the one that contains your calendar Spud. For the sake of example let's simplify things.

 

First off, drop trying to use IFRAMEs. We're going to abandon it in the future and it only adds complexity to your site. I've simplified your example using non-IFRAMEs which works fine for your calendar. There are two files, datefinder.html and calendar.html. datefinder.html will jump to calendar.html when you click on a day. Save these files to your site and load them in the browser. You should find that they work.

 

datefinder.html

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Language" content="en-us" />
<title>Trumba Testing</title>
</head>
<div id="content" style="width:200px;">

<script>
var trumba_teaserBase = "calendar.html";
</script>

<script type="text/javascript" 
src="http://www.trumba.com/k.aspx?calendar=constantcontactEventsAz&widget=datefinder"></script> 
</div>
</body>
</html>

 

calendar.html

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Language" content="en-us" />
<title>Trumba Testing</title>
</head>

<div id="content">
<script type="text/javascript" src="http://www.trumba.com/k.aspx?calendar=constantcontactEventsAz"></script> 
</div>
</body>
</html>

 

-Troy

 

p.s. Edited by Jill 25 Aug. to remove sneaky "a href" tags from code

Edited by Jill

Share this post


Link to post
Share on other sites

Great this was it! I tried something like this at first, guess I didn't have it configured right in my initial tests. I just had to learn that the teaser base has to be a Calendar Spud and not just any spud. This is what was holding me up and confusing me.

 

*Worth noting, I had to change calendar.jsp to calendar.html in the trumba_teaserBase var to work with this example.

Share this post


Link to post
Share on other sites

Hi,

i am having similar problems with my date finder. When you click on a date, it takes you to the desired page.

 

I copied your code to my desired page:

 

<script type="text/javascript" src="<A href='http://www.trumba.com/k.aspx?calendar=constantcontactEventsAz">http://www.trumba.com/k.aspx?calendar=constantcontactEventsAz"></script>

 

but nothing comes up. when i look at the rest of the HTML codes in my frontpage codeview, i noticed that the color scheme of the html is different. Is there something wrong with the above code?

Share this post


Link to post
Share on other sites

Hi Dr. Hansen-Quao,

Actually it does looks like there's some extraneous stuff there. In the code you referred to in your forum message, delete the following:

<A href='http://www.trumba.com/k.aspx?calendar=constantcontactEventsAz"'>http://www.trumba.com/k.aspx?calendar=constantcontactEventsAz">

 

So the line should be just this:

<script type="text/javascript" src="http://www.trumba.com/k.aspx?calendar=yourcalendarname"></script>

 

Notice that I put yourcalendarname in blue. The code that Troy posted for the other member is specific to his calendar. If you use it for your own calendar, you need to replace the calendar name after "calendar=" with the name of your calendar.

 

I'm sorry about the error in the original version. Sometimes the a tags get stuck in there when you paste from another program (because they're formatted in the other program and not here). I'll fix the original post as well (Troy's out today, so I hope he can forgive me for not asking first!).

 

Please let me know if this doesn't work.

 

Jill / Trumba UA

Share this post


Link to post
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...