Dynamic client side script reload problem in IE6

Results 1 to 2 of 2

Thread: Dynamic client side script reload problem in IE6

  1. #1
    Join Date
    Dec 1969

    Default Dynamic client side script reload problem in IE6

    I&#039;m using the method where you can assign the source of a client side script block dynamically to point to an asp page. This allows you to execute server side script requests within client side script. This method worked fine in earlier versions of IE, but IE 6 gives problems when you try and assign more than one source location (asp page) to the same script block within client side script. IE 6 will execute the first script, but not the ones thereafter.<BR><BR>The samples are very simplified, just to get the point across, but normally you would do some code to do queries to a database and return the results.<BR>Some sample code for client side page<BR><BR>&#060;script language="vbscript" id="dynscript"&#062;&#060;/script&#062;<BR><BR>&#060;script language="vbscript"&#062;<BR>Function Testscript1()<BR> document.all.dynscript.src = "firstasppage.asp?myvar=test1"<BR>End Function<BR><BR>Function OnReceiveTestscript1()<BR> msgbox answer1<BR> Call Testscript2()<BR>End Function<BR><BR>Function Testscript2()<BR> document.all.dynscript.src = "secondasppage.asp?myvar=test2"<BR>End Function<BR><BR>Function OnReceiveTestscript2()<BR> msgbox answer2<BR>End Function<BR>&#060;/script&#062;<BR><BR><BR>Code for firstasppage.asp<BR>&#060;%<BR>Dim myvar<BR> myvar = Trim(Request("myvar"))<BR>%&#062;<BR><BR>answer1 = "&#060;%=myvar%&#062;"<BR>OnReceiveTestscript1()<B R><BR>Code for secondasppage.asp<BR>&#060;%<BR>Dim myvar<BR> myvar = Trim(Request("myvar"))<BR>%&#062;<BR><BR>answer2 = "&#060;%=myvar%&#062;"<BR>OnReceiveTestscript2()<B R><BR><BR>My problem is that it calls the first page but not the second, even though there are no errors. As I mentioned it works fine in earlier versions of IE. If I create two empty script blocks and assign the source of the first to one asp page and the source of the second to the other asp page, it works fine.<BR><BR>Any ideas why?

  2. #2
    Join Date
    Dec 1969

    Default RE: Dynamic client side script reload problem in I

    No idea why that code isn&#039;t working for IE6.<BR><BR>There is an excellent resource here:<BR><BR>http://www.ashleyit.com/rs/jsrs/test.htm<BR><BR>and also here:<BR><BR>http://developer.apple.com/internet/javascript/iframe.html<BR><BR>I think that the best way for you to accomplish this task is to use remote scripting with Javascript and iFrames. Its a proven method, and there is a wedge of resources available.<BR><BR>(If only someone had pointed them out to me I wouldn&#039;t have had the need to write my own!)<BR><BR>Stu Cam<BR><BR>slc@od2.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts