Help facility javascript

This is a discussion on "Help facility javascript" within the JavaScript Forum section. This forum, and the thread "Help facility javascript are both part of the Program Your Website category.



Go Back   Webforumz.com > Main Forums > Program Your Website > JavaScript Forum

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Jul 31st, 2007, 09:52
New Member
Join Date: Jul 2007
Location: Scotland
Age: 21
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Help facility javascript

Hey,

I am trying to make a help facility for a web based application. At the moment when clicking help, the help facility opens in a new window and resizes the parent window so both are visible on the screen just like it does in the Microsoft Word help facility.

When the user closes the help facility i would like to return the parent window to its original size. I have read in numerous places not 2 mess with a users browser but the boss says this is the way i should do it.

Any thoughts?
Reply With Quote

  #2 (permalink)  
Old Jul 31st, 2007, 10:05
SuperMember

SuperMember
Join Date: May 2007
Location: UK
Age: 27
Posts: 1,111
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Help facility javascript

Quote:
Originally Posted by breepupetstofight View Post
I have read in numerous places not 2 mess with a users browser but the boss says this is the way i should do it.

Any thoughts?
Bad luck. You have an ignorant boss.
Reply With Quote
  #3 (permalink)  
Old Jul 31st, 2007, 10:09
New Member
Join Date: Jul 2007
Location: Scotland
Age: 21
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Help facility javascript

Do you have any other suggestions?
Reply With Quote
  #4 (permalink)  
Old Jul 31st, 2007, 10:15
SuperMember

SuperMember
Join Date: May 2007
Location: UK
Age: 27
Posts: 1,111
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Help facility javascript

Quote:
Originally Posted by breepupetstofight View Post
Do you have any other suggestions?
Nope, sorry.
Reply With Quote
  #5 (permalink)  
Old Jul 31st, 2007, 10:44
Rob's Avatar
Rob Rob is offline
Head Admin & CEO

SuperMember
Join Date: Jul 2003
Location: at my desk
Age: 34
Posts: 2,951
Blog Entries: 7
Thanks: 7
Thanked 3 Times in 3 Posts
Send a message via MSN to Rob Send a message via Skype™ to Rob
Re: Help facility javascript

Hang on guys....

Why not use fluid containers for the main content....

Then inject the help window floated to the right, but instead of a window, use a DIV. The main content should reflow around the help panel.

Sigh... Suprised no-one else offered this solution.
__________________
Rob - SEO Specialist
Owner & Founder of Webforumz.com

I am currently unavailable for private work

Last edited by Rob; Jul 31st, 2007 at 10:46.
Reply With Quote
  #6 (permalink)  
Old Jul 31st, 2007, 10:52
New Member
Join Date: Jul 2007
Location: Scotland
Age: 21
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Help facility javascript

cheers rob,

Any places you know of that can show me how to do this, only just started doing more advanced web stuff so not really sure on a few things.

thanks again
Reply With Quote
  #7 (permalink)  
Old Jul 31st, 2007, 11:04
Rob's Avatar
Rob Rob is offline
Head Admin & CEO

SuperMember
Join Date: Jul 2003
Location: at my desk
Age: 34
Posts: 2,951
Blog Entries: 7
Thanks: 7
Thanked 3 Times in 3 Posts
Send a message via MSN to Rob Send a message via Skype™ to Rob
Re: Help facility javascript

Lets say the main content area is surrounded by a div with an ID of #mainContainer

next comes the main content itself.... surround this with another div #mainContent

Use the following javascript code in the head section

Code: Select all
<script>
function insertHelp(strText)
    {
        var nod=document.createElement("DIV");
        nod.ID = "helpPanel";
        mainContainer.insertBefore(nod, mainContent);
        nod.innerText= strText;
    }[FONT=verdana,geneva,lucida,'lucida grande',arial,helvetica,sans-serif]
[/font]</script>
When you click the help link, get it to call the function using the onClick event....

eg. onclick = "insertHelp('This is the help text');"

You can style the help layer using #helpPanel in css... obviously you will need to use float:right;

All the above code is from memory but it should give you an idea.
__________________
Rob - SEO Specialist
Owner & Founder of Webforumz.com

I am currently unavailable for private work
Reply With Quote
  #8 (permalink)  
Old Jul 31st, 2007, 14:06
New Member
Join Date: Jul 2007
Location: Scotland
Age: 21
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Help facility javascript

thanks Rob,

I almost have the code complete, the help files to be displayed at each help phase are stored as html files. How do i make the new div display these??
Reply With Quote
  #9 (permalink)  
Old Jul 31st, 2007, 14:18
SuperMember

SuperMember
Join Date: May 2007
Location: UK
Age: 27
Posts: 1,111
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Help facility javascript

Another option, instead of generating the help panel with javascript, is simply to hide it using the CSS display: none;

Then you can use javascript to change this to display: block; and reveal the panel:
Code: Select all
document.getElementById("helpPanel").style.display="block"
Reply With Quote
Reply

Tags
help, html, javascript

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
Assistance required please - member messaging facility Gerry Job Opportunities 4 Nov 2nd, 2007 02:59
not yet a job opportunity...database messaging facility Gerry PHP Forum 3 Oct 17th, 2007 21:03
help! need search facility code to open in new window metamuse JavaScript Forum 0 Jul 15th, 2007 15:01
JavaScript cbrams9 JavaScript Forum 1 Sep 20th, 2006 17:35
I would like to add a search facility on my website - any suggestions? constantinesavva Web Page Design 3 Feb 25th, 2006 23:34


All times are GMT. The time now is 10:31.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43