Jump to content

Need html help please


Recommended Posts

Here is the original code (Working)

href="./themes/Glossy/wpi.js"

Here is what I need (Not working)

href= ".\themes\" + apath + "\wpi.js"

apath = var

I need it so that when the file loads is look in the current theme folder that is loaded for a file.

I know the code I have is not working any ideas?

Thank You

Link to comment
Share on other sites


Here is the original code (Working)

href="./themes/Glossy/wpi.js"

Here is what I need (Not working)

href= ".\themes\" + apath + "\wpi.js"

apath = var

I need it so that when the file loads is look in the current theme folder that is loaded for a file.

I know the code I have is not working any ideas?

Thank You

Isn't that Javascriptcode?? schouldn't it be like this

href= ".\themes\"<script language="Javascript1.2">+ apath +</script>"\wpi.js"

and the var should be set in wpi.htm or another .js file I think (but don't pin me on this because I'm bearly awake atm.

Link to comment
Share on other sites

Sorry it did not work.

The original code is from WPI.HTM

<html>
<head>


<link rel="stylesheet" type="text/css" href="./themes/Glossy/wpi.css" />
</head>

Need to, have to , want to, chnage the path to "./themes/ " + var + "/wpi.css"

Thanks for trying

Link to comment
Share on other sites

I'm not sure this would work, but you can try it.

<html>
<head>
 <script language="javascript" type="text/javascript">
 var dir = 'something';
 document.write('<link rel="stylesheet" type="text/css" href="./themes/'+ dir +'/wpi.css \/>');
 </script>
</head>
</html>

Edited by Stalkie
Link to comment
Share on other sites

I'm not sure this would work, but you can try it.

<html>
<head>
 <script language="javascript" type="text/javascript">
 var dir = 'something';
 document.write('<link rel="stylesheet" type="text/css" href="./themes/'+ dir +'/wpi.css \/>');
 </script>
</head>
</html>

Right that's what I mean!

Link to comment
Share on other sites

O thank you, thank you, thank you! :) :)

another question what about for a pic file?

<!-- The continue button. -->
 <a href;
 onMouseDown="document.continuebutton.src='./themes/Glossy/continuedown.gif';"
 onMouseOver="document.continuebutton.src='./themes/Glossy/continue.gif'; stm(getText(ttInstall),Style[0]);"
 onMouseOut="document.continuebutton.src='./themes/Glossy/continue.gif'; htm()">
 <img
   src="./themes/Glossy/continue.gif"
   align="absbottom"
   class="mainbtn"
   border="0"
   name="continuebutton"
   onClick="document.MediaPlayer.stop(); stopInterval(); CreateFile(false);">
 </img>

Want to change the "Glossy" into a var also in all four locations.

Hope you can help with this also.

And did I remember to say O thank you, thank you, thank you! :) :)

Edited by almulder
Link to comment
Share on other sites

I see where this line of questioning is going and I think it is a great idea. However, I do have a suggestion. While changing wpi.htm to write a javascript variable in place of the theme name would work, you are going to need to convert all 47 occurrences into javascript in order to do so. And since not all of the occurrences are close together it will become burdensome, quickly.

Instead you can write a function that modifies any tag's attribute that requires theming with the correct path for the chosen theme. Then you could call this function when the body onload event is raised.

Another function would be needed to be written for when the mouse events are raised. As long as the image names are similar (which they look to be) this should be pretty simple.

Using functions will not require huge <script> blocks and will allow wpi.htm to remain a HTML document rather than a huge js file that creates a HTML file on the fly.

Just my 2cents though...

Link to comment
Share on other sites

I am working on this. I have a previous engagement this morning for a few hours, but when I return I will jump right back into it. Will have something for you this afternoon/tonight.

And, your welcome. :)

UPDATE: I have gotten most of the basics working. Making these changes allows us to move all the HTML back to wpi.hta. And because we no longer have to read and output an entire HTML file WPI runs WAY faster.

Only problem is that all this does require making some changes to the HTML and kel told me that he made some changes so, I am going to ask him for a copy so that he doesn't have a nightmare making my changes.

Time for me to go.. be back in a few hours.

UPDATE: I just got back. kel was nice enough to upload the file for me. I'll post when I'm done.

Edited by athomsen
Link to comment
Share on other sites

Ok, is is tonight and I am not done yet. Since I had control over wpi.htm I have taken it upon myself to updated the hell out of it so this is all taking me longer than I expected.

almulder I will contact you via IM...

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