 |

dwallphx
Novice
Aug 26, 2005, 6:42 AM
Post #1 of 9
(8671 views)
Shortcut
|
JavaScript code refresh
|
Can't Post
|
|
I am building a shopping portal using DocBuilder's default layout: On the right side of my doc_header.html page is the JavaScript code - <script language="javascript" src="http://www.phxweb.net/cgi-bin/rotator.cgi?LinkShare-s"></script> Can anyone tell me a way to re-execute this code about every 60 seconds? I don't want to refresh the entire doc_header.html frame, I only want to repeat the JavaScript embedded in the page to change the banner that it calls. You can see the banners at http://shop.phxweb.net . Thank you, Daniel Wallace Phoenix, AZ (110f today!)
|
|
|  |
 |

Cliff
Staff

Aug 26, 2005, 4:14 PM
Post #2 of 9
(8658 views)
Shortcut
|
|
Re: [dwallphx] JavaScript code refresh
[In reply to]
|
Can't Post
|
|
Hi Daniel, Thanks for posting. I was thinking of suggesting a meta http-equiv="REFRESH" to refresh that ad for you, but I'm not sure if that will work with the javascript. Out of curiousity, how do the banners below change every 45 seconds? Could you use the same method there? Regards, Cliff Stefanuk - Customer Service Manager support@interactivetools.com
|
|
|  |
 |

dwallphx
Novice
Aug 26, 2005, 4:48 PM
Post #3 of 9
(8657 views)
Shortcut
|
|
Re: [Cliff] JavaScript code refresh
[In reply to]
|
Can't Post
|
|
The doc_page refreshes every 45 seconds using a simple META refresh command. I can't do that to the doc_header frame because it, along with the doc_menu and doc_footer frames control the frame seperator bars (spacer.gif). Using the META tag in the doc_header frame causes the title, subtitle and seperator bar to dissappear and return in a very unsightly manner. :-) That's why I was hoping that I could figure out some way to re-execute the JavaScript in doc_header repeatedly without having to refresh the entire frame. Thanks, Daniel. http://shop.phxweb.net
|
|
|  |
 |

ross
Staff
/ Moderator

Aug 28, 2005, 9:31 AM
Post #4 of 9
(8629 views)
Shortcut
|
|
Re: [dwallphx] JavaScript code refresh
[In reply to]
|
Can't Post
|
|
Hi Daniel. Thanks for the update! There is actually a JavaScript method I can think of that waits a certain amount of time before running a block of code again, but I am not actually sure if it would work with your current setup. I noticed that your header’s JavaScript is linked to an external cgi file. This isn’t actually something that I have seen before. What is actually happing on this page: http://www.phxweb.net/cgi-bin/rotator.cgi?LinkShare-s What language is the cgi script written in? Is there anyway that script can be recreated in JavaScript? If you could give me a few more details I can see if my limited JavaScript knowledge will be able to help . I look forward to hearing from you . ----------------------------------------------------------- Cheers, Ross Fairbairn - Product Specialist support@interactivetools.com
Hire me! Save time by getting our experts to help with your project. Template changes, advanced features, full integration, whatever you need. Whether you need one hour or fifty, get it done fast with Priority Consulting.
|
|
|  |
 |

dwallphx
Novice
Aug 28, 2005, 10:16 AM
Post #5 of 9
(8627 views)
Shortcut
|
|
Re: [ross] JavaScript code refresh
[In reply to]
|
Can't Post
|
|
Hi Ross, I was using a 'freebie' Perl cgi script to rotate my LinkShare banners, but I have since got code from LinkShare that causes my banners to rotate for me. Here is the code: <a href="http://click.linksynergy.com/fs-bin/stat?id=pESwIxssyvg&subid=0" target="_new"><IMG alt=icon border=0 width=468 height=60 src="http://ad.linksynergy.com/fs-bin/show?id=pESwIxssyvg&gridnum=1&subid=0"></a> LinkShare warns that this code must be executed 'exactly' as given or I risk not being tracked properly and not receiving my commission on sales. I think from your reply to my post that you understand what I am trying to do. Right now, the LinkShare code only rotates the banner to the next one when the entire doc_header frame is refreshed. I would like to re-execute just the banner code every 30 seconds. Thank you so much for your attention to my needs. Considering that my problem has nothing to do with the proper operation of DocBuilder software, you guys are the best! Also note that this morning I have figured out how to 'link' my document groups so I don't have to have a scroll-bar in my doc_menu frame. Check out the '[ next menu ]' link in my doc_menu frame. If anyone reading this is interested in how to do that, they can contact me. Daniel http://shop.phxweb.net
|
|
|  |
 |

ross
Staff
/ Moderator

Aug 28, 2005, 12:52 PM
Post #6 of 9
(8603 views)
Shortcut
|
|
Re: [dwallphx] JavaScript code refresh
[In reply to]
|
Can't Post
|
|
Hi Daniel. Thanks for going into more details for me! I am still not sure if what you are using is actually JavaScript. It seems to be more of a CGI script that is just being loaded with a script tag. I haven’t seen that before so I am not really sure what kind of options we have with it for reloading. If you were able to use a JavaScript based ad rotator, I think my idea would work. For now though, I am thinking you might actually be able to break that top frame up into two more frames, so instead of just a regular page up top, it would actually be a frame set with two side by side frames. If this were the case, you could use the simple meta refresh to reload the right hand frame without having to load the left side as well. Do you think that would work? I can go into more detail if you would like. Just let me know . ----------------------------------------------------------- Cheers, Ross Fairbairn - Product Specialist support@interactivetools.com
Hire me! Save time by getting our experts to help with your project. Template changes, advanced features, full integration, whatever you need. Whether you need one hour or fifty, get it done fast with Priority Consulting.
|
|
|  |
 |

dwallphx
Novice
Aug 28, 2005, 1:07 PM
Post #7 of 9
(8602 views)
Shortcut
|
|
Re: [ross] JavaScript code refresh
[In reply to]
|
Can't Post
|
|
Yes Ross, thinking about it, I am sure that your idea of adding two more frames inside of the top frame will work. The left side can have my &group_name& and &group_subheading& and the right side could have my LinkShare banner code in it. Then I could do a simple META refresh of the right side every 30 seconds. I can hard-code the HTML for the left and right side sub-frames, but I am not a programmer. So if you could recreate my _doc_index.html template for me with the proper frameset coding, I would be deeply grateful. Daniel. http://shop.phxweb.net
|
|
|  |
 |

ross
Staff
/ Moderator

Aug 29, 2005, 4:44 PM
Post #8 of 9
(8530 views)
Shortcut
|
|
Re: [dwallphx] JavaScript code refresh
[In reply to]
|
Can't Post
|
|
Hi Daniel I have put together a few steps here for you to split that top frame up into two more frames . Really, all you’ll need to do is take the two files I have attached to this post and: Upload new_head.html to the directory your document is getting published to. Upload new doc_index.html template to your /templates folder Finally, you’ll need to create a file called banner.html and upload it to you’re your document’s publish folder as well. The banner.html page is going to have the JavaScript and meta refresh code on it. That’s all. Does that make sense? Could you give it a shot and let me know how you make out? I look forward to hearing from you . ----------------------------------------------------------- Cheers, Ross Fairbairn - Product Specialist support@interactivetools.com
Hire me! Save time by getting our experts to help with your project. Template changes, advanced features, full integration, whatever you need. Whether you need one hour or fifty, get it done fast with Priority Consulting.
|
|
Attachments:
|
banner.html
(11 B)
|
|
|
new_header.html
(0.11 KB)
|
|
|
_doc_index.html
(0.38 KB)
|
|
|  |
 |

dwallphx
Novice
Aug 30, 2005, 10:05 AM
Post #9 of 9
(8505 views)
Shortcut
|
Re: [ross] JavaScript code refresh
[In reply to]
|
Can't Post
|
|
Hi Ross, Thank you so much for the help!! I took your basic idea of nesting-frames (That's spelled: M-A-J-O-R H-E-A-D-A-C-H-E), Did some reading at a popular html learning site, then came up with this: I converted my _doc_header.html template to simply another frames definition (similar to _index.html). Then I made three different html pages to fill each frame by cutting and pasting the original _doc_header.html . Left side frame is my heading and sub-heading information, Right side is my banners that refresh every 30 seconds with a simple META refresh tag, and the bottom frame is my blue stripe to complete the overall look of DocBuilder's basic design. I have attached the new _doc_header.html file that I made to this post in case you or another user would like to have it. Thanks again for the help. Daniel Wallace http://shop.phxweb.net
|
|
Attachments:
|
_doc_header.html
(0.63 KB)
|
|
|  |
 | |  |
|