Hello, I have a multi-frame page. The frames are named Frame_1, Frame_2 and Frame_3. Frame_1 has a drop down box. When a value is selected in this drop down box, Frame_2 is updated using an asp file (as I have to read from a back-end access database). In turn in the asp file, I have a Body onload tag to execute a javascript function within Frame_2. this function updates the contents of Frame_3. Till now this is working fine. Here is the problem. Frame_3 has a form with a radio button. When a radio button is selected, I want that a function be executed in Frame_3. However since content of Frame_3 is updated using "window.parent.Frame_3.document.writeln(", I cannot include "<Script language="javascript" etc within the text of the window.parent. etc because Script within a script is not allowed. Any suggestions on how to overcome this? Thanks in advance. U
u0107@usa.net said the following on 1/10/2007 1:25 AM: > Hello, > > I have a multi-frame page. The frames are named Frame_1, Frame_2 and > Frame_3. > > Frame_1 has a drop down box. When a value is selected in this drop > down box, Frame_2 is updated using an asp file (as I have to read from > a back-end access database). > > In turn in the asp file, I have a Body onload tag to execute a > javascript function within Frame_2. this function updates the contents > of Frame_3. > > Till now this is working fine. > > Here is the problem. Frame_3 has a form with a radio button. When a > radio button is selected, I want that a function be executed in > Frame_3. > > However since content of Frame_3 is updated using > "window.parent.Frame_3.document.writeln(", I cannot include "<Script > language="javascript" etc within the text of the window.parent. etc > because Script within a script is not allowed. > Any suggestions on how to overcome this? document.write('<\/script>') instead of document.write('</script>') -- Randy Chance Favors The Prepared Mind comp.lang.javascript FAQ - http://jibbering.com/faq/index.html Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
![]() |
-1 |
![]() |
This is the exact error that I get: Active Server Pages, ASP 0138 (0x80004005) A script block cannot be placed inside another script block ....2.asp, line 255 And Line 255 is response.write " window.parent.Frame_No_33.document.writeln(" & quote & "<script language=.... I tried defining two variables lt = chr(60) and gt = chr(62) which are respectively the less than (<) and the greater than (>) signs and replaced the "<" in "<script...". Still that did not work. I tried your suggested solution but that did not work. Appreciate other solutions. thanks in advance Randy Webb wrote: > u0107@usa.net said the following on 1/10/2007 1:25 AM: > > Hello, > > > > I have a multi-frame page. The frames are named Frame_1, Frame_2 and > > Frame_3. > > > > Frame_1 has a drop down box. When a value is selected in this drop > > down box, Frame_2 is updated using an asp file (as I have to read from > > a back-end access database). > > > > In turn in the asp file, I have a Body onload tag to execute a > > javascript function within Frame_2. this function updates the contents > > of Frame_3. > > > > Till now this is working fine. > > > > Here is the problem. Frame_3 has a form with a radio button. When a > > radio button is selected, I want that a function be executed in > > Frame_3. > > > > However since content of Frame_3 is updated using > > "window.parent.Frame_3.document.writeln(", I cannot include "<Script > > language="javascript" etc within the text of the window.parent. etc > > because Script within a script is not allowed. > > Any suggestions on how to overcome this? > > document.write('<\/script>') instead of document.write('</script>') > > -- > Randy > Chance Favors The Prepared Mind > comp.lang.javascript FAQ - http://jibbering.com/faq/index.html > Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
![]() |
1 |
![]() |
u0107@usa.net wrote: > This is the exact error that I get: > > Active Server Pages, ASP 0138 (0x80004005) > A script block cannot be placed inside another script block > > ...2.asp, line 255 > > And Line 255 is > > response.write " > window.parent.Frame_No_33.document.writeln(" & quote & "<script > language=.... Hi, Not sure, but I solved a similar problem once like this: Dim str str = "window.parent.Frame_No_33.document.writeln('<scrip"; str=str& "t language=...>" response.write str If you break on the script-word I might work. Regards, Erwin Moller > > I tried defining two variables lt = chr(60) and gt = chr(62) which are > respectively the less than (<) and the greater than (>) signs and > replaced the "<" in "<script...". > > Still that did not work. > > I tried your suggested solution but that did not work. > > Appreciate other solutions. > > thanks in advance > > > > Randy Webb wrote: >> u0107@usa.net said the following on 1/10/2007 1:25 AM: >> > Hello, >> > >> > I have a multi-frame page. The frames are named Frame_1, Frame_2 and >> > Frame_3. >> > >> > Frame_1 has a drop down box. When a value is selected in this drop >> > down box, Frame_2 is updated using an asp file (as I have to read from >> > a back-end access database). >> > >> > In turn in the asp file, I have a Body onload tag to execute a >> > javascript function within Frame_2. this function updates the contents >> > of Frame_3. >> > >> > Till now this is working fine. >> > >> > Here is the problem. Frame_3 has a form with a radio button. When a >> > radio button is selected, I want that a function be executed in >> > Frame_3. >> > >> > However since content of Frame_3 is updated using >> > "window.parent.Frame_3.document.writeln(", I cannot include "<Script >> > language="javascript" etc within the text of the window.parent. etc >> > because Script within a script is not allowed. >> > Any suggestions on how to overcome this? >> >> document.write('<\/script>') instead of document.write('</script>') >> >> -- >> Randy >> Chance Favors The Prepared Mind >> comp.lang.javascript FAQ - http://jibbering.com/faq/index.html >> Javascript Best Practices - >> http://www.JavascriptToolbox.com/bestpractices/
![]() |
0 |
![]() |