Author Topic: Passing a Javascript  (Read 674 times)

rbaybayan

  • Full Member
  • ***
  • Posts: 54
Passing a Javascript
« on: February 16, 2010, 09:25:15 PM »
Im trying to code for a javascript that will be link to another API using the navigation button.

I managed to find a solution and hoping this can be useful to others.

In my example; I would like to have javascript for loading a fixed window of "Addthis" using the API.

1) Create a directory under your book.
     dir book>dir addthis>
2) Change the "SITE" link and "TITLE from the attached file.
     a) addthis.html
     b) addthisemail.html
3) Edit the navigational bar and add-in the SHARE and EMAIL button. Follow the changes below:  (NOTE ON THE PATH FILE)           

<?xml version="1.0" encoding="utf-8" standalone="no"?>
<asul>
   <style>
      <![CDATA[
button.fullscreen box { background: image(../../custom/functionbutton/btnrecfullscreen3.png); }
         button.restore box { background: image(../../custom/functionbutton/btnrecexitfullscreen3.png); }
         button.zoom_in box { background: image(../../custom/functionbutton/btnreczoomin3.png); }
         button.zoom_out box { background: image(../../custom/functionbutton/btnreczoomout3.png); }
         button.mute box { background: image(../../custom/functionbutton/btnrecsound3.png); }
         button.unmute box { background: image(../../custom/functionbutton/btnrecmute3.png); }
         button.first box { background: image(../../custom/functionbutton/btnrecfirstpage3.png); }
         button.last box { background: image(../../custom/functionbutton/btnreclastpage3.png); }
         button.prev box { background: image(../../custom/functionbutton/btnrecprevious3.png); }
         button.next box { background: image(../../custom/functionbutton/btnrecnext3.png); }
         button.share box { background: image(../../custom/functionbutton/btnrecshare3.png); }
         button.email box { background: image(../../custom/functionbutton/btnrecemail3.png); }


ADD THIS CODE ON <vflow>.......</vflow of the nav bar

<!-- Addthis.SHARE   -->
               <button
                  name="btn_share"
                  style="common share"
                  title="localize(LNG_SHARE, Share)"
                  url="addthis/addthisshare.html">
               
                     <box name="$up$"/>
                     <box name="$over$" style="over"/>
                     <box name="$down$" style="down"/>
               </button>



               <!-- Addthis.Mail --> 
               <button
                  name="btn_email"
                  style="common email"
                  title="localize(LNG_EMAIL, Send Email)"
                  url="addthis/addthisemail.html">
                     <box name="$up$"/>
                     <box name="$over$" style="over"/>
                     <box name="$down$" style="down"/>
                     
               </button>
               
               
                              
               

Attention

  • Newbie
  • *
  • Posts: 23
Re: Passing a Javascript
« Reply #1 on: March 11, 2010, 03:48:46 PM »
well i tested this and got buttons to in the navigation.

When i click it just opens up a new in firefox it doesnt expand with javascript?

i see these guys got it to work - http://www.flipit.it/media/Revolution_Demo - anyone know how?

rbaybayan

  • Full Member
  • ***
  • Posts: 54
Re: Passing a Javascript
« Reply #2 on: March 11, 2010, 06:38:03 PM »
Hi,

Nice megazine on your link....Can you check if the javascript for the firefox is enable?

Regards,

Ruel

Attention

  • Newbie
  • *
  • Posts: 23
Re: Passing a Javascript
« Reply #3 on: March 16, 2010, 04:11:39 PM »
yes i thought it was the same as your own? :o

and yes is have java enabled, button does work thought - it just pops up in new window instead of staying in megazine window

 i thought yours guide did the same as in the link i pasted in previous post ;)