Forum Moderators: open
I posted last week about having a new window open up containing links that get added in a textarea in the parent page when they are clicked. I got an idea how to do it and i'm working on it. But i have a different problem now :).
Thing is 5 minutes ago i had a Expected 'End' error. I looked at my code and found i was missing a End if in my if ... else if structure. So i correct it. Problem is that now, wheni load the page, i get nothing at all. It's a blank page. But if i do back in my browser, and then forward again, i get my page, but an old version... I know this is not very well explained and i can't really post my code in here because it's quite long. Anyway, if any of you have ever seen anything like this, please share any ideas...
Thx in advance!
Chart out.
<%@Language="VBScript"%><%response.buffer = true%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="fra">
And here's what I get when I view source :
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html lang="fra">
Any ideas welcome...
Thx!
Chart out.
Here's what i got on msdn about the buffer property :
The Buffer property indicates whether to buffer page output. When page output is buffered, the server does not send a response to the client until all of the server scripts on the current page have been processed, or until the Flush or End method is called.
So would that mean that since there's a script on my page that is only called when I click a link, the client doesn't get any ouput? What's the use of using that property? i'm trying to figure out why the guy before me used this...
Chart out.
I guess what I'm getting at is that it might be helpful to see some trimmed-down code...
<%@Language="VBScript"%><%response.buffer = true%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html lang="fra"><!-- InstanceBegin template="/Templates/page_generale_fr.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<script language="JavaScript">
function choisir(source, output)
{
newwin = window.open(arguments);
if (!newwin.opener) newwin.opener = self;
with (newwin.document)
{
open();
write('<html>');
write('<body>');
*Here I write the contents of my new window. Right now, i got asp in there i.e :
write('<tag><tag><%Asp code here%>')
Can i do this?
close();
}
}
So that's the function.
Here's where i call it :
<a href="javascript:choisir('Charge', 'opener.document.rech.recharge.value');">Choisir</a>
The objective here is to make a textarea with a link aside it that opens this new window. Inside this new window, i will do a sql request to get some info as links so that it gets added to the textarea in the parent window. Maybe this isn't so clear... Anyway, any input is most welcome =D.
Chart out.