August 5, 200521 yr 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
August 5, 200521 yr 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<{POST_SNAPBACK}>Isn't that Javascriptcode?? schouldn't it be like thishref= ".\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.
August 5, 200521 yr Author 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
August 5, 200521 yr 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 August 5, 200521 yr by Stalkie
August 5, 200521 yr 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><{POST_SNAPBACK}>Right that's what I mean!
August 6, 200521 yr Author 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 August 6, 200521 yr by almulder
August 6, 200521 yr 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...
August 6, 200521 yr Author If you can give me an example of how to do this I will be more than happy to do so. and if you could give me examples of both way would be great.Thank you.
August 6, 200521 yr 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 August 6, 200521 yr by athomsen
August 7, 200521 yr 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...
Create an account or sign in to comment