-
Senior Member
HTML Help Please..........
Hi,
I have many images that I would like to link to via a thumbnailed hyperlink. The problem I have though is that I would like to use the same base HTML file for all of my enlarged images.
I know how to do this for ASP on an NT Server but now I need to do the same sort of thing in HTML to work on a UNIX server.
At the moment in ASP my hyperlink is as follows:
main_image_template.asp?imagefile=image.jpg
And then in my image file I have this to display the image:
<img src='<%Response.Write Request.QueryString("imagefile")%>'>
All of this works fine in ASP but what do I need to do different or change to make this work in HTML on UNIX.
Thanks Heaps.
-
Hi,
probably your unix server can do php - failing that you could still use a javascript function that document.write()s the code
Musicman
-
Senior Member
How would I go about using the javascript function document.write().
Do I Still use this as my hyperlink:
main_image_template.htm?imagefile=image.jpg
and then use this in my Image File HTML File.
<img src="<document.write(imagefile)>">
I'm not too Flash with Javascript at all.
-
Senior Member
Anybody ??? Help Please !!!
-
Hi,
should be similar to
<script>
var n = document.location.indexOf('=');
image = document.location.substr(n);
document.write('<img src="'+image+'">');
</script>
Musicman
-
Senior Member
OK...
I now have this as my hyperlink on one page:
main_image_template.htm?imagefile=image.jpg
And then on the Image page I have the following:
<script>
var n = document.location.indexOf('=');
imagefile = document.location.substr(n);
document.write('<img src="'+imagefile+'">');
</script>
But at the moment no image shows up. Have I left something out ?
-
Senior Member
Help ???
I'm dying down here....
-
Senior Member
try something like this,
<script type="text/javascript">
var myImage = new Array();
myImage = location.search.split('=');
document.write('<img src="' + myImage[1] + '" />');
</script>
-
Senior Member
Originally posted by catbert303
try something like this,
<script type="text/javascript">
var myImage = new Array();
myImage = location.search.split('=');
document.write('<img src="' + myImage[1] + '" />');
</script>
Thankyou for that.
It works a treat..
Ciao...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|