Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript How-To
| Search | Today's Posts | Mark Forums Read
Javascript How-To Ask your "How do I do this with Javascript?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 21st, 2003, 08:38 AM
Registered User
 
Join Date: Jul 2003
Location: , , .
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default RSEnableRemoteScripting and a period at top of pag

Help!
I am curious as to why a period appears as the first character of a rendered html page when i include the following script block????? What's more, is there anyway to suppress it????

<SCRIPT LANGUAGE=JavaScript>
RSEnableRemoteScripting("../_ScriptLibrary");
</script>


Any help in the matter will be appreciated,

lvinsel

 
Old July 21st, 2003, 10:48 AM
joefawcett's Avatar
Wrox Author
Points: 9,763, Level: 42
Points: 9,763, Level: 42 Points: 9,763, Level: 42 Points: 9,763, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Exeter, , United Kingdom.
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

I've never seen this although I haven't used remote scripting for some time. Are you sure that an extra character hasn't crept into the source?

--

Joe
 
Old July 21st, 2003, 12:33 PM
Registered User
 
Join Date: Jul 2003
Location: , , .
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

That's entirely possible. Perhaps the culprit is the RSEnableRemoteScripting method? I'll check that next.

What i've found is that when i comment out that line of script, the period disappears. It's weird. I have remote scripts in another application and the same thing happens. (btw - this script appears in a html page - not asp).

Thanks for your response.

 
Old July 21st, 2003, 01:53 PM
Registered User
 
Join Date: Jul 2003
Location: , , .
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

thanks for your help...

that line inistantiates an applet with the following line

document.write('<' + 'APPLET name=RSAspProxyApplet codebase=' + codebase + ' code=RSProxy.class height=0 width=0></APPLET>');

I don't have access to RSProxy.class in my installation of ms interdev. (not that i could even read the code there anyway). i guess i could.

any ideas?

 
Old July 21st, 2003, 02:17 PM
Registered User
 
Join Date: Jul 2003
Location: , , .
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

i found it!

as is obvious from my previous post, an applet is instantiated. what is rendered is not a period but the graphic representation of the applet - only really small. i corrected this with the following...

    RSEnableRemoteScripting("../_ScriptLibrary");
    RSAspProxyApplet.style.visibility="hidden";
    RSAspProxyApplet.style.display="none";

the RSEnableRemoteScripting method instantiates the applet whose id=RSAspProxyApplet.

i simply turned off the visibility and display options and the graphic went away!

issue solved...

 
Old July 22nd, 2003, 02:31 AM
joefawcett's Avatar
Wrox Author
Points: 9,763, Level: 42
Points: 9,763, Level: 42 Points: 9,763, Level: 42 Points: 9,763, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Exeter, , United Kingdom.
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

Well I wondered if it might be that but as the width and height aree st to zero it shouldn't show. Why not modify RS.HTM to say:
Code:
document.write('<' + 'APPLET name=RSAspProxyApplet codebase=' + codebase + ' code=RSProxy.class style=\"display:none\" height=0 width=0></APPLET>');
and forget about having to include your extra code?
One of the reasons I stopped using remote scripting was its reliance on Java, with all the different JVMs out there and the Microsoft "will they wont they?" about running it I moved, amongst other things, to a JavaScript only version written by Brent Ashley. It's available from http://www.ashleyit.com/rs/

--

Joe




Similar Threads
Thread Thread Starter Forum Replies Last Post
How to print the /Period/@dateFrom elayaraja.s XSLT 3 July 29th, 2008 04:19 AM
heredoc with period Kevin Tough BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 1 July 3rd, 2007 11:57 AM
how to fill the line with a period-sign grstad HTML Code Clinic 5 June 3rd, 2005 09:41 AM
SELECT TOP n NOT SELECTING TOP n! ibi SQL Language 8 March 30th, 2005 08:08 PM
Calculate time period dtaya Access 1 July 26th, 2003 07:26 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.