HTML - Using Variables From A Separate File
Hello guys! Let me explain the problem...
I have a website full of radios, 12 on total, and all of them have something like this: <object id="Radio01" classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95" type="application/x-oleobject" width="140" height="45" align="middle"> <param name="FileName" value="Link_to_the_stream"> <param name="Autostart" value="False"> <param name="enableContextMenu" value="False"> <param name="ShowControls" value="True"> <param name="ShowDisplay" value="False"> <param name="ShowStatusBar" value="False"> <param name="Volume" value="100"> <embed src="Link_to_the_stream" type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/download/default.asp" width="140" height="45" align="middle" autostart="0" enableContextMenu="0" showcontrols="1" showdisplay="0" showstatusbar="0" volume="100"></embed></object><br> <b><a href="Link_to_the_website" target="_blank"> Radio_name </a> As the radios are continually going on and off, sometimes I need to switch them. But the html of my website is too long and I would not like to edit it every time I need to switch a radio. I would like to, instead, create an apart document with variables like: Link_to_stream = "http://www.link.com:port/" Link_to_the_website = "http://www.radiowebsite.com/" Radio_name = "Name of the radio" And then make the html call these variables, so if I wish to switch a radio, I would only edit the file... The tricky part would be to edit the object src, I think. Is there any way to do that? Any method? I'm using conventional html on my website. Thanks in advance! Similar TutorialsI'm very new to HTML/CSS/Javascript. In the website I'm trying to build, I want to display a relatively simple navigation menu on the left side of the webpage, similar in look to the one here (example): http://build-website.com/design/opportunity.html Is there some way to put the initialization text for the navigation menu in a separate .html file (or, just some other file), so that every time I want to add a section/link to the nav menu, I won't have to go through each of my web pages individually and add the code for the link? (I am not going to use frames because, among other things, that would make it more difficult to bookmark and copy addresses of individual pages) I have been teaching myself through the w3schools tutorials, but despite looking through them and googling for answers I haven't been able to find a solution. Is this possible in HTML? Something that would allow something like like <div src="navmenu.html"> would be ideal but I haven't been able to find anything. (At the moment I'm just using notepad and typing in code manually) I'd like to have a html file where i can pass over the variables from another html file i.e. title = "Image 01" Image = image.jpg description = "image 01 description test" then with a link open the html file with this variables. thanks. Hi I know this subject has been covered many times before and I have certainly done much research and tried all sorts of code to put a comma in a number located in a text box but to no avail. The original calculation is calculated by these lines of code: function updatesum() { var userVl = getUserValue(); var av3 = getav3(userVl); document.getElementById('av3').value = (av3.toFixed(2)); function getav3(vl) { document.getElementById("av3").value = ((vl-0) *2.5) return ((vl-0) *2.5); } The above works absolutely fine as far as calculating my number and showing the resulting number with decimal point , 2 places, but I can't seem to get any 'comma separating' code to work. I am really dumb at writing the code but can usually change given code to suit, but this one has be stumped. This is only one of many calculations on the page but even if you can give me code to make this one work I will play around with the others on my own. Here is the web page if anyone wants to have a look although on here it does not yet reflect all my changes but will give an idea as to what I am trying to achieve. http://www.teamkiwi.890m.com/tk/calculator9999999.html Thank you to anyone who may help me Cheers Dai I'm going to be placing a survey on the web eventually and I had a few questions. One is I don't want all the questionnaires on just one page I want to have an submit button after every one and then have it go to the next page. How do I go about doing that? Secondly, after the they are finished I was told there is a way to have their data transmitted to excel. How do I do that as well? Thanks in advance! Hello, I have an image that I want to cut into about 10 separate links. Is this hard? How do I do this? Thanks, Hi, Since we know we can use Div tag to right align and left align but everytime we use it, it gets printed on the next line. Suppose we have 2 paragraphs and we want to right align one and the other left align on the same line, how do we achieve it. I know frames are not the most popular thing in the world, but I was wondering if there was a way I could make a link on a page open two separate pages in two separate forums... say I have a link port, and I want it to open portside.html in frame "orange" and port.html in frame "main" all with one link... I would include code, but seeing as I have no idea how to do it, I can't Thanks for any help you can give me... knud Hi, I have a general question. I need a single landing page for 2 different domains. I know, it's a long story. Is there a better or even best way to set this up? Right now, I've simply copied the landing page and uploaded it to both sites where it splits into an "Enter Here" for one site, and an "Enter Here" for the other site. When done, the plan is to NOT point both domains to the same index page but keep them totally separate. I just would like to know if this is the right way to go about it and if not, what would be the best way? Any help would be appreciated. Thank you. Ok I've always been told with the age old myth of "you should never keep your domains and hosting with the same company." It was something about if they change their rules they can lock you in or something weird? Because of this I have always had all of my domains with godaddy and bounced around with hosting & now I have my hosting with hostgator. Whats the real scoop on this? The following common code is not working in Firefox (3.0.11). It works in Safari (4.02) and IE7. When I say not working, I mean that when I click the submit button, the address does not change to the form processing url: Code: <!-- The data encoding type, enctype, MUST be specified as below --> <form enctype="multipart/form-data" action="uploader.php" method="POST"> <!-- MAX_FILE_SIZE must precede the file input field --> <input type="hidden" name="MAX_FILE_SIZE" value="30000" /> <!-- Name of input element determines name in $_FILES array --> Send this file: <input name="mp3file" type="file" /> <input type="submit" name="submit" value="Send File" /> </form> The file uploader.php does nothing, it is blank, I'm merely trying to establish communication. Once again, the code functions in IE and Safari so I dont think this is PHP related. I have a project written in ASP.NET under Visual Studio 2005 with C#. I am also using Infragistics objects for .NET Advantage 2007. In my page to attach resources to a record I have written a browser and am displaying previously chosen resources here. But when I click the upload button the page opens a new window (which is not a dialog window, but a normal one) which is exactly the same as my dialog window. How can this possibly happen? Can anyone help me? Hi, Anybody have any idea how to convert a xml file to excel file.Actually i m working on visual studio and using C programming language.I have a xml file in the same directory where my programm is running.When i pressed a icon it will take the xml file automatically and convert to a excel file and show the outpt to the user.How can i achive this goal ??? Any help would be great. Thanks, Basanta Hi ,I am new in html.Hope you can guide me step-by-step on this. I want to import my .txt file into the html form and the html form can add new item then to be add in to that particular .txt file too as well. can this be done? For example: (fruits.txt) 1.apple 2.banana 3.orange Can this fruit.txt be impoted to fruit.html page and show it at fruit.html page, at the same time, the fruit html page allow to add in new fruit, and once user add in new fruit, the fruit.txt file will be updated as well. Thanks for your guidiance and help. :-) can anyone fill me in on how to call a variable from a javascript file? this is what im doing: click a button on a page that is generated from a javascript script--> button redirects to new htm file. new htm page that is loaded needs to know the value of a variable from the script that was run in the previous page before the redirection. sooo: page A is loaded: script loads a button into the webpage user clicks the button: the button performs window.location = "www.somesite.com" somesite.com is loaded but a variable is needed from the script that loaded the original button so that the value held by the variable can be displayed on the page. Any ideas to how I would accomplish this would be greatly appreciated. Thanks Our website works perfectly with Mozilla Firefox, but in IE7 or 8, if a person looks around through the content and then starts over choosing different options, the session variables don't get changed. If the cookies are cleared, then the problem is temporarily solved. Is there common code that solves this problem for IE? Thanks, mei I need to display variables on my thank you page from my opt-in page (using Aweber as my autoresponder). They say to display variables use <script>printElement("custom communication")</script> which is fine and displays correctly but I need to include that within a IF/Else statement so I can display a different message based on the variable. Here is my If/Else which does not work - I assume because the extra <script> <script type="text/javascript"> var d = new Date() var time = <script>printElement("custom communication")</script> if (time=='Satisfied') { document.write("<b>Good morning</b>"); } else if (time=='Dissatisfied') { document.write("<b>Good day</b>"); } else { document.write("<b>Hello World!</b>"); } </script> Any help on how I can solve this would be great!!! I have a website where I want to make a drop down menu that will bring you to different pages. It is a very basic, sort of old-fashioned website that relies entirely on html. What I'm trying to do is make a drop-down menu that will be used as navigation for a section of a website and I want to have it in each internally linked page in that section, but I'm going to be adding more pages to it over time so I want to be able to put the drop-down menu code in a separate text file and then substitute it into the pages that I make that the options in the menu link to and then just edit the code in the text file when I add another page so that I don't have to go back and edit the code every single individual page whenever I add a new one among them. Basically all I'm asking is how I can put html code in a text file and then substitute that code into an html page by referring to the file. Thanks in advance for any help. Hey all, I want to have code that will take a user to a site that they specify. For example: John puts 'google' in the input box. The form will then send him to www.google.com. So whatever SITENAME is it goes to www.<whatever it is>.com Any help please? Will I need JavaScript? Code: <form name="input" action="http://www.SITENAME.com" method="get"> <input type="text" name="SITENAME" value="" size="20"> <input type="submit" value="Submit"> </form> Thanks, MacAddikt |