www.bolidesoft.com Forum Index www.bolidesoft.com
Bolide Software
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

 
 
[Bolide Software Home] [All My Movies™ page] [All My Books™ page] [Image Comparer™ page]
 


How to apply javascript and html to movie fields?

 
Post new topic   Reply to topic    www.bolidesoft.com Forum Index -> All My Movies™ related
Author Message
CustomGT



Joined: 04 Jun 2007
Posts: 5

PostPosted: Mon Jun 04, 2007 7:07 pm    Post subject: How to apply javascript and html to movie fields? Reply with quote

When I go into 'Edit Movie Details', i want to be able to put some javascript and html into one of the fields. I have to do this to launch my movie with the STB we are using.

I exported the html file, then had to edit the javascript into that for now. But we really need this to be in the All My Movies program itself. I dont know why it edits it out once I hit ok.

Do you have any suggestions?

Thank you!
Back to top
MD



Joined: 08 Aug 2006
Posts: 108

PostPosted: Wed Jun 06, 2007 1:45 pm    Post subject: Re: How to apply javascript and html to movie fields? Reply with quote

CustomGT wrote:
When I go into 'Edit Movie Details', i want to be able to put some javascript and html into one of the fields. I have to do this to launch my movie with the STB we are using.

I exported the html file, then had to edit the javascript into that for now. But we really need this to be in the All My Movies program itself. I dont know why it edits it out once I hit ok.

Do you have any suggestions?

Thank you!
There are some templates with javascript.
If you look at those templates you should be able to figure it out.

remember to use the [amm:scriptingon] and [amm:scriptingoff] tags around your javascript code Wink
Back to top
CustomGT



Joined: 04 Jun 2007
Posts: 5

PostPosted: Wed Jun 06, 2007 1:54 pm    Post subject: Reply with quote

Which templates have javascript?

Can you explain further, am i going to see this javascript code in all my movies program in the 'edit movie details' section, or after i export to html?

i used your amm codes around my javascript, and it didnt do nothing. you can actually see your codes on my html page. And it inserted break tags in my code and turned my " into html format....i dont want it to change it at all..
Back to top
MD



Joined: 08 Aug 2006
Posts: 108

PostPosted: Thu Jun 07, 2007 6:38 am    Post subject: Reply with quote

CustomGT wrote:
Which templates have javascript?

Can you explain further, am i going to see this javascript code in all my movies program in the 'edit movie details' section, or after i export to html?

i used your amm codes around my javascript, and it didnt do nothing. you can actually see your codes on my html page. And it inserted break tags in my code and turned my " into html format....i dont want it to change it at all..

'online db' and 'online movielist' have javascript added.

Correct me if I'm wrong.
The best thing you can do, is create a 'global' function to launch your movies.
You have to create a link for each movie to call that global function and add as a parameter the movie specific code of url part.

In pseudocode it looks like this:
Code:

<script>
//[amm:scriptingon]
function playMovie( strUrl ) {
  this.openwindow ( strUrl)
}
//[amm:scriptingoff]
</script>
<body>
<div id="movie1">
<h1>Pirates of the Caribbean</h1>
<a href="javascript: playMovie('[amm:movieplayurl] ');">play movie</a>
</div>

<div id="movie2">
...

Be aware that you only have to create 1 div in your template.html file.
Everything before the first div should be in the header.html file.
Back to top
CustomGT



Joined: 04 Jun 2007
Posts: 5

PostPosted: Mon Jun 11, 2007 8:27 pm    Post subject: Reply with quote

When i edit a movie, and put quotes in, it changes it to &quot; on an html export.

It cant do this in my javascript, it wont work. Is thier anyway i can make it not do this?

-edit i finally fixed this just using single '. Javascript will work with that cant believe i just now tried that. cool...but how would i have done it the other way?

-edit...i want to just put in a reference to call in a javascript.js file.
I want to put this reference in header.html
I can get it to work just by opening header.html in IE, but when i try to compile in AMM, it throws JS errors. Ive tried every way of wrapping it with [AMM:SCRIPTINGON] and off tags that i could...no difference.
Back to top
MD



Joined: 08 Aug 2006
Posts: 108

PostPosted: Tue Jun 12, 2007 6:42 am    Post subject: Reply with quote

CustomGT wrote:
When i edit a movie, and put quotes in, it changes it to &quot; on an html export.

It cant do this in my javascript, it wont work. Is thier anyway i can make it not do this?

-edit i finally fixed this just using single '. Javascript will work with that cant believe i just now tried that. cool...but how would i have done it the other way?

-edit...i want to just put in a reference to call in a javascript.js file.
I want to put this reference in header.html
I can get it to work just by opening header.html in IE, but when i try to compile in AMM, it throws JS errors. Ive tried every way of wrapping it with [AMM:SCRIPTINGON] and off tags that i could...no difference.

Unfortunately AMM does not support Javascript.
That's why you have to catch all those error's.
You can do that by adding a custom errorhandling to your code.
Here is an example:
Code:
<script>
      onerror = handleErr;
      function handleErr(msg,url,l) {
         var showErrorMessage = false;
         if (showErrorMessage == true) {
            var txt;
            txt="There was an error on this page.\nYou can ignore this error if you are exporting from All My Movies.\n\n";
            txt+="Error: " + msg + "\n";
            txt+="URL: " + url + "\n";
            txt+="Line: " + l + "\n\n";
            txt+="Click OK to continue.";
            alert(txt);
         }
         return true;
      }
</script>
Back to top
CustomGT



Joined: 04 Jun 2007
Posts: 5

PostPosted: Tue Jun 12, 2007 4:23 pm    Post subject: Reply with quote

So I would insert that at the beggining of my exisiting javascript?
Like:

Code:

<script language="JavaScript">
      onerror = handleErr;
      function handleErr(msg,url,l) {
         var showErrorMessage = false;
         if (showErrorMessage == true) {
            var txt;
            txt="There was an error on this page.\nYou can ignore this error if you are exporting from All My Movies.\n\n";
            txt+="Error: " + msg + "\n";
            txt+="URL: " + url + "\n";
            txt+="Line: " + l + "\n\n";
            txt+="Click OK to continue.";
            alert(txt);
         }
         return

document.write("How are you my friend?")
</script>


or would it be its own javascript on the top of the page? It looks like this error is going to throw on the export of AMM to html, then it has an ok button to bypass and im assuming this is somehow going to go ahead and export my other javascript into the html without fuggling it up?
Back to top
MD



Joined: 08 Aug 2006
Posts: 108

PostPosted: Wed Jun 13, 2007 7:23 am    Post subject: Reply with quote

CustomGT wrote:
So I would insert that at the beggining of my exisiting javascript?
Like:

Code:

<script language="JavaScript">
      onerror = handleErr;
      function handleErr(msg,url,l) {
         var showErrorMessage = false;
         if (showErrorMessage == true) {
            var txt;
            txt="There was an error on this page.\nYou can ignore this error if you are exporting from All My Movies.\n\n";
            txt+="Error: " + msg + "\n";
            txt+="URL: " + url + "\n";
            txt+="Line: " + l + "\n\n";
            txt+="Click OK to continue.";
            alert(txt);
         }
         return

document.write("How are you my friend?")
</script>


or would it be its own javascript on the top of the page? It looks like this error is going to throw on the export of AMM to html, then it has an ok button to bypass and im assuming this is somehow going to go ahead and export my other javascript into the html without fuggling it up?

You have to put this on the top of the page.
Unfortunately AMM doesn't copy the .js file to your export location.
So you have to put it there manually.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    www.bolidesoft.com Forum Index -> All My Movies™ related All times are GMT
Page 1 of 1

 


Powered by phpBB © 2001, 2005 phpBB Group