Jump to content

Attn: Need code help


Recommended Posts

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


@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

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

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)

- Albert

P.S. Sorry if I forgot to mention anyone for there help. (Let me know)

Edited by almulder
Link to comment
Share on other sites

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.htm

and the </body></html> in optionswizardtemplate_misc.htm

Until 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 by sadicq
Link to comment
Share on other sites

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

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 by sadicq
Link to comment
Share on other sites

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

Sorry for the late reply... (still gaming here :lol: )

<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

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 by almulder
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...