JavaScript

Moderators: None (Apply to moderate this forum)
Number of threads: 2061
Number of posts: 5164

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Re: "Nesting" Javascripts? >> no answer yet! Posted by Thummy on 19 Jun 2002 at 5:22 AM
This message was edited by the Thummy at 2002-6-19 5:28:6

Hi CompuChip, so your dutch too (das makkelijk, maar ik ga toch maar door in t engels)
I dont see what your reply has to do with my question? (what is not possible?)
It's not about "who can do what" or how to show things optionally, nor about programm flow conditions. It's about nesting scripts and the way browsers render their output...

Dit you look at my Example?

Greetz Thummy




: Don't think it's possible. I think the best solution would be creating a global variable like
:
: var cookieIsTrue;
: cookieIsTrue = (loginname == "Administrator");
:
: and then make the functions like this
:
: function weergeef_menu() {
: if (cookieIsTrue) {
: document.write("Hallo, Administrator. Welke gebruiker wilt u verwijderen?");
: // Some more
: }
: else {
: document.write("Hallo. U mag geen gebruikers wijzigen");
: }
: }
:
: : This message was edited by the Thummy at 2002-6-11 12:42:10

: : OK more details...
: :
: : I've got a site with lots of extra functionalities.
: : These are in different scripts and all together a bit big.
: :
: : In my HTML I just include one scriptfile (<script src='http://....'></script>)
: : That:
: : - Generates a (hideable) form where a visitor can set options that are stored in a cookie.
: : - Reads the cookie at next visit, or a reload, and then I refer more files by doing things like:
: : if(some_cookie_value){
: : document.write("<script src='http://....'></script>");
: : }else{
: : document.write("<script src='http://....'></script>");
: : }
: :
: : All functions can be called, but a "inline" document.write() now "gives his result" a lot lower in the page then it should. In my IE beneath the table the cell is in that "holds" my script. In IE on a Mac it appears at the total bottom of the page???
: :
: : Netscape 4.7 does it all right!!!.
: : I'm getting to think by now it's an IE bug, I can't change that, so the initial question still stands, does someone knows another way to archive the include effect I need?
: : I made a test/proof, very minimal, only contains the "bug", go http://www.xs4all.nl/~thummy/nested/nested.html for a view.
: :
: :
: :
: :
: :
:
:







Thread Tree
Thummy "Nesting" Javascripts? on 10 Jun 2002 at 2:03 PM
pixelmech "Nesting" Javascripts? >> no answer yet! on 10 Jun 2002 at 2:51 PM
Thummy "Nesting" Javascripts? >> no answer yet! on 11 Jun 2002 at 12:40 PM
compuchip Re: "Nesting" Javascripts? >> no answer yet! on 19 Jun 2002 at 3:20 AM
Thummy Re: "Nesting" Javascripts? >> no answer yet! on 19 Jun 2002 at 5:22 AM
compuchip Re: "Nesting" Javascripts? >> no answer yet! on 19 Jun 2002 at 7:53 AM
Thummy Re: "Nesting" Javascripts? >> no answer yet! on 19 Jun 2002 at 8:09 AM
compuchip Re: "Nesting" Javascripts? >> answer! on 19 Jun 2002 at 10:23 AM



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.