Jump to content

teakupudoru

Members
  • Posts

    5
  • Joined

  • Last visited

Posts posted by teakupudoru

  1. thanx for your replies! they were both very helpful. i have managed to use boenrobot's suggestion and show an xslt transformation inside the html.@ jesh: however, i think the httprequest method from http://w3schools.invisionzone.com/index.php?showtopic=9461 would be more effective and elegant in my case. unfortunately, i have not managed to apply it successfully, however. i am not quite sure where to place the code:

    var xml = xmlhttp.responseXML;var books = xml.getElementsByTagName("book");var div1 = document.getElementById("div1");var div2 = document.getElementById("div2");div1.innerHTML = books[0].getElementsByTagName("title")[0].childNodes[0].data;div2.innerHTML = books[1].getElementsByTagName("title")[0].childNodes[0].data;

    if you could possibly post this code here within context of the html file that would be most useful... sorry2b such a noob. :)

  2. hi.i'm really hoping somebody will be able to help me out on this one...my problem is really straightforward and any help from a knowledgable xml/html guru would be greatly apprecited.i would like to display a specific xml element within the body of an html page. i am no expert, but i have looked thru all the tutorails on w3schools and i have managed to create my xml and xsl files using the cd catalogue example: http://www.w3schools.com/xsl/xsl_for_each.asp.the above example makes use of an xml database and produces a neat looking (xhtml) page using an xsl stylesheet. i have applied this example to my data and managed to produce my own database which displays thru an xsl stylesheet.however, i wish to display a specific element within an existing html page. specifically, how can i call up an element from the xml database and display it within an html page that already contains numerous lines of code (images, links, text, some flash etc.). obviously, i wish to avoid data isalnds and am unable to do it with xsl. which code should i use and is xsl necessary?thank you very much for your help.

  3. hi,im new to xml and am trying to do something with pre-existing xml and html structures. it's been making my life difficult for 2 weeks now, so i am in desperate need of help.basically, im using simpleviewer to create a gallery. a gallery typically churned out by simpleviewer looks something like thisxml:

    <?xml version="1.0" encoding="UTF-8"?><simpleviewerGallery maxImageHeight="1024" maxImageWidth="1024" textColor="0xFFFFFF" frameColor="0xffffff" frameWidth="20" stagePadding="40" thumbnailColumns="3" thumbnailRows="3" navPosition="left" title="waaaaaayyyyyyy" enableRightClickOpen="true" backgroundImagePath="" thumbPath="thumbnails/" imagePath="" ><image>		<filename>undead_yucki_bunny_1.jpg</filename>				<caption>undead_yucki_bunny_1.jpg</caption></image><image>			<filename>yucki_weeepy_bunny_1.jpg</filename>	<caption>yucki_weeepy_bunny_1.jpg</caption></image><image>		<filename>electric_muti_1.jpg</filename>			<caption>electric_muti_1.jpg</caption></image></simpleviewerGallery>

    with many more "image" elements, of course.html:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><!-- saved from url=(0014)about:internet --><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head>	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />	<title>waaaaaayyyyyyy</title>	<!-- Download SimpleViewer at www.airtightinteractive.com/simpleviewer -->	<script type="text/javascript" src="swfobject.js"></script>		<style type="text/css">				/* hide from ie on mac \*/	html {				height: 100%;				overflow: hidden;			}				#flashcontent {				height: 100%;			}		/* end hide */			body {				height: 100%;		margin: 0;		padding: 0;		background-color: #181818;		color:#ffffff;			}	</style></head><body>	<div id="flashcontent">SimpleViewer requires Macromedia Flash.<a href="http://www.macromedia.com/go/getflashplayer/">Get Macromedia Flash.</a> If you have Flash installed, <a  href="index.html?detectflash=false">click to view gallery</a></div>					<script type="text/javascript">					var fo = new SWFObject("viewer.swf", "viewer", "100%", "100%", "7", "#181818");			fo.addVariable("preloaderColor", "0xffffff");			fo.addVariable("xmlDataPath", "gallery.xml");			fo.write("flashcontent");				</script>	</body></html>

    an example of the gallery can be seen @ http://www.antiant.co.za/testgallery/notice how the caption is displayed underneath the thumbnails.so far so good. my query is very simple: all i want to do is make the caption clickable. for e.g. when the gallery is displaying the first image, i want to be able to click on the txt "undead_yucki_bunny_1.jpg" and hyperlink it to a url containing more info OR a paypal pay page or whatever.i have tried everything (html, xml, href, xlink, xlst, data isalnds, etc.) and i have read thru the w3schools.com tutorials and examples, and i am still unable to do it even tho im sure it's probably quite simple. it's driving me mental. please please please help.thank you very much in advance.

×
×
  • Create New...