?
Solved

How do I convert a drop-down menu selection into a color table containing all it's existing functions. Please Help!

Posted on 2003-03-09
51
Medium Priority
?
488 Views
Last Modified: 2010-05-18
Existingly, I have this program it is a color table containing different colors...
--------------------------------------------------------------------------
<table border='0' width='220' height='180' cellpadding="0" cellspacing="0" class="bordertable">
<tr><td bgcolor='#F4F4F4'valign="middle" align="center">
<form name="f" action="" method="get">
<div align="center"><b> XSL Colour Chart </b></div>
<table border="5" cellpadding="0" cellspacing="1" >
<tr>
<td><img src="colourlibrary/mintcream.gif" onClick="f.text1.value='mintcream'" onMouseOver="f.text1.value='mintcream'"></image></td>          
<td><img src="colourlibrary/bisque.gif" onClick="f.text1.value='bisque'" onMouseOver="f.text1.value='bisque'"></image></td>                            
<td><img src="colourlibrary/mistyrose.gif" onClick="f.text1.value='mistyrose'" onMouseOver="f.text1.value='mistyrose'"></image></td>      
<td><img src="colourlibrary/paleturquoise.gif" onClick="f.text1.value='paleturquoise'" onMouseOver="f.text1.value='paleturquoise'"></image></td>    
<td><img src="colourlibrary/palegreen.gif" onClick="f.text1.value='palegreen'" onMouseOver="f.text1.value='palegreen'"></image></td>            
<td><img src="colourlibrary/papayawhip.gif" onClick="f.text1.value='papayawhip'" onMouseOver="f.text1.value='papayawhip'"></image></td>          
</tr>
---------------------------------------------------------------------------



The coding below uses a drop-down menu to call the color file. How do I program the above color table to call the same color file. And where do I embed the coding so that the program above does the same thing the one below does. Please Help!!!
---------------------------------------------------------------------------
<form name="selection4"  method="post" action="savexml.asp">
<div align="left"><font size=1 face="Verdana" color="#000000">
<B><a href="javascript:showpreview_brief(selection4.xmlfileid.value)"><img src="previewiconimage.gif" border="0" alt="source preview"></a>
<input type="hidden" name="xmlfileid" value="/MyProj/DEFAULT/left.xml"> Left.XML </B>


</div>
</td><td><div align="left"><font size=1 face="Verdana" color="#000000">XSL Stylesheet</font></div>
<div align="left"><font size=1 face="Verdana" color="#000000">
<select name="xslfileid">

<option value="/MyProj/DEFAULT/left.xsl">Default Style
<option value="/MyProj/DEFAULT/darkgray.xsl">DarkGray Style
<option value="/MyProj/DEFAULT/orangegold.xsl">DarkOrange Style
<option value="/MyProj/DEFAULT/violet.xsl">Violet Style
</select>
</div>
</td>
<td width="80"><div align="left">
</td>
<td width="80"><div align="left">
<input type="image" src="savesettingsbutton.gif" id="btnSubmit" name="btnSubmit" value="Save Settings" /></div>
</td></form>
<td width="80"><div align="left"><input type="image" src="previewbutton.gif" name="button" value="Preview XML with selected Stylesheet" onClick="transformxmloutput_1()"></div>
</td>
</tr>
</table>
---------------------------------------------------------------------------

Thanks Heaps!
0
Comment
Question by:joe851
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 33
  • 18
51 Comments
 
LVL 5

Expert Comment

by:gator4life
ID: 8101488
What exactly do you want your code to do?  Do you want to preview an XML file with a stylesheet that is retrieved based on the color that is clicked on?  Also, could you post the code for the transformxmloutput_1() function that is being called when the preview button is clicked on in the second grouping of code?

If you let me know this stuff, we can go from there...

gator4life
(chomp, chomp)
0
 

Author Comment

by:joe851
ID: 8101620
No what I want to do is this:
Presently I have a drop down menu and in that drop down menu I have four selections "Default Style", "Dark Gray Style"... A user clicks on the "Dark Gray Style" and "savesettings" button. Then when he clicks on the "Preview XML" button, the contents are displayed.

I have changed this: Instead of using a drop down menu, I have decided to use a 6 by 6 color table, containing more colors.

The PROBLEM I have is I don't know how to link that color table to call up the "savesettings" and "Preview XML" buttons like it's done in the coding for the drop down menu.
-----------------------------------------------------------
function transformxmloutput_1(){
//Load XML
var xml = new ActiveXObject("Microsoft.XMLDOM")
xml.async = false
var xmlsrc=  selection4.xmlfileid.value
xml.load(xmlsrc)
//Load XSL
var xsl = new ActiveXObject("Microsoft.XMLDOM")
var xslsrc= selection4.xslfileid.value
xsl.async = false
xsl.load(xslsrc)
//Transform
//document.write(xml.transformNode(xsl))

//Transform using popup window.
var popup=window.open("","")
popup.document.write(xml.transformNode(xsl))
popup.document.close()
}
-----------------------------------------------------------
The above was obtained from a jscript file.
0
 

Author Comment

by:joe851
ID: 8101662
No what I want to do is this:
Presently I have a drop down menu and in that drop down menu I have four selections "Default Style", "Dark Gray Style"... A user clicks on the "Dark Gray Style" and "savesettings" button. Then when he clicks on the "Preview XML" button, the contents are displayed.

I have changed this: Instead of using a drop down menu, I have decided to use a 6 by 6 color table, containing more colors.

The PROBLEM I have is I don't know how to link that color table to call up the "savesettings" and "Preview XML" buttons like it's done in the coding for the drop down menu.
-----------------------------------------------------------
function transformxmloutput_1(){
//Load XML
var xml = new ActiveXObject("Microsoft.XMLDOM")
xml.async = false
var xmlsrc=  selection4.xmlfileid.value
xml.load(xmlsrc)
//Load XSL
var xsl = new ActiveXObject("Microsoft.XMLDOM")
var xslsrc= selection4.xslfileid.value
xsl.async = false
xsl.load(xslsrc)
//Transform
//document.write(xml.transformNode(xsl))

//Transform using popup window.
var popup=window.open("","")
popup.document.write(xml.transformNode(xsl))
popup.document.close()
}
-----------------------------------------------------------
The above was obtained from a jscript file.
0
Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

 

Author Comment

by:joe851
ID: 8101734
No what I want to do is this:
Presently I have a drop down menu and in that drop down menu I have four selections "Default Style", "Dark Gray Style"... A user clicks on the "Dark Gray Style" and "savesettings" button. Then when he clicks on the "Preview XML" button, the contents are displayed.

I have changed this: Instead of using a drop down menu, I have decided to use a 6 by 6 color table, containing more colors.

The PROBLEM I have is I don't know how to link that color table to call up the "savesettings" and "Preview XML" buttons like it's done in the coding for the drop down menu.
-----------------------------------------------------------
function transformxmloutput_1(){
//Load XML
var xml = new ActiveXObject("Microsoft.XMLDOM")
xml.async = false
var xmlsrc=  selection4.xmlfileid.value
xml.load(xmlsrc)
//Load XSL
var xsl = new ActiveXObject("Microsoft.XMLDOM")
var xslsrc= selection4.xslfileid.value
xsl.async = false
xsl.load(xslsrc)
//Transform
//document.write(xml.transformNode(xsl))

//Transform using popup window.
var popup=window.open("","")
popup.document.write(xml.transformNode(xsl))
popup.document.close()
}
-----------------------------------------------------------
The above was obtained from a jscript file.
0
 
LVL 5

Expert Comment

by:gator4life
ID: 8103211
joe -

Thanks for clarifying...I understand your problem much better now.

Go ahead and try something like this:

<form name="selection4" action="savexml.asp" method="post">
     <input type="hidden" name="xmlfileid" value="" />
     <table border="0" width="220" height="180" cellpadding="0" cellspacing="0" class="bordertable">
          <tr>
               <td bgcolor="#f4f4f4" align="center">
                    <b>XSL Colour Chart</b><br />
                    <br />
                    <table border="5" cellpadding="0" cellspacing="1">
                         <tr>
                              <td><input type="image" src="colourlibrary/mintcream.gif" onmouseover="this.form.xmlfileid.value = '/MyProj/DEFAULT/mintcream.xsl'" /></td>
                              <td><input type="image" src="colourlibrary/bisque.gif" onmouseover="this.form.xmlfileid.value = '/MyProj/DEFAULT/bisque.xsl'" /></td>
                              <td><input type="image" src="colourlibrary/mistyrose.gif" onmouseover="this.form.xmlfileid.value = '/MyProj/DEFAULT/mistyrose.xsl'" /></td>
                              <td><input type="image" src="colourlibrary/paleturquoise.gif" onmouseover="this.form.xmlfileid.value = '/MyProj/DEFAULT/paleturquoise.xsl'" /></td>
                              <td><input type="image" src="colourlibrary/palegreen.gif" onmouseover="this.form.xmlfileid.value = '/MyProj/DEFAULT/palegreen.xsl'" /></td>
                              <td><input type="image" src="colourlibrary/papayawhip.gif" onmouseover="this.form.xmlfileid.value = '/MyProj/DEFAULT/papayawhip.xsl'" /></td>
                         </tr>
                    </table>
                    <br />
                    <a href="javascript:transformxmloutput_1();"><img src="previewbutton.gif" alt="Preview XML with selected Stylesheet" border="0" /></a>
               </td>
          </tr>
     </table>
</form>

This example names the form element with the name that you were already using in the second grouping of code ("selection4").  It also sets the action and method attributes of the form element to what you had them previously set to.  When you mouse over one of the colored cells, the path to the corresponding XSL stylesheet will be populated in the hidden field "xmlfieldid", just like you had it previously working.  However, each colored cell is now an input element of type="image".  Whenever an input element of type="image" is clicked on, it automatically submits the form that it belongs to.  So, you mouse over a colored cell, which sets the hidden field, and then you click on the colored cell to submit the form to "savexml.asp", which I assume grabs the corresponding value of "xmlfileid".  The "Preview XML" button has just been replaced with a hyperlinked image with an href attribute set to call the transformxmloutput_1() function.

Hope this helps you out.

gator4life
(chomp, chomp)
0
 

Author Comment

by:joe851
ID: 8109056
Hi Gator,
Thanks a lot for your reply. I really appreciate your help. Nevertheless the program seem to have some bug.

Whenever I click on a paticular color in the color table, it prompts me with this message:

"Errors occurred while saving your form submission."

I'm trying to debug it on my own but I could do with some help. I'll transfer the points once I'm done!

Thanks again!

Joe
0
 
LVL 5

Expert Comment

by:gator4life
ID: 8109218
Unfortunately, I think that error is coming from the ASP side, no?  I tested the code I posted with alert messages from the client-side, and the form was submitting the correct value for the XSL stylesheet according to the image being clicked on, so I don't think there are any errors there.  If you would like to post the ASP page that this form is submitting to (savexml.asp), then I could take a look.

gator4life
(chomp, chomp)
0
 

Author Comment

by:joe851
ID: 8109256
Hi Gator, this is the savexml.asp page below:

Thanks in advance!!! Ask me if you need anymore pages. I'm actually doing this as an enhancement feature in my project.

To make it more clearer: This project is about using XML as an engine to create and HTML output. The left.xml part is for the left frame of the HTML output page. Initially it was done using a drop down menu. My project is to enhance it, making it a 6 by 6 color table.

<%

'--------------------------------------------------------------------
'The "addNewContacttoXML" Function accepts two parameters.
'strXMLFilePath - The physical path where the XML file will be saved.
'strFileName - The name of the XML file that will be saved.
'--------------------------------------------------------------------

Function addNewContacttoXML(strFileName)

 'Declare local variables.
 Dim objDom
 Dim objRoot
 Dim objPI
 Dim objPII
 Dim blnFileExists
 Dim XSLhref
Dim objNode
Dim objNewPI


 'Instantiate the Microsoft XMLDOM.
 Set objDom = server.CreateObject("Microsoft.XMLDOM")
 objDom.preserveWhiteSpace = True


 'Call the Load Method of the XMLDOM Object. The Load Method has a
 'boolean return value indicating whether or not the file could be
 'loaded. If the file exists and loads it will return true, otherwise,
 'it will return false.

 blnFileExists = objDom.Load(strFileName)
' response.write("blnFileExists = " &blnFileExists  &"<BR>")
 'response.write("Accessing : " &strFileName &"<BR>")
Dim XSLFileSrcA
XSLFileSrcA= server.MapPath(XSLFilesrc)
' response.write("Selected Style Sheet : " &XSLFilesrcA &"<BR>")

 'Test to see if the file loaded successfully.
 If blnFileExists = True Then

  'If the file loaded set the objRoot Object equal to the root element
  'of the XML document.
  Set objRoot = objDom.documentElement
 Else

  response.write("Error,XML File not found")
 End If




 


 'Check once again to see if the file loaded successfully. If it did
 'not, that means we are creating a new document and need to be sure to
 'insert the XML processing instruction.
 If blnFileExists = True then



'------------edit processing line-----------------------------

    Dim hrefsrc
    hrefsrc="href=""" &XSLFilesrc +""""
    dim prNode
    set prNode=objdom.firstChild
    while not prNode.nodename = objdom.documentElement.nodename
        'Response.Write prNode.nodeType & "   " & prNode.nodename & "<BR>"
        if prnode.nodename="xml-stylesheet" then
            prNode.data="type=""text/xsl"" " &hrefsrc
        end if
        set prnode=prNode.nextSibling
    wend

 
 End If


 'Save the XML document.
 objDom.save strFileName


 'Release all of your object references.
 Set objDom = Nothing
 Set objRoot = Nothing
End Function


'Do not break on an error.
On Error Resume Next


Dim XMLfilesrc
Dim XSLfilesrc

'Check to see which file we are accessing from the form
  XMLfilesrc = Request.Form("xmlfileid")
  XSLfilesrc = Request.Form("xslfileid")
  'response.write(XMLFilesrc)
  'response.write("<br>")
  'response.write(XSLFilesrc)
  'response.write("<br>")

'Call the addNewContacttoXML function, passing in the physical path to
'save the file to and the name that you wish to use for the file.
addNewContacttoXML server.MapPath(XMLFilesrc)



'Test to see if an error occurred, if so, let the user know.
'Otherwise, tell the user that the operation was successful.
If err.number <> 0 then
 Response.write("Errors occurred while saving your form submission.")
Else
 Response.write("<BR><B>Your form submission has been saved.</B>")
 Response.write("<BR><B>Saved in: " &server.MapPath(XMLFilesrc) &"</B>")
 Response.write("<BR><input type=""button"" name=""button"" value=""back"" onClick=""location.href='selectionofstyle.asp'""> ")
End If
%>

0
 
LVL 5

Expert Comment

by:gator4life
ID: 8109433
joe -

Can you replace the following lines of code:

If err.number <> 0 then
Response.write("Errors occurred while saving your form submission.")
Else

with this:

If (Err.Number <> 0) Then
     Response.Write(Err.Number & " : " & Err.Description)
Else

Then, run the code again, and tell me what this Response.Write shows for the error.  Kind of hard to troubleshoot when you cover up the normal error messages with your own.

gator4life
(chomp, chomp)
0
 
LVL 5

Expert Comment

by:gator4life
ID: 8109563
Actually, before you run the code again, also do this:

Change this:

'Instantiate the Microsoft XMLDOM.
Set objDom = server.CreateObject("Microsoft.XMLDOM")
objDom.preserveWhiteSpace = True


'Call the Load Method of the XMLDOM Object. The Load Method has a
'boolean return value indicating whether or not the file could be
'loaded. If the file exists and loads it will return true, otherwise,
'it will return false.

blnFileExists = objDom.Load(strFileName)

to this:

'Instantiate the Microsoft XMLDOM.
Set objDom = Server.CreateObject("Microsoft.XMLDOM")
objDom.preserveWhiteSpace = True

If (Err.Number <> 0) Exit Function

'Call the Load Method of the XMLDOM Object. The Load Method has a
'boolean return value indicating whether or not the file could be
'loaded. If the file exists and loads it will return true, otherwise,
'it will return false.

blnFileExists = objDom.Load(strFileName)

If (Err.Number <> 0) Exit Function

These statements will force the function to end prematurely immediately after an error occurs so that we have the best chance of trapping the correct error outside of the function.

gator4life
(chomp, chomp)
0
 
LVL 5

Expert Comment

by:gator4life
ID: 8109575
Sorry...the statements should say

     If (Err.Number <> 0) Then Exit Function

Been programming in JavaScript too much lately! ;-)

gator4life
(chomp, chomp)
0
 

Author Comment

by:joe851
ID: 8109683
-2147467259 : 006~ASP 0171~Missing Path~The Path parameter must be specified for the MapPath method.

Above is the error message.
0
 

Author Comment

by:joe851
ID: 8109749
-2147467259 : 006~ASP 0171~Missing Path~The Path parameter must be specified for the MapPath method.

I received this same message after I did what you asked me to in the three threads.
0
 

Author Comment

by:joe851
ID: 8109761
Hi Gator, I want to tell you that, the existing drop down menu works ok. When I save it it displays this message:

Your form submission has been saved.
Saved in: C:\.....\DEFAULT\left.xml

Thanks Gator. I really appreciate your efforts.
0
 

Author Comment

by:joe851
ID: 8109916
The whole source code:

<html>
<link href="style.css" type="text/css" rel="stylesheet">
<script language="javascript" src="allscripts.js">
</script>
<head>
<script type="text/javascript">
function openwindow()
{
window.open("tables_pictures.html","my_new_window","width=150,height=150,top=325,left=585")
}
</script>
</head>
<body bgcolor="#cccccc">

<BR><BR>
<table border="0" width="750" cellpadding="0" cellspacing="0" bgcolor="#999999">
<TR><TD>:::<B> SELECTION OF STYLESHEETS</B>::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
<BR><BR></TD></TR></table>

<table border="0" width="750" cellpadding="0" cellspacing="0" bgcolor="#999999">
<tr><form name="previewform">

<td width="250" valign="top" align="middle">
<BR>
<div align="center"><b> Annotated Source Preview </b></div>
<textarea name="previewpart" cols="40" rows="20" class="formytextarea">Click on The XML Drop downlist for a annotated source preview of the file.</textarea>
</form>
<BR>


<table border='0' width='220' height='180' cellpadding="0" cellspacing="0" class="bordertable">
<tr><td bgcolor='#F4F4F4'valign="middle" align="center">
<div align="center"><b> XSL Stylesheet Preview </b></div>
<font size=1 face='Verdana' color='#000000'><center><img name="thumbnail" src="/MyProj/Previewthumbnails/normalstylewopics.jpg" border="1" ></center>
</td></tr></table>

<!--GATOR THIS IS MY ADDITION INTO THE PROJECT-->



<form name="selection4" action="savexml.asp" method="post"><BR>
<input type="hidden" name="xmlfileid" value=""/>              

<table border='0' width='220' height='180' cellpadding="0" cellspacing="0" class="bordertable">
<tr><td bgcolor='#F4F4F4' align="center">
<b> XSL Colour Chart For Left.XML </b><br/><br/>
<table border="5" cellpadding="0" cellspacing="1" >
<tr>
<td><input type="image" src="colourlibrary/mintcream.gif" onMouseOver="this.form.xmlfileid.value='/MyProj/DEFAULT/left.xsl'"/></td>                   <!-- R1 C1 -->
<td><input type="image" src="colourlibrary/bisque.gif" onMouseOver="this.form.xmlfileid.value='/MyProj/DEFAULT/more/bisque.xsl'"/></td>                             <!-- R1 C2 -->
<td><input type="image" src="colourlibrary/mistyrose.gif" onMouseOver="this.form.xmlfileid.value='/MyProj/DEFAULT/more/mistyrose.xsl'"/></td>                    <!-- R1 C3 -->
<td><input type="image" src="colourlibrary/paleturquoise.gif" onMouseOver="this.form.xmlfileid.value='/MyProj/DEFAULT/more/paleturquoise.xsl'"/></td>      <!-- R1 C4 -->
<td><input type="image" src="colourlibrary/palegreen.gif" onMouseOver="this.form.xmlfileid.value='/MyProj/DEFAULT/more/palegreen.xsl'"/></td>                    <!-- R1 C5 -->
<td><input type="image" src="colourlibrary/papayawhip.gif" onMouseOver="this.form.xmlfileid.value='/MyProj/DEFAULT/more/papayawhip.xsl'"/></td>                   <!-- R1 C6 -->
</tr>

<tr>
<td><input type="image" src="colourlibrary/seashell.gif" onMouseOver="this.form.xmlfileid.value='/MyProj/DEFAULT/more/seashell.xsl'"/></td>                      <!-- R2 C1 -->
<td><input type="image" src="colourlibrary/palegoldenrod.gif" onMouseOver="this.form.xmlfileid.value='/MyProj/DEFAULT/more/palegoldenrod.xsl'"/></td>      <!-- R2 C2 -->
<td><input type="image" src="colourlibrary/lavender.gif" onMouseOver="this.form.xmlfileid.value='/MyProj/DEFAULT/more/lavender.xsl'"/></td>                         <!-- R2 C3 -->
<td><input type="image" src="colourlibrary/powderblue.gif" onMouseOver="this.form.xmlfileid.value='/MyProj/DEFAULT/more/powderblue.xsl'"/></td>                  <!-- R2 C4 -->
<td><input type="image" src="colourlibrary/springgreen.gif" onMouseOver="this.form.xmlfileid.value='/MyProj/DEFAULT/more/springgreen.xsl'"/></td>            <!-- R2 C5 -->
<td><input type="image" src="colourlibrary/lightpink.gif" onMouseOver="this.form.xmlfileid.value='/MyProj/DEFAULT/more/lightpink.xsl'"/></td>                  <!-- R2 C6 -->
</tr>

<tr>
<td><input type="image" src="colourlibrary/oldlace.gif" onMouseOver="this.form.xmlfileid.value='/MyProj/DEFAULT/more/olodlace.xsl'"/></td>                        <!-- R3 C1 -->
<td><input type="image" src="colourlibrary/peachpuff.gif" onMouseOver="this.form.xmlfileid.value='/MyProj/DEFAULT/more/peachpuff.xsl'"/></td>                  <!-- R3 C2 -->
<td><input type="image" src="colourlibrary/thistle.gif" onMouseOver="this.form.xmlfileid.value='/MyProj/DEFAULT/more/thistle.xsl'"/></td>                        <!-- R3 C3 -->
<td><input type="image" src="colourlibrary/turquoise.gif" onMouseOver="this.form.xmlfileid.value='/MyProj/DEFAULT/more/turquoise.xsl'"/></td>                  <!-- R3 C4 -->
<td><input type="image" src="colourlibrary/greenyellow.gif" onMouseOver="this.form.xmlfileid.value='/MyProj/DEFAULT/more/greenyellow.xsl'"/></td>            <!-- R3 C5 -->
<td><input type="image" src="colourlibrary/mediumaquamarine.gif" onMouseOver="this.form.xmlfileid.value='/MyProj/DEFAULT/more/mediumaquamarine.xsl'"/></td><!-- R3 C6 -->
</tr>
<tr>
<td><input type="image" src="colourlibrary/cornsilk.gif" onMouseOver="this.form.xmlfileid.value='/MyProj/DEFAULT/more/cornsilk.xsl'"/></td>                        <!-- R4 C1 -->
<td><input type="image" src="colourlibrary/sandybrown.gif" onMouseOver="this.form.xmlfileid.value='/MyProj/DEFAULT/more/sandybrown.xsl'"/></td>                  <!-- R4 C2 -->
<td><input type="image" src="colourlibrary/violet.gif" onMouseOver="this.form.xmlfileid.value='/MyProj/DEFAULT/more/violet.xsl'"/></td>                              <!-- R4 C3 -->
<td><input type="image" src="colourlibrary/lightskyblue.gif" onMouseOver="this.form.xmlfileid.value='/MyProj/DEFAULT/more/lightskyblue.xsl'"/></td>            <!-- R4 C4 -->
<td><input type="image" src="colourlibrary/yellowgreen.gif" onMouseOver="this.form.xmlfileid.value='/MyProj/DEFAULT/more/yellowgreen.xsl'"/></td>            <!-- R4 C5 -->
<td><input type="image" src="colourlibrary/mediumpurple.gif" onMouseOver="this.form.xmlfileid.value='/MyProj/DEFAULT/more/mediumpurple.xsl'"/></td>            <!-- R4 C6 -->
</tr>

<tr>
<td><input type="image" src="colourlibrary/beige.gif" onMouseOver="this.form.xmlfileid.value='/MyProj/DEFAULT/more/beige.xsl'"/></td>                              <!-- R5 C1 -->
<td><input type="image" src="colourlibrary/salmon.gif" onMouseOver="this.form.xmlfileid.value='/MyProj/DEFAULT/more/salmon.xsl'"/></td>                              <!-- R5 C2 -->
<td><input type="image" src="colourlibrary/plum.gif" onMouseOver="this.form.xmlfileid.value='/MyProj/DEFAULT/more/plum.xsl'"/></td>                              <!-- R5 C3 -->
<td><input type="image" src="colourlibrary/aqua.gif" onMouseOver="this.form.xmlfileid.value='/MyProj/DEFAULT/more/aqua.xsl'"/></td>                              <!-- R5 C4 -->
<td><input type="image" src="colourlibrary/mediumturquoise.gif" onMouseOver="this.form.xmlfileid.value='/MyProj/DEFAULT/more/mediumturquoise.xsl'"/></td>      <!-- R5 C5 -->
<td><input type="image" src="colourlibrary/slateblue.gif" onMouseOver="this.form.xmlfileid.value='/MyProj/DEFAULT/more/slateblue.xsl'"/></td>                  <!-- R5 C6 -->
</tr>

<tr>
<td><input type="image" src="colourlibrary/wheat.gif" onMouseOver="this.form.xmlfileid.value='/MyProj/DEFAULT/more/wheat.xsl'"/></td>                              <!-- R6 C1 -->
<td><input type="image" src="colourlibrary/rosybrown.gif" onMouseOver="this.form.xmlfileid.value='/MyProj/DEFAULT/more/rosybrown.xsl'"/></td>                  <!-- R6 C2 -->
<td><input type="image" src="colourlibrary/orchid.gif" onMouseOver="this.form.xmlfileid.value='/MyProj/DEFAULT/more/orchid.xsl'"/></td>                              <!-- R6 C3 -->
<td><input type="image" src="colourlibrary/lightsteelblue.gif" onMouseOver="this.form.xmlfileid.value='/MyProj/DEFAULT/more/lightdteelblue.xsl'"/></td>      <!-- R6 C4 -->
<td><input type="image" src="colourlibrary/cadetblue.gif" onMouseOver="this.form.xmlfileid.value='/MyProj/DEFAULT/more/cadetblue.xsl'"/></td>                  <!-- R6 C5 -->
<td><input type="image" src="colourlibrary/palevioletred.gif" onMouseOver="this.form.xmlfileid.value='/MyProj/DEFAULT/more/palevioletred.xsl'"/></td>      <!-- R6 C6 -->
</tr>
</table>
<br/>
<a href="javascript:transformxmloutput_1();"><img src="previewbutton.gif" alt="Preview XML with selected Stylesheet" border="0" /></a><BR>  
</td>
</tr>
</table>
</form>                                                                               
                               
<!--Colour Table Edit end-->

</td>

<td width="*" valign="top" align="middle">

<font size=1 face="Verdana" color="#666666">
<BR>

<table border=0 width="480" height="40" bgcolor="#F4F4F4" cellspacing="0" cellpadding="0"><tr><td>
<div align="left"><B>.::Instructions::.</B></div>

<div align="left">+ In this staff interface, you are to assign xml file(s) to your preferred xsl file(stylesheet).</div>
<div align="left">+ Click on the items in the <B>XML</B> drop down list/ the preview icon (<img src="previewiconimage.gif" border="0">)to see an annotated source preview(right top) of the xml file.</div>
<div align="left">+ Click on the items in the <B>XSL</B> drop down list to see a thumbnail preview(right middle bottom) of the stylesheet.</div>
<div align="left">+ Click on the <B>Preview XML</B> button to see full real preview the stylesheet you've assign the xml file to without saving.</div>
<div align="left">+ Click on the <B>Save Settings</B> button to save the changes to the selected XML file.</div>
</td></tr></table>

<BR>
<table border=0 width="480" height="40" bgcolor="#F4F4F4" cellspacing="0" cellpadding="0">
<tr><td><B>.::CONTENT XML data::.<B></td></tr>
<tr>
<td width="*">
<table border="0" width="100%">

<tr><td>

<form name="selection"  method="post" action="savexml.asp"><div align="left"><font size=1 face="Verdana" color="#000000">XML file</font></div>
<div align="left">

<%


    Private Function getFilesByType(strFolder, strType)
          'getFilesByType
          '            returns an Array of files for a specific type in a folder
          '            if no files where found returns null
          Dim objFSO, objFolder, fileItem, fileCollection, arrFiles, i
          Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
          Set objFolder = objFSO.GetFolder(strFolder)
          Set fileCollection = objFolder.Files
response.write("<select name=""xmlfileid"" onclick=""showpreview_brief(selection.xmlfileid.value)"">")

          i = 0
          For Each fileItem in fileCollection
                If (lCase(Right(fileItem.name, len(fileItem.name) - InStr(fileItem.name, "."))) = lCase(strType)) Then
                      If (i <> 0) Then
                            arrFiles = arrFiles & ";"
                      End If
                      i = i + 1
                  response.write("<option value=""xmldata/" &fileItem.name &""">" &fileItem.name)




                      'arrFiles = arrFiles & fileItem.name

                End If
          Next
          Set objFSO = Nothing
          Set objFolder = Nothing
          Set fileCollection = Nothing
          If (isNull(arrFiles) Or arrFiles = "") Then
                getFilesByType = Null
          Else
                getFilesByType = Split(arrFiles, ";")
          End If
response.write("</select>")

    End Function


      getFilesByType server.mappath("/MyProj/xmldata"), "xml"

%>

</div>
</td><td><div align="left"><font size=1 face="Verdana" color="#000000">XSL Stylesheet</font></div>
<div align="left"><select name="xslfileid" onclick="previewxmlthumbnails(selection.xslfileid.value)">
      <option value="/MyProj/xmldata/xsl/aflooding.xsl">Normal Style(No Pics)
      <option value="/MyProj/xmldata/xsl/afloodingtmp2.xsl">Normal Style 2
      <option value="/MyProj/xmldata/xsl/afloodingtmp3.xsl">Special Style
      <option value="/MyProj/xmldata/xsl/plaintext.xsl">Plain Text Only
</select></div>
</td><td width="80"><div align="left">
<input type="image" src="savesettingsbutton.gif" id="btnSubmit" name="btnSubmit" value="Save Settings" /></div>
</td></form>
<td width="80"><div align="left"><input type="image" src="previewbutton.gif" name="button" value="Preview XML with selected Stylesheet" onClick="transformxml()"></div>
</td>
</tr>
</table>




</td></tr>
</table>


<table border=0 width="480" height="40" bgcolor="#F4F4F4" cellspacing="0" cellpadding="0">
<tr><td><B>.::CONTENT XML data(flash)::.<B></td></tr>
<tr>
<td width="*">
<table border="0" width="100%">

<tr>
<form name="selection2"  method="post" action="savexml.asp"><td>

<div align="left"><font size=1 face="Verdana" color="#000000">XML File(w/ flash)</font></div>
<div align="left">

<%


    Private Function getFilesByType_2(strFolder, strType)
          'getFilesByType
          '            returns an Array of files for a specific type in a folder
          '            if no files where found returns null
          Dim objFSO, objFolder, fileItem, fileCollection, arrFiles, i
          Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
          Set objFolder = objFSO.GetFolder(strFolder)
          Set fileCollection = objFolder.Files
response.write("<select name=""xmlfileid"" onclick=""showpreview_brief(selection2.xmlfileid.value)"">")

          i = 0
          For Each fileItem in fileCollection
                If (lCase(Right(fileItem.name, len(fileItem.name) - InStr(fileItem.name, "."))) = lCase(strType)) Then
                      If (i <> 0) Then
                            arrFiles = arrFiles & ";"
                      End If
                      i = i + 1
                  response.write("<option value=""xmldata/flash/" &fileItem.name &""">" &fileItem.name )




                      'arrFiles = arrFiles & fileItem.name

                End If
          Next
          Set objFSO = Nothing
          Set objFolder = Nothing
          Set fileCollection = Nothing
          If (isNull(arrFiles) Or arrFiles = "") Then
                getFilesByType_2 = Null
          Else
                getFilesByType_2 = Split(arrFiles, ";")
          End If
response.write("</select>")

    End Function


      getFilesByType_2 server.mappath("/MyProj/xmldata/flash"), "xml"

%>

<!---------------------------------------------------------------------------------------------------->
</div>
</td>
<td>
<div align="left"><font size=1 face="Verdana" color="#000000">XSL Stylesheet</font></div>
<div align="left">

<select name="xslfileid" onclick="previewxmlthumbnails(selection2.xslfileid.value)">
      <option value="/MyProj/xmldata/xsl/flash1.xsl">Flash only Style 1
      <option value="/MyProj/xmldata/xsl/flash2.xsl">Flash only Plain Style
      <option value="/MyProj/xmldata/xsl/flash3.xsl">Flash only Special Style
      </select>


</div>
<td>

<td width="80">
<div align="left"><input type="image" src="savesettingsbutton.gif" id="btnSubmit" name="btnSubmit" value="Save Settings"></div>
</td></form>
<td width="80">
<div align="left"><input type="image" src="previewbutton.gif" name="button" value="Preview XML with selected Stylesheet" onClick="transformxmlflash()"></div></td>

</tr>
</table>

</td>
</tr>
</table>
<!---------------------------------------------------------------------------------------------------->
<BR><BR>
<table border=0 width="480" height="40" bgcolor="#F4F4F4" cellspacing="0" cellpadding="0">
<tr><td><B>.::Output Pages<B>::.</td></tr>
<tr>
<td width="*">
<table border="0" width="100%">

<tr><td width="100">

<form name="selection4"  method="post" action="savexml.asp">
<div align="left"><font size=1 face="Verdana" color="#000000">
<B><a href="javascript:showpreview_brief(selection4.xmlfileid.value)"><img src="previewiconimage.gif" border="0" alt="source preview"></a>
<input type="hidden" name="xmlfileid" value="/MyProj/DEFAULT/left.xml"> Left.XML </B>
</div>
</td><td><div align="left"><font size=1 face="Verdana" color="#000000">XSL Stylesheet</font></div>
<div align="left"><font size=1 face="Verdana" color="#000000">
<select name="xslfileid">
<!-- GATOR THIS IS THE PATH I WANT TO CONVERT INTO A 6 BY 6 BOX WITH MORE COLOR OPTIONS-->
<option value="/MyProj/DEFAULT/left.xsl">Default Style
<option value="/MyProj/DEFAULT/darkgray.xsl">DarkGray Style
<option value="/MyProj/DEFAULT/orangegold.xsl">DarkOrange Style
<option value="/MyProj/DEFAULT/violet.xsl">Violet Style
</select>
</div>
</td>
<td width="80"><div align="left">
</td>
<td width="80"><div align="left">
<input type="image" src="savesettingsbutton.gif" id="btnSubmit" name="btnSubmit" value="Save Settings" /></div>
</td></form>
<td width="80"><div align="left"><input type="image" src="previewbutton.gif" name="button" value="Preview XML with selected Stylesheet" onClick="transformxmloutput_1()"></div>
</td>
</tr>
</table>



</td></tr>
</table>

<!---------------------------------------------------------------------------------------------------->

<table border=0 width="480" height="40" bgcolor="#F4F4F4" cellspacing="0" cellpadding="0">
<tr>
<td width="*">
<table border="0" width="100%">

<tr><td width="100">

<form name="selection5"  method="post" action="savexml.asp">
<div align="left"><font size=1 face="Verdana" color="#000000">
<B><a href="javascript:showpreview_brief(selection5.xmlfileid.value)"><img src="previewiconimage.gif" border="0" alt="source preview"></a>
<input type="hidden" name="xmlfileid" value="/MyProj/DEFAULT/home.xml"> home.XML </B>


</div>
</td><td><div align="left"><font size=1 face="Verdana" color="#000000">XSL Stylesheet</font></div>
<div align="left"><font size=1 face="Verdana" color="#000000">
<select name="xslfileid">

<option value="/MyProj/DEFAULT/home.xsl">3 Frames Vertical
<option value="/MyProj/DEFAULT/home2.xsl">3 Frames Horizontal
<option value="/MyProj/DEFAULT/home3.xsl">2 Frames Vertical
</div>
</td><td width="80"><div align="left">
<input type="image" src="savesettingsbutton.gif" id="btnSubmit" name="btnSubmit" value="Save Settings" /></div>
</td></form>
<td width="80"><div align="left"><input type="image" src="previewbutton.gif" name="button" value="Preview XML with selected Stylesheet" onClick="transformxmloutput_2()"></div>
</td>
</tr>
</table>



</td></tr>
</table>
<!---------------------------------------------------------------------------------------------------->

<table border=0 width="480" height="40" bgcolor="#F4F4F4" cellspacing="0" cellpadding="0">
<tr>
<td width="*">
<table border="0" width="100%">

<tr><td width="100">

<form name="selection6"  method="post" action="savexml.asp">
<div align="left"><font size=1 face="Verdana" color="#000000">
<B><a href="javascript:showpreview_brief(selection6.xmlfileid.value)"><img src="previewiconimage.gif" border="0" alt="source preview"></a>
<input type="hidden" name="xmlfileid" value="/MyProj/DEFAULT/center.xml"> Center.XML </B>


</div>
</td><td align="left"><div align="left"><font size=1 face="Verdana" color="#000000">XSL Stylesheet</font></div>
<div align="left"><font size=1 face="Verdana" color="#000000">
<select name="xslfileid">

<option value="/MyProj/DEFAULT/center.xsl">Default
<option value="/MyProj/DEFAULT/cstyle2.xsl">Style2
<option value="/MyProj/DEFAULT/cstyle3.xsl">OrangeGold
</div>
</td><td width="80"><div align="left">
<input type="image" src="savesettingsbutton.gif" id="btnSubmit" name="btnSubmit" value="Save Settings" /></div>
</td></form>
<td width="80"><div align="left"><input type="image" src="previewbutton.gif" name="button" value="Preview XML with selected Stylesheet" onClick="transformxmloutput_3()"></div>
</td>
</tr>
</table>

</td></tr>
</table>
<!---------------------------------------------------------------------------------------------------->

<table border=0 width="480" height="40" bgcolor="#F4F4F4" cellspacing="0" cellpadding="0">
<tr>
<td width="*">
<table border="0" width="100%">

<tr><td width="100">

<form name="selection7"  method="post" action="savexml.asp">
<div align="left"><font size=1 face="Verdana" color="#000000">
<B><a href="javascript:showpreview_brief(selection7.xmlfileid.value)"><img src="previewiconimage.gif" border="0" alt="source preview"></a>
<input type="hidden" name="xmlfileid" value="/MyProj/DEFAULT/right.xml"> right.XML </B>


</div>
</td><td align="left"><div align="left"><font size=1 face="Verdana" color="#000000">XSL Stylesheet</font></div>
<div align="left"><font size=1 face="Verdana" color="#000000">
<select name="xslfileid">

<option value="/MyProj/DEFAULT/right.xsl">Default
<option value="/MyProj/DEFAULT/rstyle2.xsl">Style2
<option value="/MyProj/DEFAULT/rstyle3.xsl">Orange Gold
</div>
<td>for 3 frame only</td>
</td><td width="80"><div align="left">
<input type="image" src="savesettingsbutton.gif" id="btnSubmit" name="btnSubmit" value="Save Settings" /></div>
</td></form>
<td width="80"><div align="left"><input type="image" src="previewbutton.gif" name="button" value="Preview XML with selected Stylesheet" onClick="transformxmloutput_4()"></div>
</td>
</tr>
</table>

</td></tr>
</table>
<!---------------------------------------------------------------------------------------------------->
<BR>
<BR>
<table border=0 width="480" height="40" bgcolor="#F4F4F4" cellspacing="0" cellpadding="0"><tr><td>
<div align="center"><B>To view Overall output after changes are made, please click on the button:</B></div>
<div align="center"><input type="image" src="voutputbutton.gif" name="button" value="View Output" onClick="window.open('default/home.xml','')"></div>
</td></tr></table>

</td>



</tr>
</table>

<table border="0" width="750" cellpadding="0" cellspacing="0" bgcolor="#999999">
<TR><TD><BR><div align="right"></B></div></TD></TR></table>




</center>
</body>



</html>
0
 

Author Comment

by:joe851
ID: 8109920
Do advice if there are other enhancement features I could do with. Thanks!
0
 

Author Comment

by:joe851
ID: 8117215
Hi Gator. Please Help me. I'm in great need of help. Thanks a lot.
0
 
LVL 5

Expert Comment

by:gator4life
ID: 8117238
I will start going through the code you posted, but it will take me a little while.  What kind of a deadline are you looking at?

gator4life
(chomp, chomp)
0
 

Author Comment

by:joe851
ID: 8117360
I should have got this link up one week ago. I hope to at least produce it by Monday.

If I could get it before that, that would be cool.

Thanks Gator. Thanks is an understatement.

0
 
LVL 5

Expert Comment

by:gator4life
ID: 8117411
I really have to ask you this...  What in the heck are you using to code this?  I can definitely tell you're using an IDE, because the code is some of the worst-formed code I have ever seen.  In fact, have you coded any of this yourself, or is the IDE just plopping in the code for you?  One thing is for sure, this stuff is not pretty at all to look at or to edit.  This is going to take me longer than I thought...

gator4life
(chomp, chomp)
0
 

Author Comment

by:joe851
ID: 8117811
No Gator, I have not coded any of this except the one I spoke about. I am not even a programmer. This project was done using XML, ASP, DOM, CSS, HTML...

May I ask what is an IDE?

I'm really sorry about this. Thanks for your help anyway.
0
 
LVL 5

Expert Comment

by:gator4life
ID: 8118133
joe -

Thanks for being honest.  I will try my best to get this set up for you.  Being that I thought you were a developer, I threw out the term IDE.  It stands for Integrated Development Environment, the "highly" technical term for a visual coding environment like Frontpage, Dreamweaver, or Visual Studio.  IDEs write a lot of the code for you behind the scenes while you drag and drop stuff around the screen and use menu options to change the look of a website.  Hard core developers tend to shun these tools since they do not create the best-looking code to have to edit.  Talk to you soon.

gator4life
(chomp, chomp)
0
 

Author Comment

by:joe851
ID: 8119800
Thanks Gator, I get a better understanding of the term IDE. Will wait!
0
 

Author Comment

by:joe851
ID: 8140989
Hello Gator, how's it going? Sorry to bother you. Thanks.
0
 

Author Comment

by:joe851
ID: 8156239
Hi Gator, sorry to bother you, but how's it going?
0
 
LVL 5

Expert Comment

by:gator4life
ID: 8156393
Hey joe. Sorry, man, things have been busy around my parts.  I am getting married soon, and the plans are in full swing, taking much of my time.  I am working on your code right now.  Hopefully, I will have something posted in a few hours or so.  Thanks for your patience.

gator4life
(chomp, chomp)
0
 

Author Comment

by:joe851
ID: 8156714
No problem. Sorry for the trouble. Congragulations on your getting married! Thanks a lot for your help despite your hectic schedule. I really appreciate it...
0
 
LVL 5

Expert Comment

by:gator4life
ID: 8164857
joe -

Give this a shot! ;-)

<%
      Option Explicit

      Sub CreateSelect(sFolder, iId)

            Dim sMapPath : sMapPath = Server.MapPath(sFolder)

            Dim oFSO
            Set oFSO = Server.CreateObject("Scripting.FileSystemObject")

            Dim oFolder
            Set oFolder = oFSO.GetFolder(sMapPath)

            Dim aFiles
            Set aFiles = oFolder.Files

            Response.Write "<select id=""xmlfileid" & iId & """ name=""xmlfileid"" size=""1"" onclick=""showpreview_brief(this.options[this.selectedIndex].value)"">"

            Dim bFirstOption : bFirstOption = True

            Dim oFile
            For Each oFile In aFiles
                  If (LCase(Right(oFile.Name, Len(oFile.Name) - InStr(oFile.Name, "."))) = "xml") Then
                        If (bFirstOption = True)
                              Response.Write "<option value=""" & sFolder & "/" & oFile.Name & """ selected=""selected"">" & oFile.Name & "</option>"
                        Else
                              Response.Write "<option value=""" & sFolder & "/" & oFile.Name & """>" & oFile.Name & "</option>"
                        End If
                  End If
            Next

            Response.Write "</select>"

            Set aFiles = Nothing
            Set oFolder = Nothing
            Set oFSO = Nothing

      End Sub
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
      <head>
            <title>SELECTION OF STYLESHEETS</title>
            <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
            <link type="text/css" rel="stylesheet" href="style.css" />
            <script type="text/javascript" src="allscripts.js"></script>
            <script type="text/javascript">
            <![CDATA[
            <!--
                  function OpenWindow() {

                        var oNewWindow = window.open('tables_pictures.html', 'my_new_window', 'width=150,height=150,top=325,left=585');
                        oNewWindow.focus();
                  }
            //-->
            ]]>
            </script>
      </head>
      <body style="background-color: #CCC; margin: 5px">
            <table style="background-color: #999; border: 0px;" cellpadding="5" cellspacing="0">
                  <tr>
                        <td style="font-weight: bold" colspan="2">
                              ::: SELECTION OF STYLESHEETS ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::<br />
                              <br />
                              <br />
                        </td>
                  </tr>
                  <tr valign="top">
                        <td style="text-align: center; font-weight: bold">
                              Annotated Source Preview
                              <form id="previewform" name="previewform" action="" style="margin: 0px;">
                                    <textarea class="formytextarea" id="previewpart" name="previewpart" cols="40" rows="20">Click on the XML dropdown list for an annotated source preview of the file.</textarea>
                              </form>
                              <br />
                              <form style="margin: 0px;" id="selectionR" name="selectionR" action="savexml.asp" method="post">
                                    <input type="hidden" id="xmlfileid1" name="xmlfileid" />
                                    <table class="bordertable" style="background-color: #F4F4F4; border: 0px" cellpadding="5" cellspacing="0" width="220">
                                          <tr>
                                                <td style="text-align: center; font-weight: bold">
                                                      XSL Stylesheet Preview<br />
                                                      <img id="thumbnail" name="thumbnail" src="/MyProj/Previewthumbnails/normalstylewopics.jpg" border="1" alt="XSL Stylesheet Preview" align="middle" />
                                                </td>
                                          </tr>
                                          <tr>
                                                <td style="background-color: #999; padding: 0px">
                                                      <br />
                                                </td>
                                          </tr>
                                          <tr>
                                                <td style="text-align: center; font-weight: bold">
                                                      XSL Colour Chart For Left.XML<br />
                                                      <br />
                                                      <table cellpadding="0" cellspacing="1" border="5">
                                                            <tr>
                                                                  <td><input type="image" src="colourlibrary/mintcream.gif" onmouseover="this.form.xmlfileid.value = '/MyProj/DEFAULT/left.xsl'" /></td>
                                                                  <td><input type="image" src="colourlibrary/bisque.gif" onmouseover="this.form.xmlfileid.value = '/MyProj/DEFAULT/more/bisque.xsl'" /></td>
                                                                  <td><input type="image" src="colourlibrary/mistyrose.gif" onmouseover="this.form.xmlfileid.value = '/MyProj/DEFAULT/more/mistyrose.xsl'" /></td>
                                                                  <td><input type="image" src="colourlibrary/paleturquoise.gif" onmouseover="this.form.xmlfileid.value = '/MyProj/DEFAULT/more/paleturquoise.xsl'" /></td>
                                                                  <td><input type="image" src="colourlibrary/palegreen.gif" onmouseover="this.form.xmlfileid.value = '/MyProj/DEFAULT/more/palegreen.xsl'" /></td>
                                                                  <td><input type="image" src="colourlibrary/papayawhip.gif" onmouseover="this.form.xmlfileid.value = '/MyProj/DEFAULT/more/papayawhip.xsl'" /></td>
                                                            </tr>
                                                            <tr>
                                                                  <td><input type="image" src="colourlibrary/seashell.gif" onmouseover="this.form.xmlfileid.value = '/MyProj/DEFAULT/more/seashell.xsl'" /></td>
                                                                  <td><input type="image" src="colourlibrary/palegoldenrod.gif" onmouseover="this.form.xmlfileid.value = '/MyProj/DEFAULT/more/palegoldenrod.xsl'" /></td>
                                                                  <td><input type="image" src="colourlibrary/lavender.gif" onmouseover="this.form.xmlfileid.value = '/MyProj/DEFAULT/more/lavender.xsl'" /></td>
                                                                  <td><input type="image" src="colourlibrary/powderblue.gif" onmouseover="this.form.xmlfileid.value = '/MyProj/DEFAULT/more/powderblue.xsl'" /></td>
                                                                  <td><input type="image" src="colourlibrary/springgreen.gif" onmouseover="this.form.xmlfileid.value = '/MyProj/DEFAULT/more/springgreen.xsl'" /></td>
                                                                  <td><input type="image" src="colourlibrary/lightpink.gif" onmouseover="this.form.xmlfileid.value = '/MyProj/DEFAULT/more/lightpink.xsl'" /></td>
                                                            </tr>
                                                            <tr>
                                                                  <td><input type="image" src="colourlibrary/oldlace.gif" onmouseover="this.form.xmlfileid.value = '/MyProj/DEFAULT/more/olodlace.xsl'" /></td>
                                                                  <td><input type="image" src="colourlibrary/peachpuff.gif" onmouseover="this.form.xmlfileid.value = '/MyProj/DEFAULT/more/peachpuff.xsl'" /></td>
                                                                  <td><input type="image" src="colourlibrary/thistle.gif" onmouseover="this.form.xmlfileid.value = '/MyProj/DEFAULT/more/thistle.xsl'" /></td>
                                                                  <td><input type="image" src="colourlibrary/turquoise.gif" onmouseover="this.form.xmlfileid.value = '/MyProj/DEFAULT/more/turquoise.xsl'" /></td>
                                                                  <td><input type="image" src="colourlibrary/greenyellow.gif" onmouseover="this.form.xmlfileid.value = '/MyProj/DEFAULT/more/greenyellow.xsl'" /></td>
                                                                  <td><input type="image" src="colourlibrary/mediumaquamarine.gif" onmouseover="this.form.xmlfileid.value = '/MyProj/DEFAULT/more/mediumaquamarine.xsl'" /></td>
                                                            </tr>
                                                            <tr>
                                                                  <td><input type="image" src="colourlibrary/cornsilk.gif" onmouseover="this.form.xmlfileid.value = '/MyProj/DEFAULT/more/cornsilk.xsl'" /></td>
                                                                  <td><input type="image" src="colourlibrary/sandybrown.gif" onmouseover="this.form.xmlfileid.value = '/MyProj/DEFAULT/more/sandybrown.xsl'" /></td>
                                                                  <td><input type="image" src="colourlibrary/violet.gif" onmouseover="this.form.xmlfileid.value = '/MyProj/DEFAULT/more/violet.xsl'" /></td>
                                                                  <td><input type="image" src="colourlibrary/lightskyblue.gif" onmouseover="this.form.xmlfileid.value = '/MyProj/DEFAULT/more/lightskyblue.xsl'" /></td>
                                                                  <td><input type="image" src="colourlibrary/yellowgreen.gif" onmouseover="this.form.xmlfileid.value = '/MyProj/DEFAULT/more/yellowgreen.xsl'" /></td>
                                                                  <td><input type="image" src="colourlibrary/mediumpurple.gif" onmouseover="this.form.xmlfileid.value = '/MyProj/DEFAULT/more/mediumpurple.xsl'" /></td>
                                                            </tr>
                                                            <tr>
                                                                  <td><input type="image" src="colourlibrary/beige.gif" onmouseover="this.form.xmlfileid.value = '/MyProj/DEFAULT/more/beige.xsl'" /></td>
                                                                  <td><input type="image" src="colourlibrary/salmon.gif" onmouseover="this.form.xmlfileid.value = '/MyProj/DEFAULT/more/salmon.xsl'" /></td>
                                                                  <td><input type="image" src="colourlibrary/plum.gif" onmouseover="this.form.xmlfileid.value = '/MyProj/DEFAULT/more/plum.xsl'" /></td>
                                                                  <td><input type="image" src="colourlibrary/aqua.gif" onmouseover="this.form.xmlfileid.value = '/MyProj/DEFAULT/more/aqua.xsl'" /></td>
                                                                  <td><input type="image" src="colourlibrary/mediumturquoise.gif" onmouseover="this.form.xmlfileid.value = '/MyProj/DEFAULT/more/mediumturquoise.xsl'" /></td>
                                                                  <td><input type="image" src="colourlibrary/slateblue.gif" onmouseover="this.form.xmlfileid.value = '/MyProj/DEFAULT/more/slateblue.xsl'" /></td>
                                                            </tr>
                                                            <tr>
                                                                  <td><input type="image" src="colourlibrary/wheat.gif" onmouseover="this.form.xmlfileid.value = '/MyProj/DEFAULT/more/wheat.xsl'" /></td>
                                                                  <td><input type="image" src="colourlibrary/rosybrown.gif" onmouseover="this.form.xmlfileid.value = '/MyProj/DEFAULT/more/rosybrown.xsl'" /></td>
                                                                  <td><input type="image" src="colourlibrary/orchid.gif" onmouseover="this.form.xmlfileid.value = '/MyProj/DEFAULT/more/orchid.xsl'" /></td>
                                                                  <td><input type="image" src="colourlibrary/lightsteelblue.gif" onmouseover="this.form.xmlfileid.value = '/MyProj/DEFAULT/more/lightdteelblue.xsl'" /></td>
                                                                  <td><input type="image" src="colourlibrary/cadetblue.gif" onmouseover="this.form.xmlfileid.value = '/MyProj/DEFAULT/more/cadetblue.xsl'" /></td>
                                                                  <td><input type="image" src="colourlibrary/palevioletred.gif" onmouseover="this.form.xmlfileid.value = '/MyProj/DEFAULT/more/palevioletred.xsl'" /></td>
                                                            </tr>
                                                      </table>
                                                      <br />
                                                      <a href="javascript:transformxmloutput_1()"><img src="previewbutton.gif" border="0" alt="Preview XML with Selected Stylesheet" align="middle" /></a>
                                                </td>
                                          </tr>
                                    </table>
                              </form>
                        </td>
                        <td>
                              <table style="background-color: #F4F4F4; border: 0px" cellspacing="0" cellpadding="5" width="480">
                                    <tr>
                                          <td>
                                                <b>.::Instructions::.</b><br />
                                                + In this staff interface, you are to assign XML file(s) to your preferred XSL file (stylesheet).<br />
                                                + Click on the items in the <b>XML</b> dropdown list/the preview icon (<img src="previewiconimage.gif" alt="preview icon" />) to see an annotated source preview (right top) of the XML file.<br />
                                                + Click on the items in the <b>XSL</b> dropdown list to see a thumbnail preview (right middle bottom) of the stylesheet.<br />
                                                + Click on the <b>Preview XML</b> button to see full real preview of the stylesheet you've applied to the XML file without saving.<br />
                                                + Click on the <b>Save Settings</b> button to save the changes to the selected XML file.
                                          </td>
                                    </tr>
                              </table>
                              <br />
                              <form style="margin: 0px;" id="selection" name="selection" method="post" action="savexml.asp">
                                    <table style="background-color: #F4F4F4; border: 0px" cellspacing="0" cellpadding="5" width="480">
                                          <tr>
                                                <td style="font-weight: bold" colspan="4">
                                                      .::CONTENT XML data::.
                                                </td>
                                          </tr>
                                          <tr>
                                                <td style="font: 8pt Verdana, sans-serif; color: black" width="100" nowrap="nowrap">
                                                      XML File<br />
                                                      <% CreateSelect "/MyProj/xmldata", 2 %>
                                                </td>
                                                <td style="font: 8pt Verdana, sans-serif; color: black" width="100%">
                                                      XSL Stylesheet<br />
                                                      <select id="xslfileid1" name="xslfileid" size="1" onclick="previewxmlthumbnails(this.options[this.selectedIndex].value)">
                                                            <option value="/MyProj/xmldata/xsl/aflooding.xsl" selected="selected">Normal Style(No Pics)</option>
                                                            <option value="/MyProj/xmldata/xsl/afloodingtmp2.xsl">Normal Style 2</option>
                                                            <option value="/MyProj/xmldata/xsl/afloodingtmp3.xsl">Special Style</option>
                                                            <option value="/MyProj/xmldata/xsl/plaintext.xsl">Plain Text Only</option>
                                                      </select>
                                                </td>
                                                <td style="text-align: center" width="80" nowrap="nowrap"><input type="image" src="savesettingsbutton.gif" id="btnSubmit1" name="btnSubmit" value="Save Settings" /></td>
                                                <td style="text-align: center" width="80" nowrap="nowrap"><input type="image" src="previewbutton.gif" id="button1" name="button" value="Preview XML with selected Stylesheet" onclick="transformxml()" /></td>
                                          </tr>
                                    </table>
                              </form>
                              <form style="margin: 0px;" id="selection2" name="selection2" method="post" action="savexml.asp">
                                    <table style="background-color: #F4F4F4; border: 0px" cellspacing="0" cellpadding="5" width="480">
                                          <tr>
                                                <td style="font-weight: bold" colspan="4">
                                                      .::CONTENT XML data (w/ Flash)::.
                                                </td>
                                          </tr>
                                          <tr>
                                                <td style="font: 8pt Verdana, sans-serif; color: black" width="100" nowrap="nowrap">
                                                      XML File (w/ Flash)<br />
                                                      <% CreateSelect "/MyProj/xmldata/flash", 3 %>
                                                </td>
                                                <td style="font: 8pt Verdana, sans-serif; color: black" width="100%">
                                                      XSL Stylesheet<br />
                                                      <select id="xslfileid2" name="xslfileid" size="1" onclick="previewxmlthumbnails(this.options[this.selectedIndex].value)">
                                                            <option value="/MyProj/xmldata/xsl/flash1.xsl" selected="selected">Flash only Style 1</option>
                                                            <option value="/MyProj/xmldata/xsl/flash2.xsl">Flash only Plain Style</option>
                                                            <option value="/MyProj/xmldata/xsl/flash3.xsl">Flash only Special Style</option>
                                                      </select>
                                                </td>
                                                <td style="text-align: center" width="80" nowrap="nowrap"><input type="image" src="savesettingsbutton.gif" id="btnSubmit2" name="btnSubmit" value="Save Settings" /></td>
                                                <td style="text-align: center" width="80" nowrap="nowrap"><input type="image" src="previewbutton.gif" id="button2" name="button" value="Preview XML with selected Stylesheet" onclick="transformxmlflash()" /></td>
                                          </tr>
                                    </table>
                              </form>
                              <br />
                              <br />
                              <form style="margin: 0px;" id="selection4" name="selection4" method="post" action="savexml.asp">
                                    <table style="background-color: #F4F4F4; border: 0px" cellspacing="0" cellpadding="5" width="480">
                                          <tr>
                                                <td style="font-weight: bold" colspan="4">
                                                      .::Output Pages::.
                                                </td>
                                          </tr>
                                          <tr>
                                                <td style="font: bold 8pt Verdana, sans-serif; color: black" width="100" nowrap="nowrap">
                                                      <a href="javascript:showpreview_brief(document.selection4.xmlfileid.value)"><img src="previewiconimage.gif" border="0" alt="source preview" align="middle" /></a>
                                                      <input type="hidden" id="xmlfileid4" name="xmlfileid" value="/MyProj/DEFAULT/left.xml" />
                                                      Left.XML
                                                </td>
                                                <td style="font: 8pt Verdana, sans-serif; color: black" width="100%">
                                                      XSL Stylesheet<br />
                                                      <select id="xslfileid3" name="xslfileid" size="1">
                                                            <option value="/MyProj/DEFAULT/left.xsl" selected="selected">Default Style</option>
                                                            <option value="/MyProj/DEFAULT/darkgray.xsl">DarkGray Style</option>
                                                            <option value="/MyProj/DEFAULT/orangegold.xsl">DarkOrange Style</option>
                                                            <option value="/MyProj/DEFAULT/violet.xsl">Violet Style</option>
                                                      </select>
                                                </td>
                                                <td style="text-align: center" width="80" nowrap="nowrap"><input type="image" src="savesettingsbutton.gif" id="btnSubmit3" name="btnSubmit" value="Save Settings" /></td>
                                                <td style="text-align: center" width="80" nowrap="nowrap"><input type="image" src="previewbutton.gif" id="button3" name="button" value="Preview XML with selected Stylesheet" onclick="transformxmloutput_1()" /></td>
                                          </tr>
                                    </table>
                              </form>
                              <form style="margin: 0px;" id="selection5" name="selection5" method="post" action="savexml.asp">
                                    <table style="background-color: #F4F4F4; border: 0px" cellspacing="0" cellpadding="5" width="480">
                                          <tr>
                                                <td style="font: bold 8pt Verdana, sans-serif; color: black" width="100" nowrap="nowrap">
                                                      <a href="javascript:showpreview_brief(document.selection5.xmlfileid.value)"><img src="previewiconimage.gif" border="0" alt="source preview" align="middle" /></a>
                                                      <input type="hidden" id="xmlfileid5" name="xmlfileid" value="/MyProj/DEFAULT/home.xml" />
                                                      Home.XML
                                                </td>
                                                <td style="font: 8pt Verdana, sans-serif; color: black" width="100%">
                                                      XSL Stylesheet<br />
                                                      <select id="xslfileid4" name="xslfileid" size="1">
                                                            <option value="/MyProj/DEFAULT/home.xsl" selected="selected">3 Frames Vertical</option>
                                                            <option value="/MyProj/DEFAULT/home2.xsl">3 Frames Horizontal</option>
                                                            <option value="/MyProj/DEFAULT/home3.xsl">2 Frames Vertical</option>
                                                      </select>
                                                </td>
                                                <td style="text-align: center" width="80" nowrap="nowrap"><input type="image" src="savesettingsbutton.gif" id="btnSubmit4" name="btnSubmit" value="Save Settings" /></td>
                                                <td style="text-align: center" width="80" nowrap="nowrap"><input type="image" src="previewbutton.gif" id="button4" name="button" value="Preview XML with selected Stylesheet" onclick="transformxmloutput_2()" /></td>
                                          </tr>
                                    </table>
                              </form>
                              <form style="margin: 0px;" id="selection6" name="selection6" method="post" action="savexml.asp">
                                    <table style="background-color: #F4F4F4; border: 0px" cellspacing="0" cellpadding="5" width="480">
                                          <tr>
                                                <td style="font: bold 8pt Verdana, sans-serif; color: black" width="100" nowrap="nowrap">
                                                      <a href="javascript:showpreview_brief(document.selection6.xmlfileid.value)"><img src="previewiconimage.gif" border="0" alt="source preview" align="middle" /></a>
                                                      <input type="hidden" id="xmlfileid6" name="xmlfileid" value="/MyProj/DEFAULT/center.xml" />
                                                      Center.XML
                                                </td>
                                                <td style="font: 8pt Verdana, sans-serif; color: black" width="100%">
                                                      XSL Stylesheet<br />
                                                      <select id="xslfileid5" name="xslfileid" size="1">
                                                            <option value="/MyProj/DEFAULT/center.xsl" selected="selected">Default</option>
                                                            <option value="/MyProj/DEFAULT/cstyle2.xsl">Style2</option>
                                                            <option value="/MyProj/DEFAULT/cstyle3.xsl">OrangeGold</option>
                                                      </select>
                                                </td>
                                                <td style="text-align: center" width="80" nowrap="nowrap"><input type="image" src="savesettingsbutton.gif" id="btnSubmit5" name="btnSubmit" value="Save Settings" /></td>
                                                <td style="text-align: center" width="80" nowrap="nowrap"><input type="image" src="previewbutton.gif" id="button5" name="button" value="Preview XML with selected Stylesheet" onclick="transformxmloutput_3()" /></td>
                                          </tr>
                                    </table>
                              </form>
                              <form style="margin: 0px;" id="selection7" name="selection7" method="post" action="savexml.asp">
                                    <table style="background-color: #F4F4F4; border: 0px" cellspacing="0" cellpadding="5" width="480">
                                          <tr>
                                                <td style="font: bold 8pt Verdana, sans-serif; color: black" width="100" nowrap="nowrap">
                                                      <a href="javascript:showpreview_brief(document.selection7.xmlfileid.value)"><img src="previewiconimage.gif" border="0" alt="source preview" align="middle" /></a>
                                                      <input type="hidden" id="xmlfileid7" name="xmlfileid" value="/MyProj/DEFAULT/right.xml" />
                                                      Right.XML
                                                </td>
                                                <td style="font: 8pt Verdana, sans-serif; color: black" width="100%">
                                                      XSL Stylesheet<br />
                                                      <select id="xslfileid6" name="xslfileid" size="1">
                                                            <option value="/MyProj/DEFAULT/right.xsl" selected="selected">Default</option>
                                                            <option value="/MyProj/DEFAULT/rstyle2.xsl">Style2</option>
                                                            <option value="/MyProj/DEFAULT/rstyle3.xsl">Orange Gold</option>
                                                      </select><br />
                                                      for 3 frame only
                                                </td>
                                                <td style="text-align: center" width="80" nowrap="nowrap"><input type="image" src="savesettingsbutton.gif" id="btnSubmit6" name="btnSubmit" value="Save Settings" /></td>
                                                <td style="text-align: center" width="80" nowrap="nowrap"><input type="image" src="previewbutton.gif" id="button6" name="button" value="Preview XML with selected Stylesheet" onclick="transformxmloutput_4()" /></td>
                                          </tr>
                                    </table>
                              </form>
                              <br />
                              <br />
                              <table style="background-color: #F4F4F4; border: 0px" cellspacing="0" cellpadding="5" width="480">
                                    <tr>
                                          <td style="text-align: center; font-weight: bold">
                                                To view overall output after changes are made, please click on the button:<br />
                                                <input type="image" src="voutputbutton.gif" id="button7" name="button" value="View Output" onclick="window.open('default/home.xml', '')" />
                                          </td>
                                    </tr>
                              </table>
                        </td>
                  </tr>
            </table>
      </body>
</html>

Sorry for taking so long, but you might notice that this document is also perfectly XHTML compatible, so that took a little more time.  Please let me know if you have any problems.  Now that I have this code readily available and since I know it pretty well, things should go a little quicker if there is a problem.  See ya.

gator4life
(chomp, chomp)
0
 

Author Comment

by:joe851
ID: 8171143
Thanks Gator, I'll try the code and see how it goes. Thanks a lot for yor help. I really appreciate it...
0
 

Author Comment

by:joe851
ID: 8171215
Hi Gator,

When I click on the XSL Color chart, this error displays:

----------------------------------------------------------
-2147467259 : 006~ASP 0171~Missing Path~The Path parameter must be specified for the MapPath method.
----------------------------------------------------------

When I click the drop down menu for the left.xml, I get to select a color for example darkgray style. When I click the "Save Settings" button, it prompts me with this message:

-------------------------------------
Your form submission has been saved.
Saved in: C:\Joash\DEFAULT\left.xml
-------------------------------------

I want to be able to do the same for the 6 by 6 color table I created... When I click on it, I want it to prompt the above message.

This project is actually about creating a IDE(new word learnt!) to create a webpage for a user who uses this program. The engine behind it is ASP and XML.

If you want the whole program I can give it to you. If you would like to speak to me, I'm contactable on icq at 110859988.

Thanks a lot Gator!
0
 

Author Comment

by:joe851
ID: 8171224
<![CDATA[
<!--
function OpenWindow() {

var oNewWindow = window.open('tables_pictures.html', 'my_new_window', 'width=150,height=150,top=325,left=585');
oNewWindow.focus();
}
//-->
]]>

Please ignore this line. This was posted by a previous endeavour I made on the project and forgot to take it out...
0
 
LVL 5

Expert Comment

by:gator4life
ID: 8172338
joe -

Two new files posted here for you to use.  Please use these exact files combined the rest of your files.  I have added much more rigorous error trapping and error message retrieval to the files to give me more information.  I have tested this code as much as I can without all of your files, and I can tell you that I know it works the way it should when using test data, so I don't know why you would be getting any errors.  Please let me know what happens.

==========================================================
savexml.asp
==========================================================

<%
      Option Explicit

      On Error Resume Next

      Sub ErrorHandler(sErrorMsg, bShowDetails)

            Response.Write("<b>" & sErrorMsg & "</b><br />")

            If (bShowDetails) Then Response.Write("<b>" & Err.Number & " : " & Err.Description & "</b><br />")

            Response.Write("<br />")
            Response.Write("<input type=""button"" id=""button"" name=""button"" value=""Back"" onclick=""window.location.href = 'selectionofstyle.asp'"" />")
            Response.End

      End Sub

      Sub AddStyleSheetToXml(sXmlFile, sXslFile)

            Dim sXmlFilePath : sXmlFilePath = Server.MapPath(sXmlFile)

            If (Err.Number <> 0) Then Call ErrorHandler("Failed to map a physical path to file """ & sXmlFile & """. Server.MapPath("""") points to """ & Server.MapPath("") & """.", True)

            Dim sXslFilePath : sXslFilePath = Server.MapPath(sXslFile)

            If (Err.Number <> 0) Then Call ErrorHandler("Failed to map a physical path to file """ & sXslFile & """. Server.MapPath("""") points to """ & Server.MapPath("") & """.", True)

            Dim oDOM
            Set oDOM = Server.CreateObject("Microsoft.XMLDOM")

            If (Err.Number <> 0) Then Call ErrorHandler("Failed to create instance of Microsoft.XMLDOM.", True)

            oDOM.async = False
            oDOM.preserveWhiteSpace = True

            Dim bFileExists : bFileExists = oDOM.load(sXmlFilePath)

            If (bFileExists) Then

                  Dim oNode
                  Set oNode = oDOM.firstChild

                  If (IsNull(oNode)) Then Call ErrorHandler("File """ & sXmlFilePath & """ does not contain any nodes to parse.", False)

                  While Not (oNode.nodeName = oDOM.documentElement.nodeName)
                        If (oNode.nodeName = "xml-stylesheet") Then oNode.data = "type=""text/xsl"" href=""" & sXslFile & """"
                        Set oNode = oNode.nextSibling
                  Wend

                  Set oNode = Nothing

            Else
                  Call ErrorHandler("File """ & sXmlFilePath & """ could not be loaded.", False)
            End If

            oDOM.save(sXmlFilePath)

            Set oDOM = Nothing

      End Sub

      Dim sXmlFileSrc : sXmlFileSrc = Request.Form("xmlfileid")
      Dim sXslFileSrc : sXslFileSrc = Request.Form("xslfileid")

      Call AddStyleSheetToXml(sXmlFileSrc, sXslFileSrc)

      Response.Write("<b>Your form submission has been saved.</b><br />")
      Response.Write("<b>Saved in: " & Server.MapPath(sXmlFileSrc) & "</b><br />")
      Response.Write("<br />")
      Response.Write("<input type=""button"" id=""button"" name=""button"" value=""Back"" onclick=""window.location.href = 'selectionofstyle.asp'"" />")
%>

==========================================================
selectionofstyle.asp
==========================================================

<%
      Option Explicit

      On Error Resume Next

      Response.Buffer = True

      Sub ErrorHandler(sErrorMsg)

            Response.Clear
            Response.Write("<b>" & sErrorMsg & "</b><br />")
            Response.Write("<b>" & Err.Number & " : " & Err.Description & "</b>")
            Response.End

      End Sub

      Sub CreateSelect(sFolder, iId)

            Dim sMapPath : sMapPath = Server.MapPath(sFolder)

            If (Err.Number <> 0) Then ErrorHandler("Failed to map a physical path to folder """ & sFolder & """.")

            Dim oFSO
            Set oFSO = Server.CreateObject("Scripting.FileSystemObject")

            If (Err.Number <> 0) Then ErrorHandler("Failed to create instance of Scripting.FileSystemObject.")

            Dim oFolder
            Set oFolder = oFSO.GetFolder(sMapPath)

            If (Err.Number <> 0) Then ErrorHandler("Folder """ & sMapPath & """ does not exist.")

            Dim aFiles
            Set aFiles = oFolder.Files

            If (IsArray(aFiles) And (UBound(aFiles) <> 0)) Then

                  Response.Write("<select id=""xmlfileid" & iId & """ name=""xmlfileid"" size=""1"" onclick=""showpreview_brief(this.options[this.selectedIndex].value)"">")

                  Dim bFirstOption : bFirstOption = True

                  Dim oFile
                  For Each oFile In aFiles
                        If (LCase(Right(oFile.Name, Len(oFile.Name) - InStr(oFile.Name, "."))) = "xml") Then
                              If (bFirstOption)
                                    Response.Write("<option value=""" & sFolder & "/" & oFile.Name & """ selected=""selected"">" & oFile.Name & "</option>")
                              Else
                                    Response.Write("<option value=""" & sFolder & "/" & oFile.Name & """>" & oFile.Name & "</option>")
                              End If
                        End If
                  Next

                  Response.Write("</select>")

            End If

            Set aFiles = Nothing
            Set oFolder = Nothing
            Set oFSO = Nothing

      End Sub
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
      <head>
            <title>SELECTION OF STYLESHEETS</title>
            <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
            <link type="text/css" rel="stylesheet" href="style.css" />
            <script type="text/javascript" src="allscripts.js"></script>
      </head>
      <body style="background-color: #CCC; margin: 5px">
            <table style="background-color: #999; border: 0px;" cellpadding="5" cellspacing="0">
                  <tr>
                        <td style="font-weight: bold" colspan="2">
                              ::: SELECTION OF STYLESHEETS ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::<br />
                              <br />
                              <br />
                        </td>
                  </tr>
                  <tr valign="top">
                        <td style="text-align: center; font-weight: bold">
                              Annotated Source Preview
                              <form id="previewform" name="previewform" action="" style="margin: 0px;">
                                    <textarea class="formytextarea" id="previewpart" name="previewpart" cols="40" rows="20">Click on the XML dropdown list for an annotated source preview of the file.</textarea>
                              </form>
                              <br />
                              <form style="margin: 0px;" id="selectionR" name="selectionR" method="post" action="savexml.asp">
                                    <input type="hidden" id="xmlfileid1" name="xmlfileid" />
                                    <table class="bordertable" style="background-color: #F4F4F4; border: 0px" cellpadding="5" cellspacing="0" width="220">
                                          <tr>
                                                <td style="text-align: center; font-weight: bold">
                                                      XSL Stylesheet Preview<br />
                                                      <img id="thumbnail" name="thumbnail" src="/MyProj/Previewthumbnails/normalstylewopics.jpg" border="1" alt="XSL Stylesheet Preview" align="middle" />
                                                </td>
                                          </tr>
                                          <tr>
                                                <td style="background-color: #999; padding: 0px">
                                                      <br />
                                                </td>
                                          </tr>
                                          <tr>
                                                <td style="text-align: center; font-weight: bold">
                                                      XSL Colour Chart For Left.XML<br />
                                                      <br />
                                                      <table cellpadding="0" cellspacing="1" border="5">
                                                            <tr>
                                                                  <td><input type="image" src="colourlibrary/mintcream.gif" onmouseover="this.form.xmlfileid.value = '/MyProj/DEFAULT/left.xsl'" /></td>
                                                                  <td><input type="image" src="colourlibrary/bisque.gif" onmouseover="this.form.xmlfileid.value = '/MyProj/DEFAULT/more/bisque.xsl'" /></td>
                                                                  <td><input type="image" src="colourlibrary/mistyrose.gif" onmouseover="this.form.xmlfileid.value = '/MyProj/DEFAULT/more/mistyrose.xsl'" /></td>
                                                                  <td><input type="image" src="colourlibrary/paleturquoise.gif" onmouseover="this.form.xmlfileid.value = '/MyProj/DEFAULT/more/paleturquoise.xsl'" /></td>
                                                                  <td><input type="image" src="colourlibrary/palegreen.gif" onmouseover="this.form.xmlfileid.value = '/MyProj/DEFAULT/more/palegreen.xsl'" /></td>
                                                                  <td><input type="image" src="colourlibrary/papayawhip.gif" onmouseover="this.form.xmlfileid.value = '/MyProj/DEFAULT/more/papayawhip.xsl'" /></td>
                                                            </tr>
                                                            <tr>
                                                                  <td><input type="image" src="colourlibrary/seashell.gif" onmouseover="this.form.xmlfileid.value = '/MyProj/DEFAULT/more/seashell.xsl'" /></td>
                                                                  <td><input type="image" src="colourlibrary/palegoldenrod.gif" onmouseover="this.form.xmlfileid.value = '/MyProj/DEFAULT/more/palegoldenrod.xsl'" /></td>
                                                                  <td><input type="image" src="colourlibrary/lavender.gif" onmouseover="this.form.xmlfileid.value = '/MyProj/DEFAULT/more/lavender.xsl'" /></td>
                                                                  <td><input type="image" src="colourlibrary/powderblue.gif" onmouseover="this.form.xmlfileid.value = '/MyProj/DEFAULT/more/powderblue.xsl'" /></td>
                                                                  <td><input type="image" src="colourlibrary/springgreen.gif" onmouseover="this.form.xmlfileid.value = '/MyProj/DEFAULT/more/springgreen.xsl'" /></td>
                                                                  <td><input type="image" src="colourlibrary/lightpink.gif" onmouseover="this.form.xmlfileid.value = '/MyProj/DEFAULT/more/lightpink.xsl'" /></td>
                                                            </tr>
                                                            <tr>
                                                                  <td><input type="image" src="colourlibrary/oldlace.gif" onmouseover="this.form.xmlfileid.value = '/MyProj/DEFAULT/more/olodlace.xsl'" /></td>
                                                                  <td><input type="image" src="colourlibrary/peachpuff.gif" onmouseover="this.form.xmlfileid.value = '/MyProj/DEFAULT/more/peachpuff.xsl'" /></td>
                                                                  <td><input type="image" src="colourlibrary/thistle.gif" onmouseover="this.form.xmlfileid.value = '/MyProj/DEFAULT/more/thistle.xsl'" /></td>
                                                                  <td><input type="image" src="colourlibrary/turquoise.gif" onmouseover="this.form.xmlfileid.value = '/MyProj/DEFAULT/more/turquoise.xsl'" /></td>
                                                                  <td><input type="image" src="colourlibrary/greenyellow.gif" onmouseover="this.form.xmlfileid.value = '/MyProj/DEFAULT/more/greenyellow.xsl'" /></td>
                                                                  <td><input type="image" src="colourlibrary/mediumaquamarine.gif" onmouseover="this.form.xmlfileid.value = '/MyProj/DEFAULT/more/mediumaquamarine.xsl'" /></td>
                                                            </tr>
                                                            <tr>
                                                                  <td><input type="image" src="colourlibrary/cornsilk.gif" onmouseover="this.form.xmlfileid.value = '/MyProj/DEFAULT/more/cornsilk.xsl'" /></td>
                                                                  <td><input type="image" src="colourlibrary/sandybrown.gif" onmouseover="this.form.xmlfileid.value = '/MyProj/DEFAULT/more/sandybrown.xsl'" /></td>
                                                                  <td><input type="image" src="colourlibrary/violet.gif" onmouseover="this.form.xmlfileid.value = '/MyProj/DEFAULT/more/violet.xsl'" /></td>
                                                                  <td><input type="image" src="colourlibrary/lightskyblue.gif" onmouseover="this.form.xmlfileid.value = '/MyProj/DEFAULT/more/lightskyblue.xsl'" /></td>
                                                                  <td><input type="image" src="colourlibrary/yellowgreen.gif" onmouseover="this.form.xmlfileid.value = '/MyProj/DEFAULT/more/yellowgreen.xsl'" /></td>
                                                                  <td><input type="image" src="colourlibrary/mediumpurple.gif" onmouseover="this.form.xmlfileid.value = '/MyProj/DEFAULT/more/mediumpurple.xsl'" /></td>
                                                            </tr>
                                                            <tr>
                                                                  <td><input type="image" src="colourlibrary/beige.gif" onmouseover="this.form.xmlfileid.value = '/MyProj/DEFAULT/more/beige.xsl'" /></td>
                                                                  <td><input type="image" src="colourlibrary/salmon.gif" onmouseover="this.form.xmlfileid.value = '/MyProj/DEFAULT/more/salmon.xsl'" /></td>
                                                                  <td><input type="image" src="colourlibrary/plum.gif" onmouseover="this.form.xmlfileid.value = '/MyProj/DEFAULT/more/plum.xsl'" /></td>
                                                                  <td><input type="image" src="colourlibrary/aqua.gif" onmouseover="this.form.xmlfileid.value = '/MyProj/DEFAULT/more/aqua.xsl'" /></td>
                                                                  <td><input type="image" src="colourlibrary/mediumturquoise.gif" onmouseover="this.form.xmlfileid.value = '/MyProj/DEFAULT/more/mediumturquoise.xsl'" /></td>
                                                                  <td><input type="image" src="colourlibrary/slateblue.gif" onmouseover="this.form.xmlfileid.value = '/MyProj/DEFAULT/more/slateblue.xsl'" /></td>
                                                            </tr>
                                                            <tr>
                                                                  <td><input type="image" src="colourlibrary/wheat.gif" onmouseover="this.form.xmlfileid.value = '/MyProj/DEFAULT/more/wheat.xsl'" /></td>
                                                                  <td><input type="image" src="colourlibrary/rosybrown.gif" onmouseover="this.form.xmlfileid.value = '/MyProj/DEFAULT/more/rosybrown.xsl'" /></td>
                                                                  <td><input type="image" src="colourlibrary/orchid.gif" onmouseover="this.form.xmlfileid.value = '/MyProj/DEFAULT/more/orchid.xsl'" /></td>
                                                                  <td><input type="image" src="colourlibrary/lightsteelblue.gif" onmouseover="this.form.xmlfileid.value = '/MyProj/DEFAULT/more/lightdteelblue.xsl'" /></td>
                                                                  <td><input type="image" src="colourlibrary/cadetblue.gif" onmouseover="this.form.xmlfileid.value = '/MyProj/DEFAULT/more/cadetblue.xsl'" /></td>
                                                                  <td><input type="image" src="colourlibrary/palevioletred.gif" onmouseover="this.form.xmlfileid.value = '/MyProj/DEFAULT/more/palevioletred.xsl'" /></td>
                                                            </tr>
                                                      </table>
                                                      <br />
                                                      <a href="javascript:transformxmloutput_1()"><img src="previewbutton.gif" border="0" alt="Preview XML with Selected Stylesheet" align="middle" /></a>
                                                </td>
                                          </tr>
                                    </table>
                              </form>
                        </td>
                        <td>
                              <table style="background-color: #F4F4F4; border: 0px" cellspacing="0" cellpadding="5" width="480">
                                    <tr>
                                          <td>
                                                <b>.::Instructions::.</b><br />
                                                + In this staff interface, you are to assign XML file(s) to your preferred XSL file (stylesheet).<br />
                                                + Click on the items in the <b>XML</b> dropdown list/the preview icon (<img src="previewiconimage.gif" alt="preview icon" />) to see an annotated source preview (right top) of the XML file.<br />
                                                + Click on the items in the <b>XSL</b> dropdown list to see a thumbnail preview (right middle bottom) of the stylesheet.<br />
                                                + Click on the <b>Preview XML</b> button to see full real preview of the stylesheet you've applied to the XML file without saving.<br />
                                                + Click on the <b>Save Settings</b> button to save the changes to the selected XML file.
                                          </td>
                                    </tr>
                              </table>
                              <br />
                              <form style="margin: 0px;" id="selection" name="selection" method="post" action="savexml.asp">
                                    <table style="background-color: #F4F4F4; border: 0px" cellspacing="0" cellpadding="5" width="480">
                                          <tr>
                                                <td style="font-weight: bold" colspan="4">
                                                      .::CONTENT XML data::.
                                                </td>
                                          </tr>
                                          <tr>
                                                <td style="font: 8pt Verdana, sans-serif; color: black" width="100">
                                                      XML File<br />
                                                      <% Call CreateSelect("/MyProj/xmldata", 2) %>
                                                </td>
                                                <td style="font: 8pt Verdana, sans-serif; color: black" width="100%">
                                                      XSL Stylesheet<br />
                                                      <select id="xslfileid1" name="xslfileid" size="1" onclick="previewxmlthumbnails(this.options[this.selectedIndex].value)">
                                                            <option value="/MyProj/xmldata/xsl/aflooding.xsl" selected="selected">Normal Style(No Pics)</option>
                                                            <option value="/MyProj/xmldata/xsl/afloodingtmp2.xsl">Normal Style 2</option>
                                                            <option value="/MyProj/xmldata/xsl/afloodingtmp3.xsl">Special Style</option>
                                                            <option value="/MyProj/xmldata/xsl/plaintext.xsl">Plain Text Only</option>
                                                      </select>
                                                </td>
                                                <td style="text-align: center" width="80" nowrap="nowrap"><input type="image" src="savesettingsbutton.gif" id="btnSubmit1" name="btnSubmit" value="Save Settings" /></td>
                                                <td style="text-align: center" width="80" nowrap="nowrap"><input type="image" src="previewbutton.gif" id="button1" name="button" value="Preview XML with selected Stylesheet" onclick="transformxml()" /></td>
                                          </tr>
                                    </table>
                              </form>
                              <form style="margin: 0px;" id="selection2" name="selection2" method="post" action="savexml.asp">
                                    <table style="background-color: #F4F4F4; border: 0px" cellspacing="0" cellpadding="5" width="480">
                                          <tr>
                                                <td style="font-weight: bold" colspan="4">
                                                      .::CONTENT XML data (w/ Flash)::.
                                                </td>
                                          </tr>
                                          <tr>
                                                <td style="font: 8pt Verdana, sans-serif; color: black" width="100">
                                                      XML File (w/ Flash)<br />
                                                      <% Call CreateSelect("/MyProj/xmldata/flash", 3) %>
                                                </td>
                                                <td style="font: 8pt Verdana, sans-serif; color: black" width="100%">
                                                      XSL Stylesheet<br />
                                                      <select id="xslfileid2" name="xslfileid" size="1" onclick="previewxmlthumbnails(this.options[this.selectedIndex].value)">
                                                            <option value="/MyProj/xmldata/xsl/flash1.xsl" selected="selected">Flash only Style 1</option>
                                                            <option value="/MyProj/xmldata/xsl/flash2.xsl">Flash only Plain Style</option>
                                                            <option value="/MyProj/xmldata/xsl/flash3.xsl">Flash only Special Style</option>
                                                      </select>
                                                </td>
                                                <td style="text-align: center" width="80" nowrap="nowrap"><input type="image" src="savesettingsbutton.gif" id="btnSubmit2" name="btnSubmit" value="Save Settings" /></td>
                                                <td style="text-align: center" width="80" nowrap="nowrap"><input type="image" src="previewbutton.gif" id="button2" name="button" value="Preview XML with selected Stylesheet" onclick="transformxmlflash()" /></td>
                                          </tr>
                                    </table>
                              </form>
                              <br />
                              <br />
                              <form style="margin: 0px;" id="selection4" name="selection4" method="post" action="savexml.asp">
                                    <input type="hidden" id="xmlfileid4" name="xmlfileid" value="/MyProj/DEFAULT/left.xml" />
                                    <table style="background-color: #F4F4F4; border: 0px" cellspacing="0" cellpadding="5" width="480">
                                          <tr>
                                                <td style="font-weight: bold" colspan="4">
                                                      .::Output Pages::.
                                                </td>
                                          </tr>
                                          <tr>
                                                <td style="font: bold 8pt Verdana, sans-serif; color: black" width="100" nowrap="nowrap">
                                                      <a href="javascript:showpreview_brief(document.selection4.xmlfileid.value)"><img src="previewiconimage.gif" border="0" alt="source preview" align="middle" /></a>
                                                      Left.XML
                                                </td>
                                                <td style="font: 8pt Verdana, sans-serif; color: black" width="100%">
                                                      XSL Stylesheet<br />
                                                      <select id="xslfileid3" name="xslfileid" size="1">
                                                            <option value="/MyProj/DEFAULT/left.xsl" selected="selected">Default Style</option>
                                                            <option value="/MyProj/DEFAULT/darkgray.xsl">DarkGray Style</option>
                                                            <option value="/MyProj/DEFAULT/orangegold.xsl">DarkOrange Style</option>
                                                            <option value="/MyProj/DEFAULT/violet.xsl">Violet Style</option>
                                                      </select>
                                                </td>
                                                <td style="text-align: center" width="80" nowrap="nowrap"><input type="image" src="savesettingsbutton.gif" id="btnSubmit3" name="btnSubmit" value="Save Settings" /></td>
                                                <td style="text-align: center" width="80" nowrap="nowrap"><input type="image" src="previewbutton.gif" id="button3" name="button" value="Preview XML with selected Stylesheet" onclick="transformxmloutput_1()" /></td>
                                          </tr>
                                    </table>
                              </form>
                              <form style="margin: 0px;" id="selection5" name="selection5" method="post" action="savexml.asp">
                                    <input type="hidden" id="xmlfileid5" name="xmlfileid" value="/MyProj/DEFAULT/home.xml" />
                                    <table style="background-color: #F4F4F4; border: 0px" cellspacing="0" cellpadding="5" width="480">
                                          <tr>
                                                <td style="font: bold 8pt Verdana, sans-serif; color: black" width="100" nowrap="nowrap">
                                                      <a href="javascript:showpreview_brief(document.selection5.xmlfileid.value)"><img src="previewiconimage.gif" border="0" alt="source preview" align="middle" /></a>
                                                      Home.XML
                                                </td>
                                                <td style="font: 8pt Verdana, sans-serif; color: black" width="100%">
                                                      XSL Stylesheet<br />
                                                      <select id="xslfileid4" name="xslfileid" size="1">
                                                            <option value="/MyProj/DEFAULT/home.xsl" selected="selected">3 Frames Vertical</option>
                                                            <option value="/MyProj/DEFAULT/home2.xsl">3 Frames Horizontal</option>
                                                            <option value="/MyProj/DEFAULT/home3.xsl">2 Frames Vertical</option>
                                                      </select>
                                                </td>
                                                <td style="text-align: center" width="80" nowrap="nowrap"><input type="image" src="savesettingsbutton.gif" id="btnSubmit4" name="btnSubmit" value="Save Settings" /></td>
                                                <td style="text-align: center" width="80" nowrap="nowrap"><input type="image" src="previewbutton.gif" id="button4" name="button" value="Preview XML with selected Stylesheet" onclick="transformxmloutput_2()" /></td>
                                          </tr>
                                    </table>
                              </form>
                              <form style="margin: 0px;" id="selection6" name="selection6" method="post" action="savexml.asp">
                                    <input type="hidden" id="xmlfileid6" name="xmlfileid" value="/MyProj/DEFAULT/center.xml" />
                                    <table style="background-color: #F4F4F4; border: 0px" cellspacing="0" cellpadding="5" width="480">
                                          <tr>
                                                <td style="font: bold 8pt Verdana, sans-serif; color: black" width="100" nowrap="nowrap">
                                                      <a href="javascript:showpreview_brief(document.selection6.xmlfileid.value)"><img src="previewiconimage.gif" border="0" alt="source preview" align="middle" /></a>
                                                      Center.XML
                                                </td>
                                                <td style="font: 8pt Verdana, sans-serif; color: black" width="100%">
                                                      XSL Stylesheet<br />
                                                      <select id="xslfileid5" name="xslfileid" size="1">
                                                            <option value="/MyProj/DEFAULT/center.xsl" selected="selected">Default</option>
                                                            <option value="/MyProj/DEFAULT/cstyle2.xsl">Style2</option>
                                                            <option value="/MyProj/DEFAULT/cstyle3.xsl">OrangeGold</option>
                                                      </select>
                                                </td>
                                                <td style="text-align: center" width="80" nowrap="nowrap"><input type="image" src="savesettingsbutton.gif" id="btnSubmit5" name="btnSubmit" value="Save Settings" /></td>
                                                <td style="text-align: center" width="80" nowrap="nowrap"><input type="image" src="previewbutton.gif" id="button5" name="button" value="Preview XML with selected Stylesheet" onclick="transformxmloutput_3()" /></td>
                                          </tr>
                                    </table>
                              </form>
                              <form style="margin: 0px;" id="selection7" name="selection7" method="post" action="savexml.asp">
                                    <input type="hidden" id="xmlfileid7" name="xmlfileid" value="/MyProj/DEFAULT/right.xml" />
                                    <table style="background-color: #F4F4F4; border: 0px" cellspacing="0" cellpadding="5" width="480">
                                          <tr>
                                                <td style="font: bold 8pt Verdana, sans-serif; color: black" width="100" nowrap="nowrap">
                                                      <a href="javascript:showpreview_brief(document.selection7.xmlfileid.value)"><img src="previewiconimage.gif" border="0" alt="source preview" align="middle" /></a>
                                                      Right.XML
                                                </td>
                                                <td style="font: 8pt Verdana, sans-serif; color: black" width="100%">
                                                      XSL Stylesheet<br />
                                                      <select id="xslfileid6" name="xslfileid" size="1">
                                                            <option value="/MyProj/DEFAULT/right.xsl" selected="selected">Default</option>
                                                            <option value="/MyProj/DEFAULT/rstyle2.xsl">Style2</option>
                                                            <option value="/MyProj/DEFAULT/rstyle3.xsl">Orange Gold</option>
                                                      </select><br />
                                                      for 3 frame only
                                                </td>
                                                <td style="text-align: center" width="80" nowrap="nowrap"><input type="image" src="savesettingsbutton.gif" id="btnSubmit6" name="btnSubmit" value="Save Settings" /></td>
                                                <td style="text-align: center" width="80" nowrap="nowrap"><input type="image" src="previewbutton.gif" id="button6" name="button" value="Preview XML with selected Stylesheet" onclick="transformxmloutput_4()" /></td>
                                          </tr>
                                    </table>
                              </form>
                              <br />
                              <br />
                              <table style="background-color: #F4F4F4; border: 0px" cellspacing="0" cellpadding="5" width="480">
                                    <tr>
                                          <td style="text-align: center; font-weight: bold">
                                                To view overall output after changes are made, please click on the button:<br />
                                                <input type="image" src="voutputbutton.gif" id="button7" name="button" value="View Output" onclick="window.open('default/home.xml', '')" />
                                          </td>
                                    </tr>
                              </table>
                        </td>
                  </tr>
            </table>
      </body>
</html>

==========================================================

gator4life
(chomp, chomp)
0
 

Author Comment

by:joe851
ID: 8172519
Hi Gator,

This is the error I receive...

-----------------------------------------------------
Microsoft VBScript compilation error '800a03f9'

Expected 'Then'

/myproj/selectionofstyle.asp, line 45

If (bFirstOption)
-----------------^

------------------------------------------------------
Joash
0
 

Author Comment

by:joe851
ID: 8172549
When I put in the "Then" in the above file where it's missing, it prompts this error...
--------------------------------------------------------
Failed to map a physical path to folder "/MyProj/xmldata/flash".
450 : Wrong number of arguments or invalid property assignment
--------------------------------------------------------

-Joe
0
 

Author Comment

by:joe851
ID: 8172610
Hi Gator,
To make things easier, I have uploaded the project on the web. Do click on the address below:

briefcase.yahoo.com

Username: expertjoe851
Password: student

It is in the My Documents Folder. This is the project 'm working on.

Thanks for your help...
0
 

Author Comment

by:joe851
ID: 8178364
Hi Gator,
Did you manage to retrieve the files? How's it going.

Thanks,
Joe
0
 
LVL 5

Expert Comment

by:gator4life
ID: 8180945
Joe -

I noticed that in most of the code, there is a folder referred to as "MyProj" in many of the Server.MapPath() method calls.  However, in the code that you posted to the Yahoo! briefcase, there is not a single folder known as "MyProj".  When I tried to execute the code, I was running into numerous problems because the root directory was called "Joash" and not "MyProj".  I believe this may be the reason we are seeing MapPath errors popping up.

gator4life
(chomp, chomp)
0
 

Author Comment

by:joe851
ID: 8186573
Gator,

I set up IIS on my system and made the IIS folder Joash. Maybe I should change the Server.MapPath().

(1)Presently it is "MyProj" Do I change it to MyProj/Joash?

(2)Does this mean that your coding was working from the beginning but it failed to because of the problem you stated in the earlier thread?

If your answer to the second question is yes, I'm really sorry for wasting your time Gator.

Thanks Gator for your help. I really appreciate it.

Regards,
joe
0
 

Author Comment

by:joe851
ID: 8186580
Could you tell me which thread contains the solution to my first problem all along... do state the date and time of it...

Thanks HEAPS!
0
 
LVL 5

Expert Comment

by:gator4life
ID: 8187635
Joe -

Here are the answers to your questions:

(1) I would just make the IIS folder "MyProj" instead of "Joash", since that would require you to only make one change instead of changing the MapPath arguments in all of the code, which is more time-consuming.  However, you can change all of the MapPath arguments to "Joash" instead of "MyProj" if you are so inclined! ;-)

(2) Unfortunately, yes, I do think my code was working from the very beginning, since I did not change much during my work, except to make the error checking more robust, make it spit out more easily noticeable error messages, and thoroughly test the code with mock data.  The last interation is what really made me focus on the MapPath area, and your briefcase code confirmed my suspicions that something was wrong with the arguments being passed to the MapPath calls (in essence, it couldn't find the code).

Don't feel sorry for wasting my time in any way.  Remember, I am here volunteering my time, since I enjoy helping people with programming issues.  If I helped you reach a working solution, then the time was not wasted, and your code is a little better at what it does now.  In fact, I am learning about XSL transformations right now, and some of your code provides very good examples for me to go through.  So, you have helped me, too, whether you realize it or not.

The original solution was posted on "03/10/2003 06:52AM PST".

gator4life
(chomp, chomp)
0
 

Author Comment

by:joe851
ID: 8192777
Gator-

I still seem to be getting that error after changing the Folder name from Joash to MyProj.

My part in this project is to change the drop-down menu to a 6 by 6 color table. I was just wondering how is it the program is able to save the form submission on the drop down menu but not on the color table without the MapPath arguments not touched?

I'm trying to work on the MapPath arguments right now and I'll see how it goes.

Thanks for your patience. I am an Engineering Student but programming is not my cup of tea nevertheless I got to get it up for my Final School Project to graduate.

-Joe
0
 

Author Comment

by:joe851
ID: 8199866
Gator-

I still seem to be getting the error below even after changing the folder name from Joash to MyProj.

-2147467259 : 006~ASP 0171~Missing Path~The Path parameter must be specified for the MapPath method.

Think you know what the problem could be? If you do know what it is do, tell me about it. Thanks a lot!!!

Regards,
Joe
0
 
LVL 5

Expert Comment

by:gator4life
ID: 8200405
joe -

I need you to do the following things for me:

(1) Switch the code in your current savexml.asp file with this code:

==========================================================
savexml.asp
==========================================================

<%
     Option Explicit

     On Error Resume Next

     Sub ErrorHandler(sErrorMsg, bShowDetails)

          Response.Write("<b>" & sErrorMsg & "</b><br />")

          If (bShowDetails) Then Response.Write("<b>" & Err.Number & " : " & Err.Description & "</b><br />")

          Response.Write("<br />")
          Response.Write("<input type=""button"" id=""button"" name=""button"" value=""Back"" onclick=""window.location.href = 'selectionofstyle.asp'"" />")
          Response.End

     End Sub

     Sub AddStyleSheetToXml(sXmlFile, sXslFile)

          Dim sXmlFilePath : sXmlFilePath = Server.MapPath(sXmlFile)

          If (Err.Number <> 0) Then Call ErrorHandler("Failed to map a physical path to file """ & sXmlFile & """. Server.MapPath("""") points to """ & Server.MapPath("/") & """.", True)

          Dim sXslFilePath : sXslFilePath = Server.MapPath(sXslFile)

          If (Err.Number <> 0) Then Call ErrorHandler("Failed to map a physical path to file """ & sXslFile & """. Server.MapPath("""") points to """ & Server.MapPath("/") & """.", True)

          Dim oDOM
          Set oDOM = Server.CreateObject("Microsoft.XMLDOM")

          If (Err.Number <> 0) Then Call ErrorHandler("Failed to create instance of Microsoft.XMLDOM.", True)

          oDOM.async = False
          oDOM.preserveWhiteSpace = True

          Dim bFileExists : bFileExists = oDOM.load(sXmlFilePath)

          If (bFileExists) Then

               Dim oNode
               Set oNode = oDOM.firstChild

               If (IsNull(oNode)) Then Call ErrorHandler("File """ & sXmlFilePath & """ does not contain any nodes to parse.", False)

               While Not (oNode.nodeName = oDOM.documentElement.nodeName)
                    If (oNode.nodeName = "xml-stylesheet") Then oNode.data = "type=""text/xsl"" href=""" & sXslFile & """"
                    Set oNode = oNode.nextSibling
               Wend

               Set oNode = Nothing

          Else
               Call ErrorHandler("File """ & sXmlFilePath & """ could not be loaded.", False)
          End If

          oDOM.save(sXmlFilePath)

          Set oDOM = Nothing

     End Sub

     Dim sXmlFileSrc : sXmlFileSrc = Request.Form("xmlfileid")
     Dim sXslFileSrc : sXslFileSrc = Request.Form("xslfileid")

     Call AddStyleSheetToXml(sXmlFileSrc, sXslFileSrc)

     Response.Write("<b>Your form submission has been saved.</b><br />")
     Response.Write("<b>Saved in: " & Server.MapPath(sXmlFileSrc) & "</b><br />")
     Response.Write("<br />")
     Response.Write("<input type=""button"" id=""button"" name=""button"" value=""Back"" onclick=""window.location.href = 'selectionofstyle.asp'"" />")
%>

==========================================================

(2) Run your selectionofstyle.asp page and click on something on the 6x6 color table.  Post the error message that gets generated here.  It should spit out more information than the current error message and should spit out what the server thinks the current MapPath path is.

(3) Run your selectionofstyle.asp page and use the original dropdown.  Post the message here.

In the meantime, I am trying to get this code running on my WinXP Pro machine and trying to figure out why the MapPath method would function differently in the two situations.  Don't worry; I haven't forgotten about ya! ;-)

gator4life
(chomp, chomp)
0
 

Author Comment

by:joe851
ID: 8200716
Gator-
I ran the code in savexml.asp as you said and it did yield results:

==================================================
Your form submission has been saved.
Saved in: C:\MyProj\DEFAULT\more\mintcream.xsl
==================================================
But when I clicked on the view output button, it didn't seem to have saved it.

=====================================
Your form submission has been saved.
Saved in: C:\MyProj\DEFAULT\left.xml
=====================================

Also, whenever i click on the 6 X 6 color box and then click the output button, IE restarts... IE also restarts when I click the drop-down menu and click the output button. Is this restarting due to the scripting done in the savexml.asp?

Thanks at least i think i got somewhere when I see that it saves the form submission.

Regards,
Joe
0
 
LVL 5

Accepted Solution

by:
gator4life earned 520 total points
ID: 8215651
Guess what Joe! I think I figured it out in a brilliant instant of just happening to stare at the correct line of code! Within the form that contains the 6x6 grid of colors ("selectionR") in the "selectionofstyle.asp" page, we were assigning the XSL file chosen to the input field named "xmlfileid" and this form did *NOT* contain an "xslfileid" field.  In *ALL* of the other forms within the "selectionofstyle.asp" page, the XSL file chosen is assigned to the input field named "xslfileid" and the input field "xmlfileid" is given a hidden value. So, we were not passing the correct values to the "savexml.asp" page for the 6x6 grid, which would explain all of the sporadic behavior! ;-)  Here are what I think are the final versions needed for the two files:

==========================================================
savexml.asp
==========================================================

<%
      Option Explicit

      On Error Resume Next

      Sub ErrorHandler(sErrorMsg, bShowDetails)

            Response.Write("<b>" & sErrorMsg & "</b><br />")

            If (bShowDetails) Then Response.Write("<b>" & Err.Number & " : " & Err.Description & "</b><br />")

            Response.Write("<br />")
            Response.Write("<input type=""button"" id=""button"" name=""button"" value=""Back"" onclick=""window.location.href = 'selectionofstyle.asp'"" />")
            Response.End

      End Sub

      Sub AddStyleSheetToXml(sXmlFile, sXslFile)

            Dim sXmlFilePath : sXmlFilePath = Server.MapPath(sXmlFile)

            If (Err.Number <> 0) Then Call ErrorHandler("Failed to map a physical path to file """ & sXmlFile & """. Server.MapPath(""/"") points to """ & Server.MapPath("/") & """.", True)

            Dim sXslFilePath : sXslFilePath = Server.MapPath(sXslFile)

            If (Err.Number <> 0) Then Call ErrorHandler("Failed to map a physical path to file """ & sXslFile & """. Server.MapPath(""/"") points to """ & Server.MapPath("/") & """.", True)

            Dim oDOM
            Set oDOM = Server.CreateObject("Microsoft.XMLDOM")

            If (Err.Number <> 0) Then Call ErrorHandler("Failed to create instance of Microsoft.XMLDOM.", True)

            oDOM.async = False
            oDOM.preserveWhiteSpace = True

            Dim bFileExists : bFileExists = oDOM.load(sXmlFilePath)

            If (bFileExists) Then

                  Dim oNode
                  Set oNode = oDOM.firstChild

                  If (IsNull(oNode)) Then Call ErrorHandler("File """ & sXmlFilePath & """ does not contain any nodes to parse.", False)

                  While Not (oNode.nodeName = oDOM.documentElement.nodeName)
                        If (oNode.nodeName = "xml-stylesheet") Then oNode.data = "type=""text/xsl"" href=""" & sXslFile & """"
                        Set oNode = oNode.nextSibling
                  Wend

                  Set oNode = Nothing

            Else
                  Call ErrorHandler("File """ & sXmlFilePath & """ could not be loaded.", False)
            End If

            oDOM.save(sXmlFilePath)

            Set oDOM = Nothing

      End Sub

      Dim sXmlFileSrc : sXmlFileSrc = Request.Form("xmlfileid")
      Dim sXslFileSrc : sXslFileSrc = Request.Form("xslfileid")

      Call AddStyleSheetToXml(sXmlFileSrc, sXslFileSrc)

      Response.Write("<b>Your form submission has been saved.</b><br />")
      Response.Write("<b>Saved in: " & Server.MapPath(sXmlFileSrc) & "</b><br />")
      Response.Write("<br />")
      Response.Write("<input type=""button"" id=""button"" name=""button"" value=""Back"" onclick=""window.location.href = 'selectionofstyle.asp'"" />")
%>

==========================================================
selectionofstyle.asp
==========================================================

<%
      Option Explicit

      On Error Resume Next

      Response.Buffer = True

      Sub ErrorHandler(sErrorMsg, bShowDetails)

            Response.Clear
            Response.Write("<b>" & sErrorMsg & "</b><br />")

            If (bShowDetails) Then Response.Write("<b>" & Err.Number & " : " & Err.Description & "</b>")

            Response.End

      End Sub

      Sub CreateSelect(sFolder, iId)

            Dim sMapPath : sMapPath = Server.MapPath(sFolder)

            If (Err.Number <> 0) Then Call ErrorHandler("Failed to map a physical path to folder """ & sFolder & """. Server.MapPath("""") points to """ & Server.MapPath("") & """.", True)

            Dim oFSO
            Set oFSO = Server.CreateObject("Scripting.FileSystemObject")

            If (Err.Number <> 0) Then Call ErrorHandler("Failed to create instance of Scripting.FileSystemObject.", True)

            Dim oFolder
            Set oFolder = oFSO.GetFolder(sMapPath)

            If (Err.Number <> 0) Then Call ErrorHandler("Folder """ & sMapPath & """ does not exist.", True)

            Dim aFiles
            Set aFiles = oFolder.Files

            If (IsArray(aFiles) And (UBound(aFiles) <> 0)) Then

                  Response.Write("<select id=""xmlfileid" & iId & """ name=""xmlfileid"" size=""1"" onclick=""showpreview_brief(this.options[this.selectedIndex].value)"">")

                  Dim bFirstOption : bFirstOption = True

                  Dim oFile
                  For Each oFile In aFiles
                        If (LCase(Right(oFile.Name, Len(oFile.Name) - InStr(oFile.Name, "."))) = "xml") Then
                              If (bFirstOption) Then
                                    Response.Write("<option value=""" & sFolder & "/" & oFile.Name & """ selected=""selected"">" & oFile.Name & "</option>")
                              Else
                                    Response.Write("<option value=""" & sFolder & "/" & oFile.Name & """>" & oFile.Name & "</option>")
                              End If
                        End If
                  Next

                  Response.Write("</select>")

            End If

            Set aFiles = Nothing
            Set oFolder = Nothing
            Set oFSO = Nothing

      End Sub
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
      <head>
            <title>SELECTION OF STYLESHEETS</title>
            <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
            <link type="text/css" rel="stylesheet" href="style.css" />
            <script type="text/javascript" src="allscripts.js"></script>
      </head>
      <body style="background-color: #CCC; margin: 5px">
            <table style="background-color: #999; border: 0px;" cellpadding="5" cellspacing="0">
                  <tr>
                        <td style="font-weight: bold" colspan="2">
                              ::: SELECTION OF STYLESHEETS ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::<br />
                              <br />
                              <br />
                        </td>
                  </tr>
                  <tr valign="top">
                        <td style="text-align: center; font-weight: bold">
                              Annotated Source Preview
                              <form id="previewform" name="previewform" action="" style="margin: 0px;">
                                    <textarea class="formytextarea" id="previewpart" name="previewpart" cols="40" rows="20">Click on the XML dropdown list for an annotated source preview of the file.</textarea>
                              </form>
                              <br />
                              <form style="margin: 0px;" id="selectionR" name="selectionR" method="post" action="savexml.asp">
                                    <input type="hidden" id="xmlfileid1" name="xmlfileid" value="/MyProj/DEFAULT/left.xml" />
                                    <input type="hidden" id="xslfileid1" name="xslfileid" />
                                    <table class="bordertable" style="background-color: #F4F4F4; border: 0px" cellpadding="5" cellspacing="0" width="220">
                                          <tr>
                                                <td style="text-align: center; font-weight: bold">
                                                      XSL Stylesheet Preview<br />
                                                      <img id="thumbnail" name="thumbnail" src="/MyProj/Previewthumbnails/normalstylewopics.jpg" border="1" alt="XSL Stylesheet Preview" align="middle" />
                                                </td>
                                          </tr>
                                          <tr>
                                                <td style="background-color: #999; padding: 0px">
                                                      <br />
                                                </td>
                                          </tr>
                                          <tr>
                                                <td style="text-align: center; font-weight: bold">
                                                      XSL Colour Chart For Left.XML<br />
                                                      <br />
                                                      <table cellpadding="0" cellspacing="1" border="5">
                                                            <tr>
                                                                  <td><input type="image" src="colourlibrary/mintcream.gif" onmouseover="this.form.xslfileid.value = '/MyProj/DEFAULT/left.xsl'" /></td>
                                                                  <td><input type="image" src="colourlibrary/bisque.gif" onmouseover="this.form.xslfileid.value = '/MyProj/DEFAULT/more/bisque.xsl'" /></td>
                                                                  <td><input type="image" src="colourlibrary/mistyrose.gif" onmouseover="this.form.xslfileid.value = '/MyProj/DEFAULT/more/mistyrose.xsl'" /></td>
                                                                  <td><input type="image" src="colourlibrary/paleturquoise.gif" onmouseover="this.form.xslfileid.value = '/MyProj/DEFAULT/more/paleturquoise.xsl'" /></td>
                                                                  <td><input type="image" src="colourlibrary/palegreen.gif" onmouseover="this.form.xslfileid.value = '/MyProj/DEFAULT/more/palegreen.xsl'" /></td>
                                                                  <td><input type="image" src="colourlibrary/papayawhip.gif" onmouseover="this.form.xslfileid.value = '/MyProj/DEFAULT/more/papayawhip.xsl'" /></td>
                                                            </tr>
                                                            <tr>
                                                                  <td><input type="image" src="colourlibrary/seashell.gif" onmouseover="this.form.xslfileid.value = '/MyProj/DEFAULT/more/seashell.xsl'" /></td>
                                                                  <td><input type="image" src="colourlibrary/palegoldenrod.gif" onmouseover="this.form.xslfileid.value = '/MyProj/DEFAULT/more/palegoldenrod.xsl'" /></td>
                                                                  <td><input type="image" src="colourlibrary/lavender.gif" onmouseover="this.form.xslfileid.value = '/MyProj/DEFAULT/more/lavender.xsl'" /></td>
                                                                  <td><input type="image" src="colourlibrary/powderblue.gif" onmouseover="this.form.xslfileid.value = '/MyProj/DEFAULT/more/powderblue.xsl'" /></td>
                                                                  <td><input type="image" src="colourlibrary/springgreen.gif" onmouseover="this.form.xslfileid.value = '/MyProj/DEFAULT/more/springgreen.xsl'" /></td>
                                                                  <td><input type="image" src="colourlibrary/lightpink.gif" onmouseover="this.form.xslfileid.value = '/MyProj/DEFAULT/more/lightpink.xsl'" /></td>
                                                            </tr>
                                                            <tr>
                                                                  <td><input type="image" src="colourlibrary/oldlace.gif" onmouseover="this.form.xslfileid.value = '/MyProj/DEFAULT/more/olodlace.xsl'" /></td>
                                                                  <td><input type="image" src="colourlibrary/peachpuff.gif" onmouseover="this.form.xslfileid.value = '/MyProj/DEFAULT/more/peachpuff.xsl'" /></td>
                                                                  <td><input type="image" src="colourlibrary/thistle.gif" onmouseover="this.form.xslfileid.value = '/MyProj/DEFAULT/more/thistle.xsl'" /></td>
                                                                  <td><input type="image" src="colourlibrary/turquoise.gif" onmouseover="this.form.xslfileid.value = '/MyProj/DEFAULT/more/turquoise.xsl'" /></td>
                                                                  <td><input type="image" src="colourlibrary/greenyellow.gif" onmouseover="this.form.xslfileid.value = '/MyProj/DEFAULT/more/greenyellow.xsl'" /></td>
                                                                  <td><input type="image" src="colourlibrary/mediumaquamarine.gif" onmouseover="this.form.xslfileid.value = '/MyProj/DEFAULT/more/mediumaquamarine.xsl'" /></td>
                                                            </tr>
                                                            <tr>
                                                                  <td><input type="image" src="colourlibrary/cornsilk.gif" onmouseover="this.form.xslfileid.value = '/MyProj/DEFAULT/more/cornsilk.xsl'" /></td>
                                                                  <td><input type="image" src="colourlibrary/sandybrown.gif" onmouseover="this.form.xslfileid.value = '/MyProj/DEFAULT/more/sandybrown.xsl'" /></td>
                                                                  <td><input type="image" src="colourlibrary/violet.gif" onmouseover="this.form.xslfileid.value = '/MyProj/DEFAULT/more/violet.xsl'" /></td>
                                                                  <td><input type="image" src="colourlibrary/lightskyblue.gif" onmouseover="this.form.xslfileid.value = '/MyProj/DEFAULT/more/lightskyblue.xsl'" /></td>
                                                                  <td><input type="image" src="colourlibrary/yellowgreen.gif" onmouseover="this.form.xslfileid.value = '/MyProj/DEFAULT/more/yellowgreen.xsl'" /></td>
                                                                  <td><input type="image" src="colourlibrary/mediumpurple.gif" onmouseover="this.form.xslfileid.value = '/MyProj/DEFAULT/more/mediumpurple.xsl'" /></td>
                                                            </tr>
                                                            <tr>
                                                                  <td><input type="image" src="colourlibrary/beige.gif" onmouseover="this.form.xslfileid.value = '/MyProj/DEFAULT/more/beige.xsl'" /></td>
                                                                  <td><input type="image" src="colourlibrary/salmon.gif" onmouseover="this.form.xslfileid.value = '/MyProj/DEFAULT/more/salmon.xsl'" /></td>
                                                                  <td><input type="image" src="colourlibrary/plum.gif" onmouseover="this.form.xslfileid.value = '/MyProj/DEFAULT/more/plum.xsl'" /></td>
                                                                  <td><input type="image" src="colourlibrary/aqua.gif" onmouseover="this.form.xslfileid.value = '/MyProj/DEFAULT/more/aqua.xsl'" /></td>
                                                                  <td><input type="image" src="colourlibrary/mediumturquoise.gif" onmouseover="this.form.xslfileid.value = '/MyProj/DEFAULT/more/mediumturquoise.xsl'" /></td>
                                                                  <td><input type="image" src="colourlibrary/slateblue.gif" onmouseover="this.form.xslfileid.value = '/MyProj/DEFAULT/more/slateblue.xsl'" /></td>
                                                            </tr>
                                                            <tr>
                                                                  <td><input type="image" src="colourlibrary/wheat.gif" onmouseover="this.form.xslfileid.value = '/MyProj/DEFAULT/more/wheat.xsl'" /></td>
                                                                  <td><input type="image" src="colourlibrary/rosybrown.gif" onmouseover="this.form.xslfileid.value = '/MyProj/DEFAULT/more/rosybrown.xsl'" /></td>
                                                                  <td><input type="image" src="colourlibrary/orchid.gif" onmouseover="this.form.xslfileid.value = '/MyProj/DEFAULT/more/orchid.xsl'" /></td>
                                                                  <td><input type="image" src="colourlibrary/lightsteelblue.gif" onmouseover="this.form.xslfileid.value = '/MyProj/DEFAULT/more/lightdteelblue.xsl'" /></td>
                                                                  <td><input type="image" src="colourlibrary/cadetblue.gif" onmouseover="this.form.xslfileid.value = '/MyProj/DEFAULT/more/cadetblue.xsl'" /></td>
                                                                  <td><input type="image" src="colourlibrary/palevioletred.gif" onmouseover="this.form.xslfileid.value = '/MyProj/DEFAULT/more/palevioletred.xsl'" /></td>
                                                            </tr>
                                                      </table>
                                                      <br />
                                                      <a href="javascript:transformxmloutput_1()"><img src="previewbutton.gif" border="0" alt="Preview XML with Selected Stylesheet" align="middle" /></a>
                                                </td>
                                          </tr>
                                    </table>
                              </form>
                        </td>
                        <td>
                              <table style="background-color: #F4F4F4; border: 0px" cellspacing="0" cellpadding="5" width="480">
                                    <tr>
                                          <td>
                                                <b>.::Instructions::.</b><br />
                                                + In this staff interface, you are to assign XML file(s) to your preferred XSL file (stylesheet).<br />
                                                + Click on the items in the <b>XML</b> dropdown list/the preview icon (<img src="previewiconimage.gif" alt="preview icon" />) to see an annotated source preview (right top) of the XML file.<br />
                                                + Click on the items in the <b>XSL</b> dropdown list to see a thumbnail preview (right middle bottom) of the stylesheet.<br />
                                                + Click on the <b>Preview XML</b> button to see full real preview of the stylesheet you've applied to the XML file without saving.<br />
                                                + Click on the <b>Save Settings</b> button to save the changes to the selected XML file.
                                          </td>
                                    </tr>
                              </table>
                              <br />
                              <form style="margin: 0px;" id="selection" name="selection" method="post" action="savexml.asp">
                                    <table style="background-color: #F4F4F4; border: 0px" cellspacing="0" cellpadding="5" width="480">
                                          <tr>
                                                <td style="font-weight: bold" colspan="4">
                                                      .::CONTENT XML data::.
                                                </td>
                                          </tr>
                                          <tr>
                                                <td style="font: 8pt Verdana, sans-serif; color: black" width="100">
                                                      XML File<br />
                                                      <% Call CreateSelect("/MyProj/xmldata", 2) %>
                                                </td>
                                                <td style="font: 8pt Verdana, sans-serif; color: black" width="100%">
                                                      XSL Stylesheet<br />
                                                      <select id="xslfileid2" name="xslfileid" size="1" onclick="previewxmlthumbnails(this.options[this.selectedIndex].value)">
                                                            <option value="/MyProj/xmldata/xsl/aflooding.xsl" selected="selected">Normal Style(No Pics)</option>
                                                            <option value="/MyProj/xmldata/xsl/afloodingtmp2.xsl">Normal Style 2</option>
                                                            <option value="/MyProj/xmldata/xsl/afloodingtmp3.xsl">Special Style</option>
                                                            <option value="/MyProj/xmldata/xsl/plaintext.xsl">Plain Text Only</option>
                                                      </select>
                                                </td>
                                                <td style="text-align: center" width="80" nowrap="nowrap"><input type="image" src="savesettingsbutton.gif" id="btnSubmit1" name="btnSubmit" value="Save Settings" /></td>
                                                <td style="text-align: center" width="80" nowrap="nowrap"><input type="image" src="previewbutton.gif" id="button1" name="button" value="Preview XML with selected Stylesheet" onclick="transformxml()" /></td>
                                          </tr>
                                    </table>
                              </form>
                              <form style="margin: 0px;" id="selection2" name="selection2" method="post" action="savexml.asp">
                                    <table style="background-color: #F4F4F4; border: 0px" cellspacing="0" cellpadding="5" width="480">
                                          <tr>
                                                <td style="font-weight: bold" colspan="4">
                                                      .::CONTENT XML data (w/ Flash)::.
                                                </td>
                                          </tr>
                                          <tr>
                                                <td style="font: 8pt Verdana, sans-serif; color: black" width="100">
                                                      XML File (w/ Flash)<br />
                                                      <% Call CreateSelect("/MyProj/xmldata/flash", 3) %>
                                                </td>
                                                <td style="font: 8pt Verdana, sans-serif; color: black" width="100%">
                                                      XSL Stylesheet<br />
                                                      <select id="xslfileid3" name="xslfileid" size="1" onclick="previewxmlthumbnails(this.options[this.selectedIndex].value)">
                                                            <option value="/MyProj/xmldata/xsl/flash1.xsl" selected="selected">Flash only Style 1</option>
                                                            <option value="/MyProj/xmldata/xsl/flash2.xsl">Flash only Plain Style</option>
                                                            <option value="/MyProj/xmldata/xsl/flash3.xsl">Flash only Special Style</option>
                                                      </select>
                                                </td>
                                                <td style="text-align: center" width="80" nowrap="nowrap"><input type="image" src="savesettingsbutton.gif" id="btnSubmit2" name="btnSubmit" value="Save Settings" /></td>
                                                <td style="text-align: center" width="80" nowrap="nowrap"><input type="image" src="previewbutton.gif" id="button2" name="button" value="Preview XML with selected Stylesheet" onclick="transformxmlflash()" /></td>
                                          </tr>
                                    </table>
                              </form>
                              <br />
                              <br />
                              <form style="margin: 0px;" id="selection4" name="selection4" method="post" action="savexml.asp">
                                    <input type="hidden" id="xmlfileid4" name="xmlfileid" value="/MyProj/DEFAULT/left.xml" />
                                    <table style="background-color: #F4F4F4; border: 0px" cellspacing="0" cellpadding="5" width="480">
                                          <tr>
                                                <td style="font-weight: bold" colspan="4">
                                                      .::Output Pages::.
                                                </td>
                                          </tr>
                                          <tr>
                                                <td style="font: bold 8pt Verdana, sans-serif; color: black" width="100" nowrap="nowrap">
                                                      <a href="javascript:showpreview_brief(document.selection4.xmlfileid.value)"><img src="previewiconimage.gif" border="0" alt="source preview" align="middle" /></a>
                                                      Left.XML
                                                </td>
                                                <td style="font: 8pt Verdana, sans-serif; color: black" width="100%">
                                                      XSL Stylesheet<br />
                                                      <select id="xslfileid4" name="xslfileid" size="1">
                                                            <option value="/MyProj/DEFAULT/left.xsl" selected="selected">Default Style</option>
                                                            <option value="/MyProj/DEFAULT/darkgray.xsl">DarkGray Style</option>
                                                            <option value="/MyProj/DEFAULT/orangegold.xsl">DarkOrange Style</option>
                                                            <option value="/MyProj/DEFAULT/violet.xsl">Violet Style</option>
                                                      </select>
                                                </td>
                                                <td style="text-align: center" width="80" nowrap="nowrap"><input type="image" src="savesettingsbutton.gif" id="btnSubmit3" name="btnSubmit" value="Save Settings" /></td>
                                                <td style="text-align: center" width="80" nowrap="nowrap"><input type="image" src="previewbutton.gif" id="button3" name="button" value="Preview XML with selected Stylesheet" onclick="transformxmloutput_1()" /></td>
                                          </tr>
                                    </table>
                              </form>
                              <form style="margin: 0px;" id="selection5" name="selection5" method="post" action="savexml.asp">
                                    <input type="hidden" id="xmlfileid5" name="xmlfileid" value="/MyProj/DEFAULT/home.xml" />
                                    <table style="background-color: #F4F4F4; border: 0px" cellspacing="0" cellpadding="5" width="480">
                                          <tr>
                                                <td style="font: bold 8pt Verdana, sans-serif; color: black" width="100" nowrap="nowrap">
                                                      <a href="javascript:showpreview_brief(document.selection5.xmlfileid.value)"><img src="previewiconimage.gif" border="0" alt="source preview" align="middle" /></a>
                                                      Home.XML
                                                </td>
                                                <td style="font: 8pt Verdana, sans-serif; color: black" width="100%">
                                                      XSL Stylesheet<br />
                                                      <select id="xslfileid5" name="xslfileid" size="1">
                                                            <option value="/MyProj/DEFAULT/home.xsl" selected="selected">3 Frames Vertical</option>
                                                            <option value="/MyProj/DEFAULT/home2.xsl">3 Frames Horizontal</option>
                                                            <option value="/MyProj/DEFAULT/home3.xsl">2 Frames Vertical</option>
                                                      </select>
                                                </td>
                                                <td style="text-align: center" width="80" nowrap="nowrap"><input type="image" src="savesettingsbutton.gif" id="btnSubmit4" name="btnSubmit" value="Save Settings" /></td>
                                                <td style="text-align: center" width="80" nowrap="nowrap"><input type="image" src="previewbutton.gif" id="button4" name="button" value="Preview XML with selected Stylesheet" onclick="transformxmloutput_2()" /></td>
                                          </tr>
                                    </table>
                              </form>
                              <form style="margin: 0px;" id="selection6" name="selection6" method="post" action="savexml.asp">
                                    <input type="hidden" id="xmlfileid6" name="xmlfileid" value="/MyProj/DEFAULT/center.xml" />
                                    <table style="background-color: #F4F4F4; border: 0px" cellspacing="0" cellpadding="5" width="480">
                                          <tr>
                                                <td style="font: bold 8pt Verdana, sans-serif; color: black" width="100" nowrap="nowrap">
                                                      <a href="javascript:showpreview_brief(document.selection6.xmlfileid.value)"><img src="previewiconimage.gif" border="0" alt="source preview" align="middle" /></a>
                                                      Center.XML
                                                </td>
                                                <td style="font: 8pt Verdana, sans-serif; color: black" width="100%">
                                                      XSL Stylesheet<br />
                                                      <select id="xslfileid6" name="xslfileid" size="1">
                                                            <option value="/MyProj/DEFAULT/center.xsl" selected="selected">Default</option>
                                                            <option value="/MyProj/DEFAULT/cstyle2.xsl">Style2</option>
                                                            <option value="/MyProj/DEFAULT/cstyle3.xsl">OrangeGold</option>
                                                      </select>
                                                </td>
                                                <td style="text-align: center" width="80" nowrap="nowrap"><input type="image" src="savesettingsbutton.gif" id="btnSubmit5" name="btnSubmit" value="Save Settings" /></td>
                                                <td style="text-align: center" width="80" nowrap="nowrap"><input type="image" src="previewbutton.gif" id="button5" name="button" value="Preview XML with selected Stylesheet" onclick="transformxmloutput_3()" /></td>
                                          </tr>
                                    </table>
                              </form>
                              <form style="margin: 0px;" id="selection7" name="selection7" method="post" action="savexml.asp">
                                    <input type="hidden" id="xmlfileid7" name="xmlfileid" value="/MyProj/DEFAULT/right.xml" />
                                    <table style="background-color: #F4F4F4; border: 0px" cellspacing="0" cellpadding="5" width="480">
                                          <tr>
                                                <td style="font: bold 8pt Verdana, sans-serif; color: black" width="100" nowrap="nowrap">
                                                      <a href="javascript:showpreview_brief(document.selection7.xmlfileid.value)"><img src="previewiconimage.gif" border="0" alt="source preview" align="middle" /></a>
                                                      Right.XML
                                                </td>
                                                <td style="font: 8pt Verdana, sans-serif; color: black" width="100%">
                                                      XSL Stylesheet<br />
                                                      <select id="xslfileid7" name="xslfileid" size="1">
                                                            <option value="/MyProj/DEFAULT/right.xsl" selected="selected">Default</option>
                                                            <option value="/MyProj/DEFAULT/rstyle2.xsl">Style2</option>
                                                            <option value="/MyProj/DEFAULT/rstyle3.xsl">Orange Gold</option>
                                                      </select><br />
                                                      for 3 frame only
                                                </td>
                                                <td style="text-align: center" width="80" nowrap="nowrap"><input type="image" src="savesettingsbutton.gif" id="btnSubmit6" name="btnSubmit" value="Save Settings" /></td>
                                                <td style="text-align: center" width="80" nowrap="nowrap"><input type="image" src="previewbutton.gif" id="button6" name="button" value="Preview XML with selected Stylesheet" onclick="transformxmloutput_4()" /></td>
                                          </tr>
                                    </table>
                              </form>
                              <br />
                              <br />
                              <table style="background-color: #F4F4F4; border: 0px" cellspacing="0" cellpadding="5" width="480">
                                    <tr>
                                          <td style="text-align: center; font-weight: bold">
                                                To view overall output after changes are made, please click on the button:<br />
                                                <input type="image" src="voutputbutton.gif" id="button7" name="button" value="View Output" onclick="window.open('default/home.xml', '')" />
                                          </td>
                                    </tr>
                              </table>
                        </td>
                  </tr>
            </table>
      </body>
</html>

==========================================================

PLEASE let me know if it works this time! I am keeping my fingers crossed! If it works, I think I deserve a little bit more than 75 points for this question! ;-)

gator4life
(chomp, chomp)
0
 

Author Comment

by:joe851
ID: 8215805
I will try out this code and get back to you. I would like to give you 50 points more because that's all I have to give. I sincerly wish I could give you a lot more, due to the help you've rendered.


0
 

Author Comment

by:joe851
ID: 8215816
Gator-
IT WORKS EXCELLENT JOB!!!

Please tell me how I can award the extra 50 points I have in the bag to you. You deserve much more than this...

Would you like me to ask another simple question and you answer it?

THANK YOU VERY MUCH!!!

Joash
0
 
LVL 5

Expert Comment

by:gator4life
ID: 8215979
Joash -

I was just kidding about the points.  You really don't need to give me any more.  It's just good to know that we finally solved this thing!!  However, if you really feel that you absolutely need to give me more points, you don't even need to open another question.  Before you close out this question, I think you can just use the menu in the upper-left corner of this page to edit the number of points for this question.  I'm not sure about this, since I've never asked a question before.  Anyways, it's been very nice working with you, and I am so sorry that I couldn't figure this thing out for you sooner.  Best of luck to you on your project.  I'll be looking out for you on the boards if you ever need help again.

Cheers,
gator4life
(chomp, chomp)
0
 

Author Comment

by:joe851
ID: 8222803
Gator-
Sorry I seem to have another problem. Could you please help me out with it. You totally deserve the points and I would really like to give it to you but when i clicked on Edit Question, I get this error message:

An error has occurred:
 • This question may no longer be editted or deleted.

Do you think you can help me solve this. Also I'd like to keep in touch with you if you don't mind. My icq is 110859988. Do drop me a message and I'll get back to you.

If I have to open up another question, I WILL DO THAT but you deserve the points!!
0
 
LVL 5

Expert Comment

by:gator4life
ID: 8223202
Joash -

I guess you can't change things about the question after a certain period of time.  Like I said, I never asked a question before, so it was a guess! ;-)

I would be more than happy to help you out with your problem.  However, I don't use ICQ.  Would you mind using email?  If not, you can contact me at gator4life@cinci.rr.com, and I will be able to get back to you quicker.

That being said, why don't you go ahead and close this question, so it will clear itself off the question list.  Then, we can work through email or whatever, and if I solve another problem for you, then you can just post a new question with the "Points for gator4life" subject.

Does that sound OK?

Talk to you soon,
gator4life
(chomp, chomp)
0
 

Author Comment

by:joe851
ID: 8229203
Gator4life did an EXCELLENT and crucial job for me which I would very much like to write this short note in appreciation.

A true expert in XML, ASP, VBScript.... You're lucky if he takes yor question!!!

Thanks Gator and God Bless your marriage!!

-Joash
0

Featured Post

Get MySQL database support online, now!

At Percona’s web store you can order your MySQL database support needs in minutes. No hassles, no fuss, just pick and click. Pay online with a credit card.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Color can increase conversions, create feelings of warmth or even incite people to get behind a cause. If you want your website to really impact site visitors, then it is vital to consider the impact color has on them.
Australian government abolished Visa 457 earlier this April and this article describes how this decision might affect Australian IT scene and IT experts.
This tutorial demonstrates how to identify and create boundary or building outlines in Google Maps. In this example, I outline the boundaries of an enclosed skatepark within a community park.  Login to your Google Account, then  Google for "Google M…
The is a quite short video tutorial. In this video, I'm going to show you how to create self-host WordPress blog with free hosting service.
Suggested Courses

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question