Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - page won’t post data after selecting imag
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Forum Lockedpage won’t post data after selecting imag

 Post Reply Post Reply
Author
dica View Drop Down
Newbie
Newbie


Joined: 18 May 2005
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote dica Quote  Post ReplyReply Direct Link To This Post Topic: page won’t post data after selecting imag
    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
 
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
dica View Drop Down
Newbie
Newbie


Joined: 18 May 2005
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote dica Quote  Post ReplyReply Direct Link To This Post 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?
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.