using asp var in "insertAdjacentHtml" 
Author Message
 using asp var in "insertAdjacentHtml"

hi,

i'm reading  data to string with asp from db.And  i want to write this
string with
"insertAdjacentHtml()" method to page.But this method does not works while
page is loading.how can i handle this problem.

algorithm:
<%
do
        stringVal = rstemp("tableField")
        jsFunction()

until end of records
%>

...
<script lang = js ..>

function jsFunction(){

        document.body.insertAdjacentHtml("BeforeEnd",stringVal);

Quote:
}

</script>

thanks For Helps...tunaFish -newbie-



Thu, 15 Jan 2004 23:13:48 GMT  
 using asp var in "insertAdjacentHtml"

Quote:
>     document.body.insertAdjacentHtml("BeforeEnd",stringVal);

Should be:

document.body.insertAdjacentHtml("BeforeEnd","<%=stringVal%>");

www.aspfaq.com



Thu, 15 Jan 2004 23:24:56 GMT  
 using asp var in "insertAdjacentHtml"
thanks...
but i tried it before.but it did not work.
gives same error."type mistmach error"?


Thu, 15 Jan 2004 23:37:18 GMT  
 using asp var in "insertAdjacentHtml"
Can't help unless I know what's in stringVal and can see the exact code
you're trying to run.


Quote:
> thanks...
> but i tried it before.but it did not work.
> gives same error."type mistmach error"?



Thu, 15 Jan 2004 23:50:00 GMT  
 using asp var in "insertAdjacentHtml"
i should give details of stringVal variable.
im trying to write asp chat program.this stringVal variable contains users
messages.mean it contains pure messages not html tags.
if I use insertAdjacentText() and if i call this function like
<Body onload = "jsFunction()">.it works.
But i need to insertAdjacentHtml() to format messages on screen.

mm..i handled it now..what a stupid fault.

not use insertAdjacentHtml()

i must use insertAdjacentHTML()  oh no..

and function must be called like <Body onload = "jsFunction()">.

thanks...



Fri, 16 Jan 2004 00:08:55 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Disabling "BACK"/"FORWARD" buttons

2. CreateObject("Excel","//server"), MsgBox output

3. Problem With "window.showmodaldialog("")"

4. Disabling "BACK"/"FORWARD" buttons

5. ADO querry using "ADsDSOObject" in VBScript

6. A "simple" ASP page

7. Using the "Like" operator

8. invalidfileaccess using "file"

9. email help, using "open()"

10. problem using "pbmtolps"--blank lines

11. Trouble Using "Scripting.FileSystemObject"

12. Using "Edit With" from VBScript

 

 
Powered by phpBB® Forum Software