Guest_imported
New member
- Jan 1, 1970
- 0
<br>
I am trying to write a script that will write the tag below<br>
<br>
<IMG SRC="Image.gif" Width="XXX" Height="XXX" ID="PicID"><br>
<br>
What The script needs to do, is depending on the users input write the above tag replacing the XXX with particular numbers... <br>
<br>
Here is what I have so far... it is not working!<br>
<br>
<script><br>
function ShowTheMap(e)<br>
{ <br>
If (e==""){<br>
ImgWidth="300";<br>
ImgHeight="280";<br>
}<br>
If (e=="1")<br>
{<br>
ImgWidth="450";<br>
ImgHeight="420";<br>
}<br>
If (e=="2")<br>
{<br>
ImgWidth="675";<br>
ImgHeight="630";<br>
}<br>
If (e=="3")<br>
{<br>
ImgWidth="1024";<br>
ImgHeight="945";<br>
}<br>
ThisString='<IMG SRC="Image.gif" width="'+ImgWidth+'" Height="'+ImgHeight+'" ID="PicId">';<br>
document.write(ThisString);<br>
}<br>
</script><br>
<br>
<br>
And the script would (supposedly) be called like this:<br>
<br>
<A Href="#" onClick="ShowTheMap()">X1</a><br>
<A Href="#" onclick="ShowTheMap(1)">X2</a><br>
<A Href="#" onclick="ShowTheMap(2)">X3</a><br>
<A Href="#" onclick="ShowTheMap(3)">X4</a><br>
<br>
I am trying to write a script that will write the tag below<br>
<br>
<IMG SRC="Image.gif" Width="XXX" Height="XXX" ID="PicID"><br>
<br>
What The script needs to do, is depending on the users input write the above tag replacing the XXX with particular numbers... <br>
<br>
Here is what I have so far... it is not working!<br>
<br>
<script><br>
function ShowTheMap(e)<br>
{ <br>
If (e==""){<br>
ImgWidth="300";<br>
ImgHeight="280";<br>
}<br>
If (e=="1")<br>
{<br>
ImgWidth="450";<br>
ImgHeight="420";<br>
}<br>
If (e=="2")<br>
{<br>
ImgWidth="675";<br>
ImgHeight="630";<br>
}<br>
If (e=="3")<br>
{<br>
ImgWidth="1024";<br>
ImgHeight="945";<br>
}<br>
ThisString='<IMG SRC="Image.gif" width="'+ImgWidth+'" Height="'+ImgHeight+'" ID="PicId">';<br>
document.write(ThisString);<br>
}<br>
</script><br>
<br>
<br>
And the script would (supposedly) be called like this:<br>
<br>
<A Href="#" onClick="ShowTheMap()">X1</a><br>
<A Href="#" onclick="ShowTheMap(1)">X2</a><br>
<A Href="#" onclick="ShowTheMap(2)">X3</a><br>
<A Href="#" onclick="ShowTheMap(3)">X4</a><br>
<br>