Announcement

Do not use the forums to submit bug reports, feature requests or patches, submit a New Ticket instead.

#1 2006-04-13 08:48:12

Koene
New member
Registered: 2006-03-29
Posts: 4

Xinha deletes code !!!!

I have an home.htm webpage. I load the webpage into Xinha like this:

<textarea id="content1" name="content1" cols="67" rows="40">
<%
dim strsite
strsite = rstsites.Fields("link")

Const fsoForReading = 1

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

'Open the text file
Dim objTextStream
Set objTextStream = objFSO.OpenTextFile(strsite, fsoForReading)

'Display the contents of the text file
Response.Write objTextStream.ReadAll

'Close the file and clean up
objTextStream.Close
Set objTextStream = Nothing
Set objFSO = Nothing


%>
</textarea>

This works perfect! strsite just opens the link in the database that refers to the weppage, strsite = home.htm

Xinha opens the webpage and I can edit the webpage perfectly, so now I want to write the edited file, like this:

<input type="submit" value="Aanpassen" id=submit1 name=submit1>
<%
if request.form("submit1") = "Aanpassen" then
dim strcontent
strcontent = request.form("content1")

Const fsoForWriting = 2

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

'Open the text file
Dim objTextStream2
Set objTextStream2 = objFSO2.OpenTextFile(strsite, fsoForWriting, True)

'Display the contents of the text file
objTextStream2.WriteLine strcontent

'Close the file and clean up
objTextStream2.Close
Set objTextStream2 = Nothing
Set objFSO2 = Nothing
end if


%>

This works, but Xinha deletes some code!!!! All the tables, and html + javascript code is still there, but al the things like <head> ..... </head> <title> .... </title> is gone!! Xinha didn't write that. How come? The edited file home.htm is now fucked up because there is no code anymore that sais he needs to load a .css file etc...

Is this normal? That Xinha reads the <head> but when Xinha writes she forgets the <head> etc..?

Is there a solution? Thx...

Offline

#2 2006-04-13 10:36:58

ray
Xinha Administrator
From: Germany
Registered: 2005-03-23
Posts: 521
Website

Re: Xinha deletes code !!!!

Have you you configured Xinha to be in fullpage mode by the FullPage plugin or config.fullPage? Otherwise Xinha cannot handle the <head> section

Offline

#3 2006-04-13 10:50:25

Koene
New member
Registered: 2006-03-29
Posts: 4

Re: Xinha deletes code !!!!

No, I didn't know this existed. Where do I need to set config.fullPage=true ?

nvm, it's working now! Thanks!!!

Last edited by Koene (2006-04-13 10:59:12)

Offline

Board footer

Powered by FluxBB