akalmani
asked on
How do I display script samples in HTML pages
How do I display a sample script files in a HTML page.
Like for example I have the follow script code in a sample.wsf file. I would like to give a hyperlink to the sample.wsf file
Here is the code of the sample.wsf file
<job id="AdministrationInterfac e">
<?job debug="true"?>
<script language="VBScript" src="..\\Common\\tss_value s.vbs"/>
<script language="VBScript" src="..\\Common\\HelperFun c.vbs"/>
<script language="VBScript">
On Error Resume Next
'Create Context Object
WScript.Echo "Create Context Object"
</script>
</job>
When I create a HTML page and try to give an hyperlink to this sample.wsf file it does not open I get a blank screen. Any way to get out of this problem ?
Like for example I have the follow script code in a sample.wsf file. I would like to give a hyperlink to the sample.wsf file
Here is the code of the sample.wsf file
<job id="AdministrationInterfac
<?job debug="true"?>
<script language="VBScript" src="..\\Common\\tss_value
<script language="VBScript" src="..\\Common\\HelperFun
<script language="VBScript">
On Error Resume Next
'Create Context Object
WScript.Echo "Create Context Object"
</script>
</job>
When I create a HTML page and try to give an hyperlink to this sample.wsf file it does not open I get a blank screen. Any way to get out of this problem ?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I'm pretty sure the <script> tag would still be recognised by the browser, hence not showing up on the page.
might be wrong!
might be wrong!
Actually you are correct Easy (many apologies to all has been a hard morning)
Try a text area instead.
<TEXTAREA COLS=60 ROWS=20>
<job id="AdministrationInterfac e">
<?job debug="true"?>
<script language="VBScript" src="..\\Common\\tss_value s.vbs"/>
<script language="VBScript" src="..\\Common\\HelperFun c.vbs"/>
<script language="VBScript">
On Error Resume Next
'Create Context Object
WScript.Echo "Create Context Object"
</script>
</job>
</TEXTAREA>
There are more complex ways such as replacing all html specific charachters (<,>,",' etc) with ascii codes but normally this is not necessary.
Try a text area instead.
<TEXTAREA COLS=60 ROWS=20>
<job id="AdministrationInterfac
<?job debug="true"?>
<script language="VBScript" src="..\\Common\\tss_value
<script language="VBScript" src="..\\Common\\HelperFun
<script language="VBScript">
On Error Resume Next
'Create Context Object
WScript.Echo "Create Context Object"
</script>
</job>
</TEXTAREA>
There are more complex ways such as replacing all html specific charachters (<,>,",' etc) with ascii codes but normally this is not necessary.
ASKER
Hi,
After posting this question I got the answer myself. But I viewed the answer today. Yes ur answer is right.
Great thanks a lot !!
Avinash
After posting this question I got the answer myself. But I viewed the answer today. Yes ur answer is right.
Great thanks a lot !!
Avinash
<PRE>
<job id="AdministrationInterfac
<?job debug="true"?>
<script language="VBScript" src="..\\Common\\tss_value
<script language="VBScript" src="..\\Common\\HelperFun
<script language="VBScript">
On Error Resume Next
'Create Context Object
WScript.Echo "Create Context Object"
</script>
</job>
</PRE>
I wouldnt bother with the linking directly to the file, it is messy and not necessary when you could just do as above.