Print Page | Close Window

page won’t post data after selecting imag

Printed From: Web Wiz Forums
Category: Web Wiz Web App Support Forums
Forum Name: Web Wiz Rich Text Editor (RTE)
Forum Description: Support forum for the Web Wiz Rich Text Editor (RTE).
URL: https://forums.webwiz.net/forum_posts.asp?TID=15142
Printed Date: 29 March 2026 at 4:41am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: page won’t post data after selecting imag
Posted By: dica
Subject: page won’t post data after selecting imag
Date Posted: 18 May 2005 at 3:45pm

if i use the pop up window to select an image and click 'OK', the pop up window writes some javascript which seems to be screwing up the parent window's ability to post the data. once i click 'OK' in the pop image selection window, the pop up closes, but if i try to post the parent window's content, it just times out. furthermore, if i select an image from the pop up window and click OK, i can't even refresh the parent window (same problem - IE just won't reload the page). i've tried commenting out this section of code in RTE_popup_adv_image.asp:

If blnInsertImage Then
' Response.Write(vbCrLf & vbCrLf & " editor = window.opener.document.getElementById('WebWizRTE');")
' Response.Write(vbCrLf & vbCrLf & " img = editor.contentWindow.document.createElement('img');")  'Tell that we are an image

' Response.Write(vbCrLf & vbCrLf & " img.setAttribute('src', '" & strImageURL & "');")  'Set image attributes
' Response.Write(vbCrLf & " img.setAttribute('border', '" & intBorder & "');")
' If strImageAltText <> "" Then Response.Write(vbCrLf & " img.setAttribute('alt', '" & strImageAltText & "');")
' If lngHorizontal <> "" Then Response.Write(vbCrLf & " img.setAttribute('hspace', '" & lngHorizontal & "');")
' If intWidth <> "" Then Response.Write(vbCrLf & " img.setAttribute('width', '" & intWidth & "');")
' If intHeight <> "" Then Response.Write(vbCrLf & " img.setAttribute('height', '" & intHeight & "');")
' If lngVerical <> "" Then Response.Write(vbCrLf & " img.setAttribute('vspace', '" & lngVerical & "');")
' If strAlign <> "" Then Response.Write(vbCrLf & " img.setAttribute('align', '" & strAlign & "');")
'    
' If RTEenabled = "Gecko" Then        'If this is Mozilla then we need to call insertElementPosition to find where to place the image
'  Response.Write(vbCrLf & vbCrLf & " try{" & _
'     vbCrLf & "  insertElementPosition(editor.contentWindow, img);" & _
'     vbCrLf & " }catch(exception){" & _
'     vbCrLf & "  alert('" & strTxtErrorInsertingObject & "');" & _
'     vbCrLf & "  editor.contentWindow.focus();" & _
'     vbCrLf & " }")
' Else  'Else this is IE so placing the image is simpler
'  Response.Write(vbCrLf & vbCrLf & " try{" & _
'     vbCrLf & "  editor.contentWindow.focus();" & _
'     vbCrLf & "  editor.contentWindow.document.selection.createRange().pasteHTML(img.outerHTML);" & _
'     vbCrLf & " }catch(exception){" & _
'     vbCrLf & "  alert('" & strTxtErrorInsertingObject & "');" & _
'     vbCrLf & "  editor.contentWindow.focus();" & _
'     vbCrLf & " }")
' End If
'  
' Response.Write(vbCrLf & vbCrLf & " editor.contentWindow.focus();")  'Set focus
 Response.Write(vbCrLf & " window.close();")  'Close window
End If
 
as you can see, the only line of code left uncommented is the very last response.write to self close the pop up, but even this line will cause the parent window to stall out.
 
i'm on win2000 pro, IE 6.0.28, service pack 4. any ideas?
 
tks
 



Replies:
Posted By: WebWiz-Bruce
Date Posted: 19 May 2005 at 4:23am
This sounds unusual

The only thing I can think is that you have some other software running on your machine which is screwing things up.

Often, programs like, Zone Alarm, Norton, and other firewall, AV, and pop-up blocking software can inject code into pages and prevent web pages from running correctly. Try disabling these types of programs on your machine and see if that resolves the problem.


-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: dica
Date Posted: 19 May 2005 at 2:25pm
it looks like it has something to do with the window.close line. if i comment only this line out, everything else seems to work fine. i'm not sure why this happened. i tested the app on 5 different machines and only had the problem on 1. on the one machine i was having problems, if i booted in safe mode, the app ran fine, so yes, it does look like a third party app had something to do with it, but how exactly i don't know.
 
something i did notice a little odd about the code is that the parent window is given focus and then window.close fires against the pop up. could shifting focus between windows like this cause a problem like the one i had?


Posted By: WebWiz-Bruce
Date Posted: 20 May 2005 at 12:55pm
The window.close is a standard javascript line to close a pop-up window.

The focus line is there so that the RTE area is given focus so you can start writing in the RTE immediatly afterwards, the otherway round it wouldn't fire.


-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net