sadicq Posted June 12, 2006 Share Posted June 12, 2006 Well, I wasn't sure at the moment I posted and neither am I now.but I think you have to add the init() to the <body> tag in the wpi.htm.<body class="body" onload="init(); SetScriptWaitTimeout(); startstop(); fillBoxes(); check(CheckOnLoad); startstop(); window.focus();">and link the js file in the head of the same file with<script language="javascript" src="./themes/Glossy/Code.js"></script>I must say I don't fully understand what you are saying with the code you entered in the js ... but html has nothing to do with js files.So I think you should consider moving it to the wpi.htm.It is the best options I see (and the only 100% correct one). Link to comment Share on other sites More sharing options...
mritter Posted June 12, 2006 Share Posted June 12, 2006 @almulder: You really should start to to use getElementById() calls to access items:document.getElementById("layeroptions").innerHTML = txt;document.getElementById("tabInterface").style.display = "block";document.getElementById("UseTransitions").disabled=false;I have always had success with this. And don't need to specify .all in there. Link to comment Share on other sites More sharing options...
almulder Posted June 12, 2006 Author Share Posted June 12, 2006 mritter: Thanks for the advice I will work on changing code tonight with what I have done so far.sadicq: Here is what I did (Works 100%)if you open "optionswizard.js" look at where "function CreateOptionsPage()" is at at the end of that function is where the <body onload="init();"> was placed but instead of that code I only added init();. this way it was sure to do onload of that page. Hope that makes helps in what I did.Well it was not in the "optionswizard.js" that I made the change but in my own .js file, I just used it as an example, because I made a whole new section for the theme wizard page.As far as adding <body onload="init();"> into the wpi.htm body section that did not work, but I all works great now. Thank you both. Link to comment Share on other sites More sharing options...
almulder Posted June 13, 2006 Author Share Posted June 13, 2006 (edited) Well that was fun. Took over an hour but changed all the "document.all" to "document.getElementById"then after all that work ERROR ERROR ERROR. What is wrong. O darn forgot to change all the "[" and "]" to "(" and ")" well another hour of work but all done now.Hope you guys are happy. Talking to you mritter. LOL just kidding. Thanks guys (mritter, sadicq, kel, dumpy_dooby ) for all your work so far. I could not have gotten here without you.Man does my head hurt.Well back to packing again. (Wife Nagging)- AlbertP.S. Sorry if I forgot to mention anyone for there help. (Let me know) Edited June 13, 2006 by almulder Link to comment Share on other sites More sharing options...
sadicq Posted June 13, 2006 Share Posted June 13, 2006 (edited) Well, silly error from me ... The options tab is created using separate htm files ...But I see no body tag in the common\*.htm files.I think mritter or kel should look at this ...IMO, the WPI code needs the <html> and <head> ... </head><body> tags in configwizardtemplate.htmand the </body></html> in optionswizardtemplate_misc.htmUntil they modify the code so it contains all the tags (html, body, head), stick to the method you used.But I suggest you guys modify the code in the 5.1 version so the options view can have a valid structure. Edited June 13, 2006 by sadicq Link to comment Share on other sites More sharing options...
mritter Posted June 13, 2006 Share Posted June 13, 2006 Those tags are not needed. The main wpi.htm file has them, I am just changing the code inside the page in the <div></div> sections. They are not seperate windows or processes, just a portion of the entire code. Link to comment Share on other sites More sharing options...
sadicq Posted June 14, 2006 Share Posted June 14, 2006 (edited) So, the wpi.htm file contains a "common" header, right?If this is true, shouldn't it work if he puts the code in the wpi.htm head section? The first time I looked over the code I thought indeed it should work out that way. Maybe I'm just too sleepy right now and I'm making another foolish mistake ... Edited June 14, 2006 by sadicq Link to comment Share on other sites More sharing options...
almulder Posted June 19, 2006 Author Share Posted June 19, 2006 Have another one. Been trying for a few hours and a llittle frustrated. I had it working at one point but deleted the line because I did not need it and now 2 weeks later I need it.Man this sucks I cant get it to work.<script type="text/javascript" src="./Themes/" + Theme + "/themestyle.js" application="yes"></script>That is the line I need to work. I want "Theme" the var to be used in pointing at the js file.any idea.This is the code I used to get the "css" file to work<script>document.write('<link rel="stylesheet" type="text/css" href="./Themes/'+ Theme +'/wpi.css" \/>');</script>Thanks- Albert Link to comment Share on other sites More sharing options...
sadicq Posted June 19, 2006 Share Posted June 19, 2006 Sorry for the late reply... (still gaming here )<script language="javascript">document.write('<link rel="stylesheet" type="text/css" href="./Themes/'+ Theme +'/wpi.css" \/>');</script>You missed the language="javascript".I guess it should work now. Link to comment Share on other sites More sharing options...
almulder Posted June 19, 2006 Author Share Posted June 19, 2006 (edited) I have the ccs file working, I was looking to get the .js file working.But thanks anyways.Hope you have been winning. Edited June 19, 2006 by almulder Link to comment Share on other sites More sharing options...
mritter Posted June 19, 2006 Share Posted June 19, 2006 Your code looks fine. Sometimes you need 2 periods at the start of the path../Themes/or none at all if you just loaded the theme file, your are already there. Link to comment Share on other sites More sharing options...
almulder Posted June 19, 2006 Author Share Posted June 19, 2006 (edited) Thanks for the idea, but that did not solve the issue for the .js file. And the wpi.htm is not loading from the same dir it is loading from a folder called layouts\classic. (Got the select theme and layout to work - thanks for your help mritter with the editing of the options). Edited June 19, 2006 by almulder Link to comment Share on other sites More sharing options...
sadicq Posted June 19, 2006 Share Posted June 19, 2006 This solves the problem. I had to trick the javascript at this one ...See the attached file.another_one.zip Link to comment Share on other sites More sharing options...
almulder Posted June 20, 2006 Author Share Posted June 20, 2006 Code seems more complicated than I remeber, buy hay it works. (and just the way I wanted)Thanks again sadicq- AlbertP.S. I dont know what I would do without you guys here on the forms site. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now