Jump to content
Sign in to follow this  
riverdog

Using Spuds With OnClick Javascript

Recommended Posts

My Trumba spuds are not working if I use java onclick in a link to load a page into a DIV.

 

Here is the code in a nutshell...

 

The link looks like this...

 

<a href="#" onclick = "loadNewPage('calendar.php')">Planning Calendar</a>

 

calendar.php looks like this...

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "

<html xmlns="

<head>

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

 

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

<title>Untitled Document</title>

</head>

 

<body>

This is a test

<script type="text/javascript">

$Trumba.addSpud({

webName: "harlingenhealthcare",

spudType : "upcomingphoto" ,

teaserBase : "
});

</script>

</body>

</html>

 

I also have the following line on the index.php page where the original link is.

 

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

 

This does not work. The spud never generates the calendar.

If I load calendar.php independently, it works, but if I load it in the DIV, it does not.

 

Is there any tweaking I can do to get this to work?

 

Thanks in advance.

Share this post


Link to post
Share on other sites

I checked with our development team and they stated that it looks like the “loadNewPage” method is dynamically loading and injecting the calendar.php page into a div on your page. Could you use an iframe to contain the page instead of loading the page into a div?

 

Let us know if that works.

 

Thanks!

Steve

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...
Sign in to follow this  

×
×
  • Create New...