iEntry 10th Anniversary Webforumz RegistrationAnnouncements Contact Webforumz StaffContact
Home Resources Blogs Meet the Team Contact Register
 

Go Back   WebForumz.com > The Code > JavaScript

Reply
 
LinkBack Thread Tools
Old August 15th, 2008, 04:00 PM   #1
New Member
 

Join Date: Feb 2007
Location: Missouri
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 MikeTheVike is on a distinguished road
need help with javascript function acting like a link to work with LightWindow

I'm working with a light box called LightWindow (http://stickmanlabs.com/lightwindow/) And it works fine when I set it to load a webpage using a text link with code like this...

HTML Code:
<a href="box-brazil.html" class="lightwindow" rel="[worldwide]" params="width=650" caption="Brazil -">Brazil<a/>
I'm looking for a javascript function that will basically do the same thing when run. I have this so far, and it's not working perfectly in all browsers...
Code:
 <script type="text/javascript">
    function loadWindow() {
        var objLink = document.createElement('a');
        objLink.setAttribute('href','box-brazil.html');
         objLink.setAttribute('class', 'lightwindow')
        objLink.setAttribute('caption', 'caption text');
        myLightWindow.activateWindow(objLink);
        
    }
    </script>
When the function is run, it loads the html file inside the lightwindow, but the caption doesn't show up in Firefox. IE has a number of other problems... Basically I need some javascript that will perform exactly like I had clicked the text link above, so the lightwindow script works correctly. I'm not sure if the javascript I'm using is incorrect, or if maybe the javascript for the lightwindow has bugs. I figure if the lightwindow works fine wit ha text link, then setting up some javascript to act like a text link would perform the same. If you have any ideas it would much appreciated! And if you need a better explanation on what I'm trying to do, let me know!
MikeTheVike is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old August 15th, 2008, 05:43 PM   #2
Most Reputable Member
 

Join Date: Feb 2008
Location: In My Own Little World
Age: 15
Posts: 1,346
Blog Entries: 9
Thanks: 2
Thanked 45 Times in 45 Posts
Rep Altering Power: 0 CloudedVision is on a distinguished road
Re: need help with javascript function acting like a link to work with LightWindow

Theres nothing wrong with your code, its something wrong with light-window. Would lightbox 2 work for you? It only works with images though.
__________________
Theron Luhn
CloudedVision is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Something kooky going on with my layout when I use a Javascript function... jonnymorris HTML, XHTML and CSS 3 March 28th, 2008 02:13 PM
Javascript menu - does not work on title page, but does work on other pages Crystal Phoenix Your Design and Layout 4 March 24th, 2008 05:40 PM
add image src from javascript function ktsirig JavaScript 1 March 14th, 2008 09:38 AM
Link to call a function riotman Classic ASP 3 December 1st, 2005 07:03 AM
help with javascript function kinjiro JavaScript 1 November 21st, 2003 12:58 PM


Search Engine Optimization by vBSEO 3.2.0 RC8