Go Back   UltraGuest Forum > UltraGuest Forums > Guestbook Support

Reply
 
Thread Tools Display Modes
Old 11-28-2005, 11:07 PM   #1
JeremyDeal
 
Join Date: Nov 2005
Location: Central Florida
Posts: 4
Question Javascript in <head>

I am simply amazed at UltraGuest and its features, ease of use & reliability. Probably the best free "anything" Ive ever come across, and I spread the news to everyone I know. Thank you for giving the on-line community something to get excited about! I have figured out how to add a body "onload" javascript event, but I need help for this one...

My question: I have the following Javascript which I desperately need to use between the <head> and </head> tags of my guestbook, can anyone help:

<script type="text/javascript">
function goSetHeight() {
if (parent == window) return;
else parent.setIframeHeight('iframe');
}
</script>
__________________
http://www.JeremyDeal.com
JeremyDeal is offline   Reply With Quote
Old 11-29-2005, 12:03 AM   #2
Andreas
UltraGuest Admin
 
Join Date: Nov 2003
Location: Oslo, Norway
Posts: 746
Default Re: Javascript in <head>

Thanks Your website looks awesome by the way!

Any chance that the javascript would work if it was called from somewhere outside the <head> tags? If that's the case you can add it to the "header" of your guestbook. If that's not possible, let me know and we'll work out another solution.
Andreas is offline   Reply With Quote
Old 11-29-2005, 09:02 AM   #3
JeremyDeal
 
Join Date: Nov 2005
Location: Central Florida
Posts: 4
Default Re: Javascript in <head>

Thanks for the compliment and quick response! Next time you visit my website, please feel free to sign my guestbook made possible by UltraGuest!

My Long Winded Explination: This particular code has two parts to it. The part Ive having probblems with needs to be in the head to work properly because it is a called function that resizes the iframe height to fit the guestbook depending on how long the guestbook is, this can only be done after comparing the parent height value with the iframe after it is loaded. Once the value of the parent is established an onload event is called from the guestbook body tag (ie: <body onload='goSetHeight()') thus running the script in the head. That is the only way the code can adjust the window size accordingly with cross-browser compatibility.

Suggestions? Maybe something like an editable head section or "Attach javascript" button on the Guestbook Settings page? Can you help, it would be greatly appreciated?
__________________
http://www.JeremyDeal.com

Last edited by JeremyDeal; 11-29-2005 at 09:27 AM.
JeremyDeal is offline   Reply With Quote
Old 11-29-2005, 09:23 AM   #4
Andreas
UltraGuest Admin
 
Join Date: Nov 2003
Location: Oslo, Norway
Posts: 746
Default Re: Javascript in <head>

I've added the header to your guestbook manually for now. I'll let you know once this feature is ready.

Let me know if this does not work...

Good luck!
Andreas is offline   Reply With Quote
Old 11-29-2005, 09:40 AM   #5
JeremyDeal
 
Join Date: Nov 2005
Location: Central Florida
Posts: 4
Exclamation Re: Javascript in <head>

Man your Customer Support is Awesome! Only one probblem... wrong guestbook . I didnt know you were going to actually put the code in for me (I never expected that level of support!!!). Here is the guestbook it needs to be in (you should also see my <body> tag modification - ). http://www.ultraguest.com/?id=1107980438

Here is the pro-bono website (currently in development) I am using it on: http://www.rccog.org, there you can see the code in action on all the other pages and why I need it added to the guestbook. Thanks!
__________________
http://www.JeremyDeal.com
JeremyDeal is offline   Reply With Quote
Old 11-29-2005, 09:56 AM   #6
Andreas
UltraGuest Admin
 
Join Date: Nov 2003
Location: Oslo, Norway
Posts: 746
Default Re: Javascript in <head>

See if it works now!
Andreas is offline   Reply With Quote
Old 11-29-2005, 10:22 AM   #7
JeremyDeal
 
Join Date: Nov 2005
Location: Central Florida
Posts: 4
Default Re: Javascript in <head>

Thank you, I wont bug you any more! Ill wait untill you add the feature!
__________________
http://www.JeremyDeal.com
JeremyDeal is offline   Reply With Quote
Reply


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

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Linking to Javascript routines Cugel Guestbook Support 3 09-10-2004 06:32 AM


All times are GMT -5. The time now is 01:00 PM.


Page generated in 0.04717 seconds with 12 queries