473,396 Members | 1,706 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Page Title???

tom
Hi folks, any help on this would be appriciated.

I'm building a site that shows guiter tabs and also lets you hear the midi
file of that particular tab. If you go to www.guitarmidi.co.uk and click
'view all' then click 'play' on any song, the midi should start playing in a
new window.

What I would like to do is have the name of the song as the title of the new
page (at the moment it only shows the path of the midi file on the server
and really takes the look off it).

Heres the code (the xml file is at the bottom):-

<head>

<script type="text/javascript">

function newWindow(src)
{
window.open(src, "_blank", "height=100, width=400, menubar=no,
toolbar=no")}

</script>

</head>

<body>
..
..
<a href="javascript:newWindow('media/{$path1}.mid')"><img
src="images/play.gif" border="0"/></a>
..
..
</body>


data.xml
---------
<cat>
<links>
<artist>beatles, the</artist>
<song>a day in the life</song>
<path>beatles_-_a_day_in_the_life</path>
</links>
<links>
<artist>beatles, the</artist>
<song>free as a bird</song>
<path>beatles_-_free_as_a_bird</path>
</links>
<links>
<artist>beatles, the</artist>
<song>help</song>
<path>beatles_-_help</path>
</links>
<links>
<artist>beatles, the</artist>
<song>i am the walrus</song>
<path>beatles_-_i_am_the_walrus</path>
</links>
Apr 18 '06 #1
1 1419

tom wrote:
What I would like to do is have the name of the song as the title of the new
page (at the moment it only shows the path of the midi file on the server
and really takes the look off it).


So just do it ? What's the holdup here ?
It's a very simple problem, so there are any number of ways to do it.

Personally I'd use some Perl (or Ruby, JavaScript, or whatever you
like) and two XSLT stylesheets.

The script loops over the XML document, in a DOM, and iterates the
tracks. Each one then triggers an XSLT stylesheet where the relevant
values are passed in as parameters. This generates a HTML page which is
saved with a different filename. Another XSL stylesheet generates an
index listing as HTML.

Finally the whole lot is uploaded by ftp. Doing it off-line like this
is simple, reliable and works on any server. You only need to update
when you've done a manual edit for a new song. Although it's "wasteful"
to rebuild the lot, this only takes a minute or two of computer time
and it saves your time.

Apr 19 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: the wonderer | last post by:
This is an elementary question, but I've not been able to find the answer, so here goes: I am developing a site using php. I have the html header information in a file that I include in all the...
6
by: Don Grover | last post by:
How can I get the page title into an variable to handle in my asp. Don
1
by: alex | last post by:
Hi ! I couldn't make backups with our new system using db2 8.2. Every time I trigger a backup I get this error message: BACKUP DATABASE EBUERO2 ONLINE TO "/raid/backup/ebuero2/part1",...
5
by: Maxim Izbrodin | last post by:
Hello For displaying page titles for my ASP.NET applications I use the following technique <title><%=BannerModule.PageTitle%></title where BannerModule.PageTitle is a public field of my user...
4
by: Glenn M | last post by:
I have a shared XML file on a server . i also have one xslt file that performs a simple transform on in to view the data. now i want to have another page that lets users modify the shared xml...
14
by: Paul | last post by:
I want to set the page title and/or a form hidden field programatically through ASP.Net. I do not want to use something like... <% sTitle ="My Title" %> <html><title><%=sTitle%></title>..... ...
6
by: scottyman | last post by:
I can't make this script work properly. I've gone as far as I can with it and the rest is out of my ability. I can do some html editing but I'm lost in the Java world. The script at the bottom of...
1
by: vj | last post by:
How i can populate all fileds dynamically in jsp page based on contents found in xml file? I have written jsp servlets and java class file. i transferred automatic data from jsp to servlet then to...
0
by: Spondishy | last post by:
Hi, I have a fairly simple httpmodule tied in to the endrequest event of the pipeline that writes the page title to the iis log. The problem is, I have a page where the title is changed in the...
4
osward
by: osward | last post by:
I had made a table colum sortable and paging the table, following are the code // Display Event List echo "<center>"._EVENTLIST."</center><br>"; $now = Date(Y-m-d); // sort table...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.