Weird question? Two <HTML> sections when XslTransform used?

K

Kathy Burke

Hi, in trying to discover why my RegisterStartUpScript wouldn't work (I
do NOT see it in the HTML source), I looked at the HTML source of a page
where I do an XslTransform.

First, I get the transform results as expected, beginning with <html>
and ending with </html> but then I see the following immediately after
that:

<HTML>
<HEAD>
<title>Work Instruction</title>
<meta name="GENERATOR" content="Microsoft Visual Studio.NET 7.0">
<meta name="CODE_LANGUAGE" content="Visual Basic 7.0">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema"
content="http://schemas.microsoft.com/intellisense/ie5">
</HEAD>
<body MS_POSITIONING="GridLayout">
<form name="Form1" method="post" action="WI.aspx" id="Form1">
<input type="hidden" name="__VIEWSTATE"
value="dDwtMTI3OTMzNDM4NDs7Pn0AD1+1JID+r7cXT86Hd3DoaMxM" />
</form>
</body>
</HTML>

I suspect this is interfering with my startup script but I have no clue
as to why or how?

Any enlightenment welcome!

Thanks, Kathy
 
L

L. L.

Could not totally understand your question. Tried to view the attachment but it was marked as unsafe.
Here is my understanding of the issue,
Both VS.NET and XSLT are generating html tags in the output and thus causing problems. My suggestion is to remove the content(from <html> to </html> inclusive) in the aspx page totally and let xslt do everything.

L.L.
Hi, in trying to discover why my RegisterStartUpScript wouldn't work (I
do NOT see it in the HTML source), I looked at the HTML source of a page
where I do an XslTransform.

First, I get the transform results as expected, beginning with <html>
and ending with </html> but then I see the following immediately after
that:

<HTML>
<HEAD>
<title>Work Instruction</title>
<meta name="GENERATOR" content="Microsoft Visual Studio.NET 7.0">
<meta name="CODE_LANGUAGE" content="Visual Basic 7.0">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema"
content="http://schemas.microsoft.com/intellisense/ie5">
</HEAD>
<body MS_POSITIONING="GridLayout">
<form name="Form1" method="post" action="WI.aspx" id="Form1">
<input type="hidden" name="__VIEWSTATE"
value="dDwtMTI3OTMzNDM4NDs7Pn0AD1+1JID+r7cXT86Hd3DoaMxM" />
</form>
</body>
</HTML>

I suspect this is interfering with my startup script but I have no clue
as to why or how?

Any enlightenment welcome!

Thanks, Kathy
 
A

Alex

Kathy,

I too am having a similar problem - although my script does appear to be working on some machines and not others. I have tried restoring the default settings for the browser, but still nothing.

Would be grateful for any help you might get.

Alex
Hi, in trying to discover why my RegisterStartUpScript wouldn't work (I
do NOT see it in the HTML source), I looked at the HTML source of a page
where I do an XslTransform.

First, I get the transform results as expected, beginning with <html>
and ending with </html> but then I see the following immediately after
that:

<HTML>
<HEAD>
<title>Work Instruction</title>
<meta name="GENERATOR" content="Microsoft Visual Studio.NET 7.0">
<meta name="CODE_LANGUAGE" content="Visual Basic 7.0">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema"
content="http://schemas.microsoft.com/intellisense/ie5">
</HEAD>
<body MS_POSITIONING="GridLayout">
<form name="Form1" method="post" action="WI.aspx" id="Form1">
<input type="hidden" name="__VIEWSTATE"
value="dDwtMTI3OTMzNDM4NDs7Pn0AD1+1JID+r7cXT86Hd3DoaMxM" />
</form>
</body>
</HTML>

I suspect this is interfering with my startup script but I have no clue
as to why or how?

Any enlightenment welcome!

Thanks, Kathy
 
K

Kathy Burke

Alex,

Sorry if this is too obvious, but I've had that happen due to virus
protection and/or Norton Internet Security running on systems...they
also usually have a stop-scripts option, which even when I turned it
off, still has problems until I turned the program itself off.

HTH,

Kathy
 
K

Kathy Burke

Alex, where in the page calling your xslTransform is your
RegisterStartUpScript?

Where is it showing up in that "doule" HTML source?

Thanks,

Kathy
 
A

Alex

Kathy,

Tried turning off the virus protection but that didn't work ?

What I am trying to do is send dynamic parameters to a flash object using a
JavaScript function. This is being called after the page load event, and
seems to work on some machines but not others. There doesn't seem to be any
pattern to browser versions or operating systems as I have tried restoring
the browser defaults, without any joy ?

Very grateful for any more help/advice.

Alex
 
K

Kathy Burke

Alex, does your script simply not fire sometimes?

What parameters are you passing? Are they variable, e.g., text that
changes? Could they sometimes contain unescaped characters (such as
apostrophe) that is killing your script?

Just some thoughts...please post your script and perhaps a sample or two
of the parameters.

Thanks,

Kathy
 
A

Alex

Kathy,

The script always fires on certain machines but never fires on others ? I
know it sounds like browser settings, service packs etc.. but I have looked
into all of this and can't detect any pattern ?

The parameters are complex, simply single digit numbers.

int startpage = int.Parse(Nav.navpage.ToString()); eg. 21

int direction = int.Parse(Nav.navdir.ToString()); eg. 1

string focusScript = "<script language='javascript'>" +

"Form1.myNav.SetVariable('/:newStartFrame'," + startpage + ");" +

"Form1.myNav.SetVariable('/:newDirection'," + direction + ");" +

"</script>";

// Add the JavaScript code to the page.

Page.RegisterClientScriptBlock("FocusScript", focusScript);
 
A

Alex

Kathy,

I am now convinced it is something to do with using SmartNavigation on the
page. It is still a mystery why it works on some machines and not others.
 
K

Kathy Burke

Alex, I hadn't even thought of that...Smart Navigation is definitely
klugy...I turned it off after trying it.

If you need to set scroll for postback, I have a simple javascript I use
that I build right into my xsl.

Let me know if it would help you.

Kathy
 
K

Kathy Burke

Didn't realize I could do that (remove HTML section from the aspx page).
Thanks, I'll give it a try.

Kathy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,906
Latest member
SkinfixSkintag

Latest Threads

Top