Click to See Complete Forum and Search --> : javascript/client/server errors


Candy
11-07-2001, 12:49 PM
Hi,

I have the following code and it doesn't work. I have tried changing everything
and it is so frustrating. :( If anyone can spot the problem it would be greatly
appreciated.

<%
'language on server vbscript
dim tempstring
tempstring = objtostr(objDom)'this is a long string of over 1000 characters
dim a
dim b
dim c
dim d
dim e
dim f
dim g
dim h
dim i
dim j
'the point of the following is to break down the tempstring to smaller strings
of 200 so the client can work with it (i've read somewhere)
a = mid(tempstring,1,200)
b = mid(tempstring,201,200)
c = mid(tempstring,401,200)
d = mid(tempstring,601,200)
e = mid(tempstring,801,200)
f = mid(tempstring,1001,200)
g = mid(tempstring,1201,200)
h = mid(tempstring,1401,200)
i = mid(tempstring,1601,200)
j = mid(tempstring,1801,200)


'Response.write a
'Response.Write len(tempstring)


%>
<html><head></head><body><pre><code>
<div align="center"><b><font face="Geneva, Arial, Helvetica, san-serif" size="5">UBC
MetaData Generator</font></b></div>
<form name="metadataform">
<textarea name="metadatatext" cols="100" rows="30" wrap="virtual">

</textarea>
</form>

<SCRIPT language='JavaScript'>
//var tempstring = "<%= tempstring %>"
var a = "<%= a %>"
var b = "<%= b %>"
var c = "<%= c %>"
var d = "<%= d %>"
var e = "<%= e %>"
var f = "<%= f %>"
var g = "<%= g %>"
var h = "<%= h %>"
var i = "<%= i %>"
var j = "<%= j %>"
document.metadataform.metadatatext.value = "<?xml version='1.0'?>\r\n" +
a+b+c+d+e+f+g+h+i+j
</SCRIPT>

I have obtained the value of a and cut and pasted it directly into the text
box and it worked. but if i try this it doesn't.

Thanks in Advance,

Candy