Jump to content
Sign in to follow this  
sanjeev

How to pass trumba calendar name from ASP to the spud

Recommended Posts

Hi,

 

I looked but found no such topic in the forum for help on this...

 

We have an ASP website with an underlying database table that has trumba calendar names stored for each region.

 

So here's how the table looks:

 

ID, Region, TrumbaCalendarName

001, Cape Cod, capecod

002, Boston, boston

etc.

 

Then I wrote an ASP function that returns the value of TrumbaCalendarName based on the region's ID

(I get that from a querystring parameter).

 

So far so good.

 

Now the problem is on the same page I would like the corresponsing region's calendar spud to display.

 

How do I pass my function value to the spud? I don't believe I can pass a function result to Javascript.

So I created a hidden form field that accesses my function and then thought I would

read the field value in the document object as below (see bold line):

 

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

<script type="text/javascript">

$Trumba.addSpud({

webname: document.getElementById('trumbaname').value),

spudType: "upcomingvcrawler",

teaserBase : "http://university.trumba.com/online_calendars/main_month.aspx" }); </script>

 

The spud is not showing up. Why does it not work?

 

Can anyone please help?

 

Thanks,

 

Sanjeev

Share this post


Link to post
Share on other sites
I just noticed I had put an extra bracket in:

 

webname: document.getElementById('trumbaname').value),

 

Also thought I should convert the result to String.

 

So my new line reads:

 

webname: document.getElementById('trumbaname').value.toString,

 

But my calendar name not passing through to the spud.

 

Thanks for any help!

 

 

..........>>>>>>>>>>>>>>

Hi,

 

I looked but found no such topic in the forum for help on this...

 

We have an ASP website with an underlying database table that has trumba calendar names stored for each region.

 

So here's how the table looks:

 

ID, Region, TrumbaCalendarName

001, Cape Cod, capecod

002, Boston, boston

etc.

 

Then I wrote an ASP function that returns the value of TrumbaCalendarName based on the region's ID

(I get that from a querystring parameter).

 

So far so good.

 

Now the problem is on the same page I would like the corresponsing region's calendar spud to display.

 

How do I pass my function value to the spud? I don't believe I can pass a function result to Javascript.

So I created a hidden form field that accesses my function and then thought I would

read the field value in the document object as below (see bold line):

 

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

<script type="text/javascript">

$Trumba.addSpud({

webname: document.getElementById('trumbaname').value),

spudType: "upcomingvcrawler",

teaserBase : "http://university.trumba.com/online_calendars/main_month.aspx" }); </script>

 

The spud is not showing up. Why does it not work?

 

Can anyone please help?

 

Thanks,

 

Sanjeev

Share this post


Link to post
Share on other sites

Hi Sanjeev,

I had our dev team look this over and they pointed out a potential syntax error in the code.

 

Try this and if this does not work, please send us a link to the page and our dev team can research further for you.

 

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

<script type="text/javascript">

$Trumba.addSpud({

webname: document.getElementById('trumbaname').value,

spudType: "upcomingvcrawler",

teaserBase : "http://university.trumba.com/online_calendars/main_month.aspx" }); </script>

 

Thanks!

Steve

Trumba Support

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×